Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers/gpio: changed periph driver interface #3095

Merged
merged 33 commits into from
Jun 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c8825a5
tests: removed gpio_exti test
haukepetersen Jun 3, 2015
8ccd289
tests: remoldeled the periph_gpio test
haukepetersen Jun 3, 2015
2deedcf
tests/periph_spi: adapted to change GPIO driver IF
haukepetersen Jun 4, 2015
b49f11b
drivers/gpio: overhaul of the periph GPIO driver
haukepetersen Jun 3, 2015
315ac1b
tests: adjusted test to changed GPIO interface
haukepetersen Jun 12, 2015
2cc2d9f
drivers: adjusted drivers to changed GPIO interface
haukepetersen Jun 12, 2015
69d16af
cpu/stm32f4: remodeled GPIO implementation
haukepetersen Jun 3, 2015
3a2d89f
cpu/stm32f3: remodeled GPIO driver implementation
haukepetersen Jun 3, 2015
aeecb09
cpu/saml21: remodeld GPIO driver implementation
haukepetersen Jun 3, 2015
368f5fb
cpu/samd21: remodeled GPIO driver implementation
haukepetersen Jun 3, 2015
55db700
cpu/nrf51822: remodeled GPIO driver implementation
haukepetersen Jun 3, 2015
47e8472
cpu/cc2538: adjusted to changed GPIO interface
haukepetersen Jun 3, 2015
d7f659d
cpu/kinetis_common: adjusted to changed GPIO if
haukepetersen Jun 3, 2015
17c8640
cpu/lpc1768: added periph_cpu.h
haukepetersen Jun 3, 2015
854730c
cpu/sam3x8e: adjusted to changed GPIO interface
haukepetersen Jun 3, 2015
f9bb383
cpu/stm32f0: adjusted to changed GPIO interface
haukepetersen Jun 3, 2015
6284bbb
cpu/stm32f1: adjusted to changed GPIO interface
haukepetersen Jun 3, 2015
480d3c6
cpu/stm32l1: adjusted to changed GPIO interface
haukepetersen Jun 3, 2015
5abd2ff
cpu/native: added periph_cpu.h
haukepetersen Jun 12, 2015
4d34100
cpu/atmega2560: adapted to changed GPIO driver IF
haukepetersen Jun 4, 2015
a174b76
boards: adjusted peripheral confs to GPIO changes
haukepetersen Jun 3, 2015
6994a1d
test/periph_spi: adjusted to GPIO driver changes
haukepetersen Jun 14, 2015
24c85bb
test/driver_xbee: removed obsolete auto_init file
haukepetersen Jun 14, 2015
6698a01
boards: removed obsolete GPIO defines
haukepetersen Jun 14, 2015
4a4ee44
drivers/gpio: added GPIO_UNDEF define
haukepetersen Jun 14, 2015
55e0362
drivers/xbee: use GPIO_UNDEF instead of GPIO_NUMOF
haukepetersen Jun 14, 2015
e0241df
tests/driver_xbee: s/GPIO_NUMOF/GPIO_UNDEF/
haukepetersen Jun 14, 2015
d748d4b
cpu/atmega2560: removed empty gpio.c file
haukepetersen Jun 14, 2015
c7f54c1
cpu/nrf51822: added custom GPIO_UNDEF define
haukepetersen Jun 14, 2015
138a6a7
cpu/samd21: added custom GPIO_UNDEF define
haukepetersen Jun 14, 2015
ac8ad54
cpu/saml21: added custom GPIO_UNDEF define
haukepetersen Jun 14, 2015
8c690f1
cpu/stm32f3: added custom GPIO_UNDEF define
haukepetersen Jun 14, 2015
71995e7
cpu/stm32f4: added custom GPIO_UNDEF define
haukepetersen Jun 14, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions boards/airfy-beacon/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,49 +133,6 @@
#define RADIO_IRQ_PRIO 1
/** @} */

/**
* @name GPIO configuration
* @{
*/
#define GPIO_NUMOF (16U)
#define GPIO_0_EN 1
#define GPIO_1_EN 1
#define GPIO_2_EN 1
#define GPIO_3_EN 1
#define GPIO_4_EN 1
#define GPIO_5_EN 1
#define GPIO_6_EN 0 /* not usable */
#define GPIO_7_EN 1
#define GPIO_8_EN 1
#define GPIO_9_EN 1
#define GPIO_10_EN 1
#define GPIO_11_EN 1
#define GPIO_12_EN 1
#define GPIO_13_EN 1
#define GPIO_14_EN 1
#define GPIO_15_EN 1
#define GPIO_IRQ_PRIO 1

/* GPIO pin configuration */
#define GPIO_0_PIN 0
#define GPIO_1_PIN 1
#define GPIO_2_PIN 2
#define GPIO_3_PIN 3
#define GPIO_4_PIN 4
#define GPIO_5_PIN 5
#define GPIO_6_PIN 6 /* not usable */
#define GPIO_7_PIN 7
#define GPIO_8_PIN 8
#define GPIO_9_PIN 9
#define GPIO_10_PIN 10
#define GPIO_11_PIN 11
#define GPIO_12_PIN 12
#define GPIO_13_PIN 13
#define GPIO_14_PIN 14
#define GPIO_15_PIN 15

/** @} */

#ifdef __cplusplus
} /* end extern "C" */
#endif
Expand Down
3 changes: 2 additions & 1 deletion boards/arduino-due/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ extern "C" {
* @name GPIO configuration
* @{
*/
#define GPIO_NUMOF (32U)
#define GPIO_0_EN 1
#define GPIO_1_EN 1
#define GPIO_2_EN 1
Expand Down Expand Up @@ -179,6 +178,8 @@ extern "C" {
#define GPIO_29_EN 1
#define GPIO_30_EN 1
#define GPIO_31_EN 1

/* interrupt priority */
#define GPIO_IRQ_PRIO 1

/* GPIO channel 0 config */
Expand Down
1 change: 0 additions & 1 deletion boards/arduino-mega2560/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ extern "C" {
/**
* @brief GPIO configuration
*/
#define GPIO_NUMOF (0U)
#define GPIO_0_EN 0
#define GPIO_1_EN 0
#define GPIO_2_EN 0
Expand Down
2 changes: 0 additions & 2 deletions boards/cc2538dk/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ extern "C" {
* @name GPIO configuration
* @{
*/
#define GPIO_NUMOF 32

#define GPIO_IRQ_PRIO 1

#define GPIO_0_EN 1
Expand Down
1 change: 0 additions & 1 deletion boards/fox/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ extern "C" {
/**
* @brief GPIO configuration
*/
#define GPIO_NUMOF 13
#define GPIO_0_EN 1
#define GPIO_1_EN 1
#define GPIO_2_EN 1
Expand Down
1 change: 0 additions & 1 deletion boards/iot-lab_M3/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ extern "C" {
/**
* @brief GPIO configuration
*/
#define GPIO_NUMOF 16
#define GPIO_0_EN 1
#define GPIO_1_EN 1
#define GPIO_2_EN 1
Expand Down
8 changes: 4 additions & 4 deletions boards/msbiot/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ extern "C" {
* @{
*/
#define CC110X_SPI SPI_0
#define CC110X_CS GPIO_7
#define CC110X_GDO0 GPIO_11
#define CC110X_GDO1 GPIO_2
#define CC110X_GDO2 GPIO_12
#define CC110X_CS GPIO(PORT_B, 12)
#define CC110X_GDO0 GPIO(PORT_C, 4)
#define CC110X_GDO1 GPIO(PORT_A, 6)
#define CC110X_GDO2 GPIO(PORT_C, 5)

typedef uint8_t radio_packet_length_t;
/** @} */
Expand Down
139 changes: 0 additions & 139 deletions boards/msbiot/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,145 +252,6 @@ extern "C" {
#define I2C_0_SDA_AF 4
#define I2C_0_SDA_CLKEN() (RCC->AHB1ENR |= RCC_AHB1ENR_GPIOBEN)

/**
* @name GPIO configuration
* @{
*/
#define GPIO_NUMOF 16
#define GPIO_0_EN 1
#define GPIO_1_EN 1
#define GPIO_2_EN 1
#define GPIO_3_EN 1
#define GPIO_4_EN 1
#define GPIO_5_EN 1
#define GPIO_6_EN 1
#define GPIO_7_EN 1
#define GPIO_8_EN 1
#define GPIO_9_EN 1
#define GPIO_10_EN 1
#define GPIO_11_EN 1
#define GPIO_12_EN 1
#define GPIO_13_EN 1
#define GPIO_14_EN 1
#define GPIO_15_EN 1
#define GPIO_IRQ_PRIO 1

/* IRQ config */
#define GPIO_IRQ_0 GPIO_0 /* alternatively GPIO_4 or GPIO_9 could be used here */
#define GPIO_IRQ_1 GPIO_1 /* alternatively GPIO_10 could be used here */
#define GPIO_IRQ_2 GPIO_15
#define GPIO_IRQ_3 -1/* not configured */
#define GPIO_IRQ_4 GPIO_11
#define GPIO_IRQ_5 GPIO_12
#define GPIO_IRQ_6 GPIO_2
#define GPIO_IRQ_7 -1/* not configured */
#define GPIO_IRQ_8 GPIO_13
#define GPIO_IRQ_9 GPIO_5
#define GPIO_IRQ_10 GPIO_3
#define GPIO_IRQ_11 GPIO_6
#define GPIO_IRQ_12 GPIO_7
#define GPIO_IRQ_13 GPIO_8 /* alternatively GPIO_14 could be used here */
#define GPIO_IRQ_14 -1/* not configured */
#define GPIO_IRQ_15 -1/* not configured */

/* GPIO channel 0 config */
#define GPIO_0_PORT GPIOA /* User Button 2 */
#define GPIO_0_PIN 0
#define GPIO_0_CLK 0 /* 0: PORT A, 1: B ... */
#define GPIO_0_EXTI_CFG() (SYSCFG->EXTICR[0] |= SYSCFG_EXTICR1_EXTI0_PA)
#define GPIO_0_IRQ EXTI0_IRQn
/* GPIO channel 1 config */
#define GPIO_1_PORT GPIOA
#define GPIO_1_PIN 1
#define GPIO_1_CLK 0
#define GPIO_1_EXTI_CFG() (SYSCFG->EXTICR[0] |= SYSCFG_EXTICR1_EXTI1_PA)
#define GPIO_1_IRQ EXTI1_IRQn
/* GPIO channel 2 config */
#define GPIO_2_PORT GPIOA /* CC1101 GDO1 */
#define GPIO_2_PIN 6
#define GPIO_2_CLK 0
#define GPIO_2_EXTI_CFG() (SYSCFG->EXTICR[1] |= SYSCFG_EXTICR2_EXTI6_PA)
#define GPIO_2_IRQ EXTI9_5_IRQn
/* GPIO channel 3 config */
#define GPIO_3_PORT GPIOA /* CC3000 SPI_IRQ */
#define GPIO_3_PIN 10
#define GPIO_3_CLK 0
#define GPIO_3_EXTI_CFG() (SYSCFG->EXTICR[2] |= SYSCFG_EXTICR3_EXTI10_PA)
#define GPIO_3_IRQ EXTI15_10_IRQn
/* GPIO channel 4 config */
#define GPIO_4_PORT GPIOB
#define GPIO_4_PIN 0
#define GPIO_4_CLK 1
#define GPIO_4_EXTI_CFG() (SYSCFG->EXTICR[0] |= SYSCFG_EXTICR1_EXTI0_PB)
#define GPIO_4_IRQ EXTI0_IRQn
/* GPIO channel 5 config */
#define GPIO_5_PORT GPIOB /* BEEPER Input */
#define GPIO_5_PIN 9
#define GPIO_5_CLK 1
#define GPIO_5_EXTI_CFG() (SYSCFG->EXTICR[2] |= SYSCFG_EXTICR3_EXTI9_PB)
#define GPIO_5_IRQ EXTI9_5_IRQn
/* GPIO channel 6 config */
#define GPIO_6_PORT GPIOB /* IMU-9150 INT */
#define GPIO_6_PIN 11
#define GPIO_6_CLK 1
#define GPIO_6_EXTI_CFG() (SYSCFG->EXTICR[2] |= SYSCFG_EXTICR3_EXTI11_PB)
#define GPIO_6_IRQ EXTI15_10_IRQn
/* GPIO channel 7 config */
#define GPIO_7_PORT GPIOB /* CC1101 CS */
#define GPIO_7_PIN 12
#define GPIO_7_CLK 1
#define GPIO_7_EXTI_CFG() (SYSCFG->EXTICR[3] |= SYSCFG_EXTICR4_EXTI12_PB)
#define GPIO_7_IRQ EXTI15_10_IRQn
/* GPIO channel 8 config */
#define GPIO_8_PORT GPIOB /* User Button 1 */
#define GPIO_8_PIN 13
#define GPIO_8_CLK 1
#define GPIO_8_EXTI_CFG() (SYSCFG->EXTICR[3] |= SYSCFG_EXTICR4_EXTI13_PB)
#define GPIO_8_IRQ EXTI15_10_IRQn
/* GPIO channel 9 config */
#define GPIO_9_PORT GPIOC /* TCA6416 Reset */
#define GPIO_9_PIN 0
#define GPIO_9_CLK 2
#define GPIO_9_EXTI_CFG() (SYSCFG->EXTICR[0] |= SYSCFG_EXTICR1_EXTI0_PC)
#define GPIO_9_IRQ EXTI0_IRQn
/* GPIO channel 10 config */
#define GPIO_10_PORT GPIOC /* CC3000 CS */
#define GPIO_10_PIN 1
#define GPIO_10_CLK 2
#define GPIO_10_EXTI_CFG() (SYSCFG->EXTICR[0] |= SYSCFG_EXTICR1_EXTI1_PC)
#define GPIO_10_IRQ EXTI1_IRQn
/* GPIO channel 11 config */
#define GPIO_11_PORT GPIOC /* CC1101 GDO 0 */
#define GPIO_11_PIN 4
#define GPIO_11_CLK 2
#define GPIO_11_EXTI_CFG() (SYSCFG->EXTICR[1] |= SYSCFG_EXTICR2_EXTI4_PC)
#define GPIO_11_IRQ EXTI4_IRQn
/* GPIO channel 12 config */
#define GPIO_12_PORT GPIOC /* CC1101 GDO 2 */
#define GPIO_12_PIN 5
#define GPIO_12_CLK 2
#define GPIO_12_EXTI_CFG() (SYSCFG->EXTICR[1] |= SYSCFG_EXTICR2_EXTI5_PC)
#define GPIO_12_IRQ EXTI9_5_IRQn
/* GPIO channel 13 config */
#define GPIO_13_PORT GPIOC /* TCA6416 INT */
#define GPIO_13_PIN 8
#define GPIO_13_CLK 2
#define GPIO_13_EXTI_CFG() (SYSCFG->EXTICR[2] |= SYSCFG_EXTICR3_EXTI8_PC)
#define GPIO_13_IRQ EXTI9_5_IRQn
/* GPIO channel 14 config */
#define GPIO_14_PORT GPIOC /* CC3000 VBAT_SW_EN */
#define GPIO_14_PIN 13
#define GPIO_14_CLK 2
#define GPIO_14_EXTI_CFG() (SYSCFG->EXTICR[3] |= SYSCFG_EXTICR4_EXTI13_PC)
#define GPIO_14_IRQ EXTI15_10_IRQn
/* GPIO channel 15 config */
#define GPIO_15_PORT GPIOD /* Micro SD Sockel CS */
#define GPIO_15_PIN 2
#define GPIO_15_CLK 3
#define GPIO_15_EXTI_CFG() (SYSCFG->EXTICR[0] |= SYSCFG_EXTICR1_EXTI2_PD)
#define GPIO_15_IRQ EXTI2_IRQn
/** @} */

#ifdef __cplusplus
}
#endif
Expand Down
12 changes: 6 additions & 6 deletions boards/mulle/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,16 @@ void board_init(void)
static inline void leds_init(void)
{
/* The pin configuration can be found in board.h and periph_conf.h */
gpio_init_out(LED_RED_GPIO, GPIO_NOPULL);
gpio_init_out(LED_YELLOW_GPIO, GPIO_NOPULL);
gpio_init_out(LED_GREEN_GPIO, GPIO_NOPULL);
gpio_init(LED_RED_GPIO, GPIO_DIR_OUT, GPIO_NOPULL);
gpio_init(LED_YELLOW_GPIO, GPIO_DIR_OUT, GPIO_NOPULL);
gpio_init(LED_GREEN_GPIO, GPIO_DIR_OUT, GPIO_NOPULL);
}

static inline void power_pins_init(void)
{
gpio_init_out(MULLE_POWER_AVDD, GPIO_NOPULL);
gpio_init_out(MULLE_POWER_VPERIPH, GPIO_NOPULL);
gpio_init_out(MULLE_POWER_VSEC, GPIO_NOPULL);
gpio_init(MULLE_POWER_AVDD, GPIO_DIR_OUT, GPIO_NOPULL);
gpio_init(MULLE_POWER_VPERIPH, GPIO_DIR_OUT, GPIO_NOPULL);
gpio_init(MULLE_POWER_VSEC, GPIO_DIR_OUT, GPIO_NOPULL);
gpio_clear(MULLE_POWER_AVDD);
gpio_clear(MULLE_POWER_VPERIPH);
gpio_clear(MULLE_POWER_VSEC);
Expand Down
1 change: 0 additions & 1 deletion boards/mulle/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,6 @@ extern "C"
* @name GPIO configuration
* @{
*/
#define GPIO_NUMOF 27
#define GPIO_0_EN 1
#define GPIO_1_EN 1
#define GPIO_2_EN 1
Expand Down
1 change: 0 additions & 1 deletion boards/nucleo-f091/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ extern "C" {
* @name GPIO configuration
* @{
*/
#define GPIO_NUMOF (6U)
#define GPIO_0_EN 1
#define GPIO_1_EN 1
#define GPIO_2_EN 1
Expand Down
1 change: 0 additions & 1 deletion boards/nucleo-f334/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ extern "C" {
* @brief GPIO configuration
* @{
*/
#define GPIO_NUMOF 3
#define GPIO_0_EN 1
#define GPIO_1_EN 1
#define GPIO_2_EN 1
Expand Down
1 change: 0 additions & 1 deletion boards/nucleo-l1/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ extern "C" {
/**
* @brief GPIO configuration
*/
#define GPIO_NUMOF 16
#define GPIO_0_EN 1
#define GPIO_1_EN 1
#define GPIO_2_EN 1
Expand Down
1 change: 0 additions & 1 deletion boards/openmote/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
* @name GPIO configuration
* @{
*/
#define GPIO_NUMOF 12
#define GPIO_0_EN 1
#define GPIO_1_EN 1
#define GPIO_2_EN 1
Expand Down
1 change: 0 additions & 1 deletion boards/pba-d-01-kw2x/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ extern "C"
* @name GPIO configuration
* @{
*/
#define GPIO_NUMOF 8
#define GPIO_0_EN 1
#define GPIO_1_EN 1
#define GPIO_2_EN 1
Expand Down
42 changes: 0 additions & 42 deletions boards/pca10000/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,48 +121,6 @@ extern "C" {
#define RADIO_IRQ_PRIO 1
/** @} */

/**
* @name GPIO configuration
* @{
*/
#define GPIO_NUMOF 16
#define GPIO_0_EN 1
#define GPIO_1_EN 1
#define GPIO_2_EN 1
#define GPIO_3_EN 1
#define GPIO_4_EN 1
#define GPIO_5_EN 1
#define GPIO_6_EN 1
#define GPIO_7_EN 1
#define GPIO_8_EN 1
#define GPIO_9_EN 1
#define GPIO_10_EN 1
#define GPIO_11_EN 1
#define GPIO_12_EN 1
#define GPIO_13_EN 1
#define GPIO_14_EN 1
#define GPIO_15_EN 1
#define GPIO_IRQ_PRIO 1

/* GPIO pin configuration */
#define GPIO_0_PIN 0
#define GPIO_1_PIN 1
#define GPIO_2_PIN 2
#define GPIO_3_PIN 3
#define GPIO_4_PIN 4
#define GPIO_5_PIN 5
#define GPIO_6_PIN 6
#define GPIO_7_PIN 7
#define GPIO_8_PIN 8
#define GPIO_9_PIN 9
#define GPIO_10_PIN 10
#define GPIO_11_PIN 11
#define GPIO_12_PIN 12
#define GPIO_13_PIN 13
#define GPIO_14_PIN 14
#define GPIO_15_PIN 15
/** @} */

#ifdef __cplusplus
}
#endif
Expand Down
Loading