From 0eebda0958b560d2dd8320d32be215312b4137de Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 9 Oct 2018 14:51:47 +0200 Subject: [PATCH 01/17] atmega_common: mark closing #endif for MODULE_PERIPH_GPIO_IRQ --- cpu/atmega_common/periph/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/atmega_common/periph/gpio.c b/cpu/atmega_common/periph/gpio.c index 887b8d2c5f..08997c88ea 100644 --- a/cpu/atmega_common/periph/gpio.c +++ b/cpu/atmega_common/periph/gpio.c @@ -59,7 +59,7 @@ #endif static gpio_isr_ctx_t config[GPIO_EXT_INT_NUMOF]; -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ /** * @brief Extract the pin number of the given pin @@ -306,4 +306,4 @@ ISR(INT7_vect, ISR_BLOCK) } #endif -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ From 73061ae70e4f61263ebc25d69ac1ae9cf9ffd1e9 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 9 Oct 2018 14:52:05 +0200 Subject: [PATCH 02/17] cc2538: mark closing #endif for MODULE_PERIPH_GPIO_IRQ --- cpu/cc2538/periph/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/cc2538/periph/gpio.c b/cpu/cc2538/periph/gpio.c index ad2934f4a9..95cf7ae18b 100644 --- a/cpu/cc2538/periph/gpio.c +++ b/cpu/cc2538/periph/gpio.c @@ -33,7 +33,7 @@ #ifdef MODULE_PERIPH_GPIO_IRQ static gpio_isr_ctx_t isr_ctx[4][8]; -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ /** * @brief Access GPIO low-level device @@ -245,7 +245,7 @@ void isr_gpiod(void) { handle_isr(3); } -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ /* CC2538 specific add-on GPIO functions */ From 4431f8ee0afa5ca25e1f6c0b2e0c91ea575556bf Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 9 Oct 2018 14:52:21 +0200 Subject: [PATCH 03/17] cc26x0: mark closing #endif for MODULE_PERIPH_GPIO_IRQ --- cpu/cc26x0/periph/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/cc26x0/periph/gpio.c b/cpu/cc26x0/periph/gpio.c index 938352a179..1a1c46a7c8 100644 --- a/cpu/cc26x0/periph/gpio.c +++ b/cpu/cc26x0/periph/gpio.c @@ -31,7 +31,7 @@ * @brief static callback memory */ static gpio_isr_ctx_t gpio_chan[GPIO_ISR_CHAN_NUMOF]; -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ int gpio_init(gpio_t pin, gpio_mode_t mode) { @@ -131,4 +131,4 @@ void isr_edge(void) } cortexm_isr_end(); } -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ From ff54112f82d223c2448b5bd5a8e8b1fa63e1a6d5 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 9 Oct 2018 14:52:33 +0200 Subject: [PATCH 04/17] efm32: mark closing #endif for MODULE_PERIPH_GPIO_IRQ --- cpu/efm32/periph/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/efm32/periph/gpio.c b/cpu/efm32/periph/gpio.c index f1bce06fe9..76d0e92213 100644 --- a/cpu/efm32/periph/gpio.c +++ b/cpu/efm32/periph/gpio.c @@ -37,7 +37,7 @@ * @brief Hold one interrupt context per interrupt line */ static gpio_isr_ctx_t isr_ctx[NUMOF_IRQS]; -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ static inline GPIO_Port_TypeDef _port_num(gpio_t pin) { @@ -173,4 +173,4 @@ void isr_gpio_odd(void) { gpio_irq(); } -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ From ce12d4cefb6964300433c62d1714147310434cd3 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 9 Oct 2018 14:52:45 +0200 Subject: [PATCH 05/17] esp8266: mark closing #endif for MODULE_PERIPH_GPIO_IRQ --- cpu/esp8266/periph/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/esp8266/periph/gpio.c b/cpu/esp8266/periph/gpio.c index 758df0cdba..605ffebefa 100644 --- a/cpu/esp8266/periph/gpio.c +++ b/cpu/esp8266/periph/gpio.c @@ -226,7 +226,7 @@ void gpio_irq_disable (gpio_t pin) gpio_int_enabled_table [pin] = false; } -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ int gpio_read (gpio_t pin) { From aa0f93067f6fa189d90f202432d4ee0c880380e2 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 9 Oct 2018 14:53:00 +0200 Subject: [PATCH 06/17] ezr32wg: mark closing #endif for MODULE_PERIPH_GPIO_IRQ --- cpu/ezr32wg/periph/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/ezr32wg/periph/gpio.c b/cpu/ezr32wg/periph/gpio.c index 472e52c94f..101666c099 100644 --- a/cpu/ezr32wg/periph/gpio.c +++ b/cpu/ezr32wg/periph/gpio.c @@ -35,7 +35,7 @@ * @brief Hold one interrupt context per interrupt line */ static gpio_isr_ctx_t isr_ctx[NUMOF_IRQS]; -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ static inline int _port_num(gpio_t pin) { @@ -164,4 +164,4 @@ void isr_gpio_even(void) cortexm_isr_end(); } -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ From 769bf572a00e5fc53894299c4ce4695571a57044 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 9 Oct 2018 14:53:20 +0200 Subject: [PATCH 07/17] fe310: mark closing #endif for MODULE_PERIPH_GPIO_IRQ --- cpu/fe310/periph/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/fe310/periph/gpio.c b/cpu/fe310/periph/gpio.c index b9a1a3a370..813d5c0fb8 100644 --- a/cpu/fe310/periph/gpio.c +++ b/cpu/fe310/periph/gpio.c @@ -35,7 +35,7 @@ #ifdef MODULE_PERIPH_GPIO_IRQ static gpio_flank_t isr_flank[GPIO_NUMOF]; static gpio_isr_ctx_t isr_ctx[GPIO_NUMOF]; -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ int gpio_init(gpio_t pin, gpio_mode_t mode) { @@ -215,4 +215,4 @@ void gpio_irq_disable(gpio_t pin) break; } } -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ From 53a9797e5640be881b1645894ddc12c9deadb0a6 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 9 Oct 2018 14:53:31 +0200 Subject: [PATCH 08/17] kinetis: mark closing #endif for MODULE_PERIPH_GPIO_IRQ --- cpu/kinetis/periph/gpio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpu/kinetis/periph/gpio.c b/cpu/kinetis/periph/gpio.c index f7b88172be..03256dc553 100644 --- a/cpu/kinetis/periph/gpio.c +++ b/cpu/kinetis/periph/gpio.c @@ -115,7 +115,7 @@ static isr_ctx_t isr_ctx[CTX_NUMOF]; static uint32_t isr_map[ISR_MAP_SIZE]; static const uint8_t port_irqs[] = PORT_IRQS; -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ static inline PORT_Type *port(gpio_t pin) { @@ -176,7 +176,7 @@ static void ctx_clear(int port, int pin) int ctx = get_ctx(port, pin); write_map(port, pin, ctx); } -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ static inline void clk_en(gpio_t pin) { @@ -211,7 +211,7 @@ void gpio_init_port(gpio_t pin, uint32_t pcr) * need to free its interrupt context. We to this only after we * re-configured the pin in case an event is happening just in between... */ uint32_t isr_state = port(pin)->PCR[pin_num(pin)]; -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ /* set new PCR value */ port(pin)->PCR[pin_num(pin)] = pcr; @@ -221,7 +221,7 @@ void gpio_init_port(gpio_t pin, uint32_t pcr) if (isr_state & PORT_PCR_IRQC_MASK) { ctx_clear(port_num(pin), pin_num(pin)); } -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ } int gpio_read(gpio_t pin) From 896212e32046c50516d0dc8830a74d5393d7edba Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 9 Oct 2018 14:54:00 +0200 Subject: [PATCH 09/17] lm4f120: mark closing #endif for MODULE_PERIPH_GPIO_IRQ --- cpu/lm4f120/periph/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/lm4f120/periph/gpio.c b/cpu/lm4f120/periph/gpio.c index 747b3a7a6c..e1b5673266 100644 --- a/cpu/lm4f120/periph/gpio.c +++ b/cpu/lm4f120/periph/gpio.c @@ -93,7 +93,7 @@ typedef struct { } gpio_state_t; static gpio_state_t gpio_config[NUM_OF_PORT][NUM_OF_PINS]; -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ int gpio_init(gpio_t pin, gpio_mode_t mode) @@ -275,4 +275,4 @@ void gpio_irq_disable(gpio_t pin) HWREG(im_reg_addr) &= ~(pin_bit); } -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ From f1b16fcb328ae58265d1a59691a07367f6e3abb9 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 9 Oct 2018 14:58:13 +0200 Subject: [PATCH 10/17] lpc1768: mark closing #endif for MODULE_PERIPH_GPIO_IRQ --- cpu/lpc1768/periph/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/lpc1768/periph/gpio.c b/cpu/lpc1768/periph/gpio.c index 7a17240cef..c876f9050b 100644 --- a/cpu/lpc1768/periph/gpio.c +++ b/cpu/lpc1768/periph/gpio.c @@ -33,7 +33,7 @@ static gpio_isr_ctx_t isr_ctx[NUMOF_IRQS]; static gpio_flank_t isr_state[2][32]; -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ #define PIN_MASK (0x1f) #define PORT_SHIFT (5U) @@ -241,4 +241,4 @@ void isr_eint3(void) cortexm_isr_end(); } -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ From 0ed57df4b5894eb251c3e188a1d3c69a43389b8e Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 9 Oct 2018 14:58:26 +0200 Subject: [PATCH 11/17] lpc2387: mark closing #endif for MODULE_PERIPH_GPIO_IRQ --- cpu/lpc2387/periph/gpio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpu/lpc2387/periph/gpio.c b/cpu/lpc2387/periph/gpio.c index de9adf7524..f62c413b7e 100644 --- a/cpu/lpc2387/periph/gpio.c +++ b/cpu/lpc2387/periph/gpio.c @@ -58,13 +58,13 @@ static int _isr_map_entry(gpio_t pin) { return _pin; } -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ void gpio_init_ports(void) { SCS |= 0x1; /* set GPIO ports 0 and 1 to FIO mode (3.7.2) */ #ifdef MODULE_PERIPH_GPIO_IRQ memset(&_gpio_isr_map[0], 0xff, 64); -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ } int gpio_init(gpio_t pin, gpio_mode_t mode) @@ -312,4 +312,4 @@ void GPIO_IRQHandler(void) VICVectAddr = 0; /* Acknowledge Interrupt */ } -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ From 67122b51f380de3924af4fe0faa4f9e0d7bddd61 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 9 Oct 2018 14:58:49 +0200 Subject: [PATCH 12/17] nrf5x_common: mark closing #endif for MODULE_PERIPH_GPIO_IRQ --- cpu/nrf5x_common/periph/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/nrf5x_common/periph/gpio.c b/cpu/nrf5x_common/periph/gpio.c index 26ef551a20..deba4d8e2a 100644 --- a/cpu/nrf5x_common/periph/gpio.c +++ b/cpu/nrf5x_common/periph/gpio.c @@ -39,7 +39,7 @@ * @brief Place to store the interrupt context */ static gpio_isr_ctx_t exti_chan; -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ /** * @brief Get the port's base address @@ -153,4 +153,4 @@ void isr_gpiote(void) } cortexm_isr_end(); } -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ From 95819c660bd3daeb0b4e84143b4d60db6705f849 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 9 Oct 2018 14:59:17 +0200 Subject: [PATCH 13/17] sam0_common: mark closing #endif for MODULE_PERIPH_GPIO_IRQ --- cpu/sam0_common/periph/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/sam0_common/periph/gpio.c b/cpu/sam0_common/periph/gpio.c index 5d13a3bac2..87ab3330f8 100644 --- a/cpu/sam0_common/periph/gpio.c +++ b/cpu/sam0_common/periph/gpio.c @@ -43,7 +43,7 @@ #define NUMOF_IRQS (16U) static gpio_isr_ctx_t gpio_config[NUMOF_IRQS]; -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ static inline PortGroup *_port(gpio_t pin) { @@ -233,4 +233,4 @@ void isr_eic(void) } cortexm_isr_end(); } -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ From 98ddcdc78310721ea601d0156b7cdf1fc17bee1b Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 9 Oct 2018 14:59:28 +0200 Subject: [PATCH 14/17] sam3: mark closing #endif for MODULE_PERIPH_GPIO_IRQ --- cpu/sam3/periph/gpio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpu/sam3/periph/gpio.c b/cpu/sam3/periph/gpio.c index c803fa8c21..4eee2a1505 100644 --- a/cpu/sam3/periph/gpio.c +++ b/cpu/sam3/periph/gpio.c @@ -107,7 +107,7 @@ static void _ctx_clear(int port, int pin) _write_map(port, pin, CTX_NUMOF); } } -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ /** * @brief Extract the pin's port base address from the given pin identifier @@ -165,7 +165,7 @@ int gpio_init(gpio_t pin, gpio_mode_t mode) port->PIO_IDR = (1 << pin_num); #ifdef MODULE_PERIPH_GPIO_IRQ _ctx_clear(port_num, pin_num); -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ /* give the PIO module the power over the corresponding pin */ port->PIO_PER = (1 << pin_num); @@ -341,4 +341,4 @@ void isr_piod(void) { isr_handler(PIOD, PD); } -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ From 92c5a7824a8012b0fed3eae9c6a43bab48c52192 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 9 Oct 2018 14:59:47 +0200 Subject: [PATCH 15/17] stm32_common: mark closing #endif for MODULE_PERIPH_GPIO_IRQ --- cpu/stm32_common/periph/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/stm32_common/periph/gpio.c b/cpu/stm32_common/periph/gpio.c index 457d79e4ea..6e419332e9 100644 --- a/cpu/stm32_common/periph/gpio.c +++ b/cpu/stm32_common/periph/gpio.c @@ -44,7 +44,7 @@ * @brief Allocate memory for one callback and argument per EXTI channel */ static gpio_isr_ctx_t isr_ctx[EXTI_NUMOF]; -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ /** * @brief Extract the port base address from the given pin identifier @@ -248,7 +248,7 @@ void isr_exti(void) } cortexm_isr_end(); } -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ #else typedef int dont_be_pedantic; From 7994f35c7a41da172d974ee84e83fe344fa22f19 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 9 Oct 2018 15:00:23 +0200 Subject: [PATCH 16/17] stm32f1: mark closing #endif for MODULE_PERIPH_GPIO_IRQ --- cpu/stm32f1/periph/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/stm32f1/periph/gpio.c b/cpu/stm32f1/periph/gpio.c index a162d4da41..a3fea5aec0 100644 --- a/cpu/stm32f1/periph/gpio.c +++ b/cpu/stm32f1/periph/gpio.c @@ -45,7 +45,7 @@ * @brief Allocate memory for one callback and argument per EXTI channel */ static gpio_isr_ctx_t exti_ctx[GPIO_ISR_CHAN_NUMOF]; -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ /** * @brief Extract the pin's port base address from the given pin identifier @@ -230,4 +230,4 @@ void isr_exti(void) } cortexm_isr_end(); } -#endif +#endif /* MODULE_PERIPH_GPIO_IRQ */ From 0598d5bcf1ab2520d98735c360ed82a788461e84 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 9 Oct 2018 15:11:45 +0200 Subject: [PATCH 17/17] periph_gpio: comment IRQ #endif correctly --- drivers/include/periph/gpio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/include/periph/gpio.h b/drivers/include/periph/gpio.h index 53a689895f..03c10359fa 100644 --- a/drivers/include/periph/gpio.h +++ b/drivers/include/periph/gpio.h @@ -192,7 +192,7 @@ void gpio_irq_enable(gpio_t pin); */ void gpio_irq_disable(gpio_t pin); -#endif /* MODULE_PERIPH_GPIO_IRQ */ +#endif /* defined(MODULE_PERIPH_GPIO_IRQ) || defined(DOXYGEN) */ /** * @brief Get the current value of the given pin