diff options
Diffstat (limited to 'chip/stm32')
29 files changed, 143 insertions, 95 deletions
diff --git a/chip/stm32/clock-f.c b/chip/stm32/clock-f.c index 1a77d8ad60..0ae4440d78 100644 --- a/chip/stm32/clock-f.c +++ b/chip/stm32/clock-f.c @@ -322,7 +322,7 @@ DECLARE_DEFERRED(set_rtc_host_event); #endif test_mockable -void __rtc_alarm_irq(void) +void rtc_alarm_irq(void) { struct rtc_time_reg rtc; reset_rtc_alarm(&rtc); @@ -335,6 +335,11 @@ void __rtc_alarm_irq(void) } #endif } + +static void __rtc_alarm_irq(void) +{ + rtc_alarm_irq(); +} DECLARE_IRQ(STM32_IRQ_RTC_ALARM, __rtc_alarm_irq, 1); __attribute__((weak)) diff --git a/chip/stm32/clock-stm32h7.c b/chip/stm32/clock-stm32h7.c index ba233dbd76..72f904c4ed 100644 --- a/chip/stm32/clock-stm32h7.c +++ b/chip/stm32/clock-stm32h7.c @@ -436,7 +436,7 @@ void clock_refresh_console_in_use(void) { } -void lptim_interrupt(void) +static void lptim_interrupt(void) { STM32_LPTIM_ICR(1) = STM32_LPTIM_INT_CMPM; } diff --git a/chip/stm32/clock-stm32l4.c b/chip/stm32/clock-stm32l4.c index 4624013a16..b07b5fb2d4 100644 --- a/chip/stm32/clock-stm32l4.c +++ b/chip/stm32/clock-stm32l4.c @@ -968,7 +968,7 @@ static void set_rtc_host_event(void) DECLARE_DEFERRED(set_rtc_host_event); #endif -test_mockable +test_mockable_static void __rtc_alarm_irq(void) { struct rtc_time_reg rtc; diff --git a/chip/stm32/dma-stm32f4.c b/chip/stm32/dma-stm32f4.c index c721065fd3..3374cff7fc 100644 --- a/chip/stm32/dma-stm32f4.c +++ b/chip/stm32/dma-stm32f4.c @@ -303,7 +303,7 @@ void dma_clear_isr(enum dma_channel stream) #define STM32_DMA_IDX(dma, x) CONCAT4(STM32_DMA, dma, _STREAM, x) #define STM32_DMA_FCT(dma, x) CONCAT4(dma_, dma, _event_interrupt_stream_, x) #define DECLARE_DMA_IRQ(dma, x) \ - void STM32_DMA_FCT(dma, x)(void) \ + static void STM32_DMA_FCT(dma, x)(void) \ { \ dma_clear_isr(STM32_DMA_IDX(dma, x)); \ if (dma_irq[STM32_DMA_IDX(dma, x)].cb != NULL) \ diff --git a/chip/stm32/dma.c b/chip/stm32/dma.c index 55317ba003..ae5a83789d 100644 --- a/chip/stm32/dma.c +++ b/chip/stm32/dma.c @@ -332,7 +332,7 @@ void dma_clear_isr(enum dma_channel channel) #ifdef CONFIG_DMA_DEFAULT_HANDLERS #ifdef CHIP_FAMILY_STM32F0 -void dma_event_interrupt_channel_1(void) +static void dma_event_interrupt_channel_1(void) { if (STM32_DMA1_REGS->isr & STM32_DMA_ISR_TCIF(STM32_DMAC_CH1)) { dma_clear_isr(STM32_DMAC_CH1); @@ -343,7 +343,7 @@ void dma_event_interrupt_channel_1(void) } DECLARE_IRQ(STM32_IRQ_DMA_CHANNEL_1, dma_event_interrupt_channel_1, 1); -void dma_event_interrupt_channel_2_3(void) +static void dma_event_interrupt_channel_2_3(void) { int i; @@ -357,7 +357,7 @@ void dma_event_interrupt_channel_2_3(void) } DECLARE_IRQ(STM32_IRQ_DMA_CHANNEL_2_3, dma_event_interrupt_channel_2_3, 1); -void dma_event_interrupt_channel_4_7(void) +static void dma_event_interrupt_channel_4_7(void) { int i; const unsigned int max_chan = MIN(STM32_DMAC_CH7, STM32_DMAC_COUNT); @@ -375,7 +375,7 @@ DECLARE_IRQ(STM32_IRQ_DMA_CHANNEL_4_7, dma_event_interrupt_channel_4_7, 1); #else /* !CHIP_FAMILY_STM32F0 */ #define DECLARE_DMA_IRQ(x) \ - void CONCAT2(dma_event_interrupt_channel_, x)(void) \ + static void CONCAT2(dma_event_interrupt_channel_, x)(void) \ { \ dma_clear_isr(CONCAT2(STM32_DMAC_CH, x)); \ if (dma_irq[CONCAT2(STM32_DMAC_CH, x)].cb != NULL) \ diff --git a/chip/stm32/gpio-stm32f3.c b/chip/stm32/gpio-stm32f3.c index a8deff59bf..f3a1b0068b 100644 --- a/chip/stm32/gpio-stm32f3.c +++ b/chip/stm32/gpio-stm32f3.c @@ -41,12 +41,17 @@ static void gpio_init(void) } DECLARE_HOOK(HOOK_INIT, gpio_init, HOOK_PRIO_DEFAULT); -DECLARE_IRQ(STM32_IRQ_EXTI0, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI1, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI2, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI3, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI4, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI9_5, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI15_10, gpio_interrupt, 1); +static void _gpio_interrupt(void) +{ + gpio_interrupt(); +} + +DECLARE_IRQ(STM32_IRQ_EXTI0, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI1, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI2, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI3, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI4, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI9_5, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI15_10, _gpio_interrupt, 1); #include "gpio-f0-l.c" diff --git a/chip/stm32/gpio-stm32f4.c b/chip/stm32/gpio-stm32f4.c index bf55799fe2..1ccdadd472 100644 --- a/chip/stm32/gpio-stm32f4.c +++ b/chip/stm32/gpio-stm32f4.c @@ -56,12 +56,17 @@ static void gpio_init(void) } DECLARE_HOOK(HOOK_INIT, gpio_init, HOOK_PRIO_DEFAULT); -DECLARE_IRQ(STM32_IRQ_EXTI0, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI1, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI2, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI3, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI4, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI9_5, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI15_10, gpio_interrupt, 1); +static void _gpio_interrupt(void) +{ + gpio_interrupt(); +} + +DECLARE_IRQ(STM32_IRQ_EXTI0, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI1, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI2, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI3, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI4, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI9_5, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI15_10, _gpio_interrupt, 1); #include "gpio-f0-l.c" diff --git a/chip/stm32/gpio-stm32g4.c b/chip/stm32/gpio-stm32g4.c index bb20ac8877..e77adc0ba6 100644 --- a/chip/stm32/gpio-stm32g4.c +++ b/chip/stm32/gpio-stm32g4.c @@ -56,12 +56,17 @@ static void gpio_init(void) } DECLARE_HOOK(HOOK_INIT, gpio_init, HOOK_PRIO_DEFAULT); -DECLARE_IRQ(STM32_IRQ_EXTI0, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI1, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI2, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI3, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI4, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI9_5, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI15_10, gpio_interrupt, 1); +static void _gpio_interrupt(void) +{ + gpio_interrupt(); +} + +DECLARE_IRQ(STM32_IRQ_EXTI0, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI1, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI2, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI3, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI4, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI9_5, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI15_10, _gpio_interrupt, 1); #include "gpio-f0-l.c" diff --git a/chip/stm32/gpio-stm32h7.c b/chip/stm32/gpio-stm32h7.c index e501251de9..2cb723f076 100644 --- a/chip/stm32/gpio-stm32h7.c +++ b/chip/stm32/gpio-stm32h7.c @@ -37,12 +37,17 @@ static void gpio_init(void) } DECLARE_HOOK(HOOK_INIT, gpio_init, HOOK_PRIO_DEFAULT); -DECLARE_IRQ(STM32_IRQ_EXTI0, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI1, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI2, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI3, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI4, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI9_5, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI15_10, gpio_interrupt, 1); +static void _gpio_interrupt(void) +{ + gpio_interrupt(); +} + +DECLARE_IRQ(STM32_IRQ_EXTI0, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI1, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI2, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI3, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI4, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI9_5, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI15_10, _gpio_interrupt, 1); #include "gpio-f0-l.c" diff --git a/chip/stm32/gpio-stm32l.c b/chip/stm32/gpio-stm32l.c index 77b432e081..607a1a391f 100644 --- a/chip/stm32/gpio-stm32l.c +++ b/chip/stm32/gpio-stm32l.c @@ -41,12 +41,17 @@ static void gpio_init(void) } DECLARE_HOOK(HOOK_INIT, gpio_init, HOOK_PRIO_DEFAULT); -DECLARE_IRQ(STM32_IRQ_EXTI0, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI1, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI2, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI3, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI4, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI9_5, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI15_10, gpio_interrupt, 1); +static void _gpio_interrupt(void) +{ + gpio_interrupt(); +} + +DECLARE_IRQ(STM32_IRQ_EXTI0, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI1, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI2, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI3, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI4, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI9_5, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI15_10, _gpio_interrupt, 1); #include "gpio-f0-l.c" diff --git a/chip/stm32/gpio-stm32l4.c b/chip/stm32/gpio-stm32l4.c index c4ccd5f01a..f4ec6f4412 100644 --- a/chip/stm32/gpio-stm32l4.c +++ b/chip/stm32/gpio-stm32l4.c @@ -42,12 +42,17 @@ static void gpio_init(void) } DECLARE_HOOK(HOOK_INIT, gpio_init, HOOK_PRIO_DEFAULT); -DECLARE_IRQ(STM32_IRQ_EXTI0, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI1, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI2, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI3, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI4, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI9_5, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI15_10, gpio_interrupt, 1); +static void _gpio_interrupt(void) +{ + gpio_interrupt(); +} + +DECLARE_IRQ(STM32_IRQ_EXTI0, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI1, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI2, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI3, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI4, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI9_5, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI15_10, _gpio_interrupt, 1); #include "gpio-f0-l.c" diff --git a/chip/stm32/gpio-stm32l5.c b/chip/stm32/gpio-stm32l5.c index 2449fb1644..9943edd55b 100644 --- a/chip/stm32/gpio-stm32l5.c +++ b/chip/stm32/gpio-stm32l5.c @@ -49,21 +49,26 @@ static void gpio_init(void) } DECLARE_HOOK(HOOK_INIT, gpio_init, HOOK_PRIO_DEFAULT); -DECLARE_IRQ(STM32_IRQ_EXTI0, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI1, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI2, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI3, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI4, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI5, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI6, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI7, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI8, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI9, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI10, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI11, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI12, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI13, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI14, gpio_interrupt, 1); -DECLARE_IRQ(STM32_IRQ_EXTI15, gpio_interrupt, 1); +static void _gpio_interrupt(void) +{ + gpio_interrupt(); +} + +DECLARE_IRQ(STM32_IRQ_EXTI0, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI1, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI2, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI3, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI4, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI5, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI6, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI7, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI8, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI9, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI10, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI11, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI12, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI13, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI14, _gpio_interrupt, 1); +DECLARE_IRQ(STM32_IRQ_EXTI15, _gpio_interrupt, 1); #include "gpio-f0-l.c" diff --git a/chip/stm32/gpio.c b/chip/stm32/gpio.c index ccfd3399e2..20d9223351 100644 --- a/chip/stm32/gpio.c +++ b/chip/stm32/gpio.c @@ -171,7 +171,11 @@ void __keep gpio_interrupt(void) } } #ifdef CHIP_FAMILY_STM32F0 -DECLARE_IRQ(STM32_IRQ_EXTI0_1, gpio_interrupt, STM32_IRQ_EXT0_1_PRIORITY); -DECLARE_IRQ(STM32_IRQ_EXTI2_3, gpio_interrupt, STM32_IRQ_EXT2_3_PRIORITY); -DECLARE_IRQ(STM32_IRQ_EXTI4_15, gpio_interrupt, STM32_IRQ_EXTI4_15_PRIORITY); +static void _gpio_interrupt(void) +{ + gpio_interrupt(); +} +DECLARE_IRQ(STM32_IRQ_EXTI0_1, _gpio_interrupt, STM32_IRQ_EXT0_1_PRIORITY); +DECLARE_IRQ(STM32_IRQ_EXTI2_3, _gpio_interrupt, STM32_IRQ_EXT2_3_PRIORITY); +DECLARE_IRQ(STM32_IRQ_EXTI4_15, _gpio_interrupt, STM32_IRQ_EXTI4_15_PRIORITY); #endif diff --git a/chip/stm32/hwtimer.c b/chip/stm32/hwtimer.c index 953110017f..c215484a22 100644 --- a/chip/stm32/hwtimer.c +++ b/chip/stm32/hwtimer.c @@ -213,7 +213,7 @@ void __hw_clock_source_set(uint32_t ts) STM32_TIM_CNT(TIM_CLOCK_LSB) = ts & 0xffff; } -void __hw_clock_source_irq(void) +static void __hw_clock_source_irq(void) { uint32_t stat_tim_msb = STM32_TIM_SR(TIM_CLOCK_MSB); diff --git a/chip/stm32/hwtimer32.c b/chip/stm32/hwtimer32.c index 963fa44e51..61ba07cc56 100644 --- a/chip/stm32/hwtimer32.c +++ b/chip/stm32/hwtimer32.c @@ -49,7 +49,7 @@ void __hw_clock_source_set(uint32_t ts) STM32_TIM32_CNT(TIM_CLOCK32) = ts; } -void __hw_clock_source_irq(void) +static void __hw_clock_source_irq(void) { uint32_t stat_tim = STM32_TIM_SR(TIM_CLOCK32); diff --git a/chip/stm32/i2c-stm32f0.c b/chip/stm32/i2c-stm32f0.c index dacaa80257..f78a450a4e 100644 --- a/chip/stm32/i2c-stm32f0.c +++ b/chip/stm32/i2c-stm32f0.c @@ -439,7 +439,7 @@ static void i2c_event_handler(int port) } } } -void i2c2_event_interrupt(void) { i2c_event_handler(I2C_PORT_EC); } +static void i2c2_event_interrupt(void) { i2c_event_handler(I2C_PORT_EC); } DECLARE_IRQ(IRQ_PERIPHERAL, i2c2_event_interrupt, 2); #endif diff --git a/chip/stm32/i2c-stm32f4.c b/chip/stm32/i2c-stm32f4.c index c1f19704b5..840c151c62 100644 --- a/chip/stm32/i2c-stm32f4.c +++ b/chip/stm32/i2c-stm32f4.c @@ -975,7 +975,7 @@ static void i2c_event_handler(int port) if (!(i2c_cr1 & STM32_I2C_CR1_PE)) STM32_I2C_CR1(port) |= STM32_I2C_CR1_PE; } -void i2c_event_interrupt(void) { i2c_event_handler(I2C_PORT_EC); } +static void i2c_event_interrupt(void) { i2c_event_handler(I2C_PORT_EC); } DECLARE_IRQ(IRQ_PERIPHERAL_EV, i2c_event_interrupt, 2); DECLARE_IRQ(IRQ_PERIPHERAL_ER, i2c_event_interrupt, 2); #endif diff --git a/chip/stm32/i2c-stm32l4.c b/chip/stm32/i2c-stm32l4.c index 5997ed5b70..2afcd1ce9c 100644 --- a/chip/stm32/i2c-stm32l4.c +++ b/chip/stm32/i2c-stm32l4.c @@ -299,7 +299,7 @@ static void i2c_event_handler(int port) } } -void i2c_event_interrupt(void) +static void i2c_event_interrupt(void) { i2c_event_handler(I2C_PORT_EC); } diff --git a/chip/stm32/system.c b/chip/stm32/system.c index 03e9a74ac4..0b0f7f3759 100644 --- a/chip/stm32/system.c +++ b/chip/stm32/system.c @@ -253,7 +253,7 @@ static void configure_pvd(void) STM32_PWR_CR |= STM32_PWR_PVDE; } -void pvd_interrupt(void) +static void pvd_interrupt(void) { /* Clear Pending Register */ STM32_EXTI_PR = EXTI_PVD_EVENT; diff --git a/chip/stm32/uart.c b/chip/stm32/uart.c index 0632fc6687..bafca58c46 100644 --- a/chip/stm32/uart.c +++ b/chip/stm32/uart.c @@ -161,7 +161,7 @@ int uart_read_char(void) } /* Interrupt handler for console USART */ -void uart_interrupt(void) +static void uart_interrupt(void) { #ifndef CONFIG_UART_TX_DMA /* diff --git a/chip/stm32/ucpd-stm32gx.c b/chip/stm32/ucpd-stm32gx.c index ce5b82fff8..d8c41c8f28 100644 --- a/chip/stm32/ucpd-stm32gx.c +++ b/chip/stm32/ucpd-stm32gx.c @@ -1248,7 +1248,7 @@ enum ec_error_list stm32gx_ucpd_set_bist_test_mode(const int port, return EC_SUCCESS; } -void stm32gx_ucpd1_irq(void) +static void stm32gx_ucpd1_irq(void) { /* STM32_IRQ_UCPD indicates this is from UCPD1, so port = 0 */ int port = 0; diff --git a/chip/stm32/usart-stm32f0.c b/chip/stm32/usart-stm32f0.c index 908542146f..b4e7c924a8 100644 --- a/chip/stm32/usart-stm32f0.c +++ b/chip/stm32/usart-stm32f0.c @@ -99,7 +99,7 @@ struct usart_hw_config const usart1_hw = { .ops = &usart_variant_hw_ops, }; -void usart1_interrupt(void) +static void usart1_interrupt(void) { usart_interrupt(configs[0]); } @@ -117,7 +117,7 @@ struct usart_hw_config const usart2_hw = { .ops = &usart_variant_hw_ops, }; -void usart2_interrupt(void) +static void usart2_interrupt(void) { usart_interrupt(configs[1]); } @@ -148,7 +148,7 @@ struct usart_hw_config const usart4_hw = { #endif #if defined(CONFIG_STREAM_USART3) || defined(CONFIG_STREAM_USART4) -void usart3_4_interrupt(void) +static void usart3_4_interrupt(void) { /* * This interrupt handler could be called with one of these configs diff --git a/chip/stm32/usart-stm32f3.c b/chip/stm32/usart-stm32f3.c index 42a0cf310e..18452cb3fb 100644 --- a/chip/stm32/usart-stm32f3.c +++ b/chip/stm32/usart-stm32f3.c @@ -73,7 +73,7 @@ struct usart_hw_config const usart1_hw = { .ops = &usart_variant_hw_ops, }; -void usart1_interrupt(void) +static void usart1_interrupt(void) { usart_interrupt(configs[0]); } @@ -91,7 +91,7 @@ struct usart_hw_config const usart2_hw = { .ops = &usart_variant_hw_ops, }; -void usart2_interrupt(void) +static void usart2_interrupt(void) { usart_interrupt(configs[1]); } @@ -111,7 +111,7 @@ struct usart_hw_config const usart3_hw = { #endif #if defined(CONFIG_STREAM_USART3) -void usart3_interrupt(void) +static void usart3_interrupt(void) { usart_interrupt(configs[2]); } diff --git a/chip/stm32/usart-stm32f4.c b/chip/stm32/usart-stm32f4.c index a554da147a..2c9e4b1f4a 100644 --- a/chip/stm32/usart-stm32f4.c +++ b/chip/stm32/usart-stm32f4.c @@ -66,7 +66,7 @@ struct usart_hw_config const usart1_hw = { .ops = &usart_variant_hw_ops, }; -void usart1_interrupt(void) +static void usart1_interrupt(void) { usart_interrupt(configs[0]); } @@ -84,7 +84,7 @@ struct usart_hw_config const usart2_hw = { .ops = &usart_variant_hw_ops, }; -void usart2_interrupt(void) +static void usart2_interrupt(void) { usart_interrupt(configs[1]); } @@ -104,7 +104,7 @@ struct usart_hw_config const usart3_hw = { #endif #if defined(CONFIG_STREAM_USART3) -void usart3_interrupt(void) +static void usart3_interrupt(void) { usart_interrupt(configs[2]); } diff --git a/chip/stm32/usart-stm32l.c b/chip/stm32/usart-stm32l.c index 2b7406a0a4..8d23524bb0 100644 --- a/chip/stm32/usart-stm32l.c +++ b/chip/stm32/usart-stm32l.c @@ -87,7 +87,7 @@ struct usart_hw_config const usart1_hw = { .ops = &usart_variant_hw_ops, }; -void usart1_interrupt(void) +static void usart1_interrupt(void) { usart_interrupt(configs[0]); } @@ -105,7 +105,7 @@ struct usart_hw_config const usart2_hw = { .ops = &usart_variant_hw_ops, }; -void usart2_interrupt(void) +static void usart2_interrupt(void) { usart_interrupt(configs[1]); } @@ -123,7 +123,7 @@ struct usart_hw_config const usart3_hw = { .ops = &usart_variant_hw_ops, }; -void usart3_interrupt(void) +static void usart3_interrupt(void) { usart_interrupt(configs[2]); } diff --git a/chip/stm32/usart-stm32l5.c b/chip/stm32/usart-stm32l5.c index 0245718e21..c6d81bf3e4 100644 --- a/chip/stm32/usart-stm32l5.c +++ b/chip/stm32/usart-stm32l5.c @@ -87,7 +87,7 @@ struct usart_hw_config const usart1_hw = { .ops = &usart_variant_hw_ops, }; -void usart1_interrupt(void) +static void usart1_interrupt(void) { usart_interrupt(configs[0]); } @@ -105,7 +105,7 @@ struct usart_hw_config const usart2_hw = { .ops = &usart_variant_hw_ops, }; -void usart2_interrupt(void) +static void usart2_interrupt(void) { usart_interrupt(configs[1]); } @@ -123,7 +123,7 @@ struct usart_hw_config const usart3_hw = { .ops = &usart_variant_hw_ops, }; -void usart3_interrupt(void) +static void usart3_interrupt(void) { usart_interrupt(configs[2]); } diff --git a/chip/stm32/usb.c b/chip/stm32/usb.c index 1c41a68df1..dde84efaea 100644 --- a/chip/stm32/usb.c +++ b/chip/stm32/usb.c @@ -684,7 +684,7 @@ static void usb_interrupt_handle_wake(uint16_t status) } #endif /* CONFIG_USB_SUSPEND && CONFIG_USB_REMOTE_WAKEUP */ -void usb_interrupt(void) +static void usb_interrupt(void) { uint16_t status = STM32_USB_ISTR; diff --git a/chip/stm32/usb_dwc.c b/chip/stm32/usb_dwc.c index f4ee89f1f0..0028806432 100644 --- a/chip/stm32/usb_dwc.c +++ b/chip/stm32/usb_dwc.c @@ -999,7 +999,7 @@ static void usb_enumdone(void) } -void usb_interrupt(void) +static void usb_interrupt(void) { uint32_t status = GR_USB_GINTSTS & GR_USB_GINTMSK; uint32_t oepint = status & GINTSTS(OEPINT); diff --git a/chip/stm32/usb_pd_phy.c b/chip/stm32/usb_pd_phy.c index 90506d8975..21484b1a88 100644 --- a/chip/stm32/usb_pd_phy.c +++ b/chip/stm32/usb_pd_phy.c @@ -507,7 +507,11 @@ defined(CONFIG_USB_PD_LOW_POWER_IDLE_WHEN_CONNECTED) } } #ifdef CONFIG_USB_PD_RX_COMP_IRQ -DECLARE_IRQ(STM32_IRQ_COMP, pd_rx_handler, 1); +static void _pd_rx_handler(void) +{ + pd_rx_handler(); +} +DECLARE_IRQ(STM32_IRQ_COMP, _pd_rx_handler, 1); #endif /* --- release hardware --- */ |