cpu: s/GPIO(x,y)/GPIO_PIN(x,y)/

This commit is contained in:
Hauke Petersen 2015-09-15 11:45:56 +02:00 committed by Thomas Eichinger
parent e395dfd91e
commit d43dc9182f
11 changed files with 11 additions and 11 deletions

View File

@ -29,7 +29,7 @@ extern "C" {
/** /**
* @brief Define a CPU specific GPIO pin generator macro * @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 * @brief Available ports on the ATmega2560 family

View File

@ -54,7 +54,7 @@ typedef struct {
int gpio_init_mux(unsigned pin, unsigned mux); int gpio_init_mux(unsigned pin, unsigned mux);
void gpio_init_states(void); 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 #define HAVE_GPIO_PP_T
typedef enum { typedef enum {

View File

@ -43,7 +43,7 @@ typedef uint16_t gpio_t;
* @brief Mandatory function for defining a GPIO pins * @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 * @brief Override direction values

View File

@ -54,7 +54,7 @@ typedef enum {
* *
* The port definition is used (and zeroed) to suppress compiler warnings * 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 #ifdef __cplusplus
} }

View File

@ -42,7 +42,7 @@ typedef uint32_t gpio_t;
* @brief Mandatory function for defining a GPIO pins * @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 * @brief Available ports on the SAMD21

View File

@ -43,7 +43,7 @@ typedef uint32_t gpio_t;
* @brief Mandatory function for defining a GPIO pins * @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 * @brief Available ports on the SAML21 for convenient access

View File

@ -72,7 +72,7 @@ typedef struct spi_saml21 {
static const spi_saml21_t spi[] = { static const spi_saml21_t spi[] = {
#if SPI_0_EN #if SPI_0_EN
/* SPI device */ /* MCLK flag */ /* GLCK id */ /* SCLK */ /* MISO */ /* MOSI */ /* dipo+dopo */ /* 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 #endif
}; };

View File

@ -42,7 +42,7 @@ typedef uint32_t gpio_t;
/** /**
* @brief Define a CPU specific GPIO pin generator macro * @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 * @brief Override values for pull register configuration

View File

@ -42,7 +42,7 @@ typedef uint32_t gpio_t;
/** /**
* @brief Define a CPU specific GPIO pin generator macro * @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 * @brief Available ports on the STM32F3 family

View File

@ -42,7 +42,7 @@ typedef uint32_t gpio_t;
/** /**
* @brief Define a CPU specific GPIO pin generator macro * @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 * @brief Available ports on the STM32F4 family

View File

@ -43,7 +43,7 @@ typedef uint32_t gpio_t;
/** /**
* @brief Define a CPU specific GPIO pin generator macro * @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 * @brief Available ports on the STM32L1 family