diff --git a/cpu/atmega2560/include/periph_cpu.h b/cpu/atmega2560/include/periph_cpu.h index 7d38894e90323d62b38671b587b8fa51c6b48c11..5d6cd4746feda7b823da0696e82368d5491dacbc 100644 --- a/cpu/atmega2560/include/periph_cpu.h +++ b/cpu/atmega2560/include/periph_cpu.h @@ -29,7 +29,7 @@ extern "C" { /** * @brief Define a CPU specific GPIO pin generator macro */ -#define GPIO(x, y) ((x << 4) | y) +#define GPIO_PIN(x, y) ((x << 4) | y) /** * @brief Available ports on the ATmega2560 family diff --git a/cpu/lpc2387/include/periph_cpu.h b/cpu/lpc2387/include/periph_cpu.h index 8fccc27687ed8b5725dae9602f3861c2f6860902..b80cf392e4c884c05995cf43f4ed6c41e5ec8501 100644 --- a/cpu/lpc2387/include/periph_cpu.h +++ b/cpu/lpc2387/include/periph_cpu.h @@ -54,7 +54,7 @@ typedef struct { int gpio_init_mux(unsigned pin, unsigned mux); void gpio_init_states(void); -#define GPIO(port, pin) (port*32 + pin) +#define GPIO_PIN(port, pin) (port*32 + pin) #define HAVE_GPIO_PP_T typedef enum { diff --git a/cpu/msp430fxyz/include/periph_cpu.h b/cpu/msp430fxyz/include/periph_cpu.h index ca9fc040327ff781db784bcbfff5390f4fb2a8c8..c7050ca2d7df0e9592de4b5c013d07d6b563713a 100644 --- a/cpu/msp430fxyz/include/periph_cpu.h +++ b/cpu/msp430fxyz/include/periph_cpu.h @@ -43,7 +43,7 @@ typedef uint16_t gpio_t; * @brief Mandatory function for defining a GPIO pins * @{ */ -#define GPIO(x, y) ((gpio_t)(((x & 0xff) << 8) | (1 << (y & 0xff)))) +#define GPIO_PIN(x, y) ((gpio_t)(((x & 0xff) << 8) | (1 << (y & 0xff)))) /** * @brief Override direction values diff --git a/cpu/nrf51/include/periph_cpu.h b/cpu/nrf51/include/periph_cpu.h index 9bf7ebc31bacae4d0a85169a1830973eb5a5e550..2b3fffe910accb467f18a9712195805a1336ca22 100644 --- a/cpu/nrf51/include/periph_cpu.h +++ b/cpu/nrf51/include/periph_cpu.h @@ -54,7 +54,7 @@ typedef enum { * * The port definition is used (and zeroed) to suppress compiler warnings */ -#define GPIO(x,y) ((x & 0) | y) +#define GPIO_PIN(x,y) ((x & 0) | y) #ifdef __cplusplus } diff --git a/cpu/samd21/include/periph_cpu.h b/cpu/samd21/include/periph_cpu.h index e357d1d0bbf63c03a599dd0dce8d2ff9153f70df..09b6cf6adc008c3ba8eb05bb7093463b90be14b1 100644 --- a/cpu/samd21/include/periph_cpu.h +++ b/cpu/samd21/include/periph_cpu.h @@ -42,7 +42,7 @@ typedef uint32_t gpio_t; * @brief Mandatory function for defining a GPIO pins * @{ */ -#define GPIO(x, y) (((gpio_t)(&PORT->Group[x])) | y) +#define GPIO_PIN(x, y) (((gpio_t)(&PORT->Group[x])) | y) /** * @brief Available ports on the SAMD21 diff --git a/cpu/saml21/include/periph_cpu.h b/cpu/saml21/include/periph_cpu.h index 1c6dc5eae25a5e9ead08424881c6ecbc8aa70bc9..d6384ca65440c6a4925775b5edf3c9216aeb9acb 100644 --- a/cpu/saml21/include/periph_cpu.h +++ b/cpu/saml21/include/periph_cpu.h @@ -43,7 +43,7 @@ typedef uint32_t gpio_t; * @brief Mandatory function for defining a GPIO pins * @{ */ -#define GPIO(x, y) (((gpio_t)(&PORT->Group[x])) | y) +#define GPIO_PIN(x, y) (((gpio_t)(&PORT->Group[x])) | y) /** * @brief Available ports on the SAML21 for convenient access diff --git a/cpu/saml21/periph/spi.c b/cpu/saml21/periph/spi.c index c32e2f31296412275aa529978444fa7cd2f3a511..b2dbafbbfb904fb55a9a6266998f0af501cd5c93 100644 --- a/cpu/saml21/periph/spi.c +++ b/cpu/saml21/periph/spi.c @@ -72,7 +72,7 @@ typedef struct spi_saml21 { static const spi_saml21_t spi[] = { #if SPI_0_EN /* SPI device */ /* MCLK flag */ /* GLCK id */ /* SCLK */ /* MISO */ /* MOSI */ /* dipo+dopo */ - { &(SERCOM0->SPI), MCLK_APBCMASK_SERCOM0, SERCOM0_GCLK_ID_CORE, { GPIO(PA,7), 3 }, { GPIO(PA,4), 3 }, { GPIO(PA,6), 3 }, 0, 1 } + { &(SERCOM0->SPI), MCLK_APBCMASK_SERCOM0, SERCOM0_GCLK_ID_CORE, { GPIO_PIN(PA,7), 3 }, { GPIO_PIN(PA,4), 3 }, { GPIO_PIN(PA,6), 3 }, 0, 1 } #endif }; diff --git a/cpu/stm32f1/include/periph_cpu.h b/cpu/stm32f1/include/periph_cpu.h index f883b03b691bce35001700ab7d2c03fd3e2c832d..1a8e7e61517f820f369ddb126a5aef8688c792f4 100644 --- a/cpu/stm32f1/include/periph_cpu.h +++ b/cpu/stm32f1/include/periph_cpu.h @@ -42,7 +42,7 @@ typedef uint32_t gpio_t; /** * @brief Define a CPU specific GPIO pin generator macro */ -#define GPIO(x, y) ((GPIOA_BASE + (x << 10)) | y) +#define GPIO_PIN(x, y) ((GPIOA_BASE + (x << 10)) | y) /** * @brief Override values for pull register configuration diff --git a/cpu/stm32f3/include/periph_cpu.h b/cpu/stm32f3/include/periph_cpu.h index 8e86ebac7c9dc202c959b60ab6b04e0a898c861b..0060c1f0e70ef0a91e637e733d6e9b3775a71ec0 100644 --- a/cpu/stm32f3/include/periph_cpu.h +++ b/cpu/stm32f3/include/periph_cpu.h @@ -42,7 +42,7 @@ typedef uint32_t gpio_t; /** * @brief Define a CPU specific GPIO pin generator macro */ -#define GPIO(x, y) ((GPIOA_BASE + (x << 10)) | y) +#define GPIO_PIN(x, y) ((GPIOA_BASE + (x << 10)) | y) /** * @brief Available ports on the STM32F3 family diff --git a/cpu/stm32f4/include/periph_cpu.h b/cpu/stm32f4/include/periph_cpu.h index aead4e9a083b4e86f3f470b143b0a5da8e3399da..4131cef10a0ab86c83676fe9c98997ad95cb9fd8 100644 --- a/cpu/stm32f4/include/periph_cpu.h +++ b/cpu/stm32f4/include/periph_cpu.h @@ -42,7 +42,7 @@ typedef uint32_t gpio_t; /** * @brief Define a CPU specific GPIO pin generator macro */ -#define GPIO(x, y) ((GPIOA_BASE + (x << 10)) | y) +#define GPIO_PIN(x, y) ((GPIOA_BASE + (x << 10)) | y) /** * @brief Available ports on the STM32F4 family diff --git a/cpu/stm32l1/include/periph_cpu.h b/cpu/stm32l1/include/periph_cpu.h index a5507a76e1ddc4f89f9491d61b5bbf0d106332be..a20ef4586e4156ce5b5553ef79f06a541467e4d0 100644 --- a/cpu/stm32l1/include/periph_cpu.h +++ b/cpu/stm32l1/include/periph_cpu.h @@ -43,7 +43,7 @@ typedef uint32_t gpio_t; /** * @brief Define a CPU specific GPIO pin generator macro */ -#define GPIO(x, y) ((GPIOA_BASE + (x << 10)) | y) +#define GPIO_PIN(x, y) ((GPIOA_BASE + (x << 10)) | y) /** * @brief Available ports on the STM32L1 family