diff options
| author | Damien George <damien@micropython.org> | 2025-07-19 01:59:41 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-08-01 23:03:17 +1000 |
| commit | a4ca42f094f0c33ba8d4e8db2f9351586c3104e2 (patch) | |
| tree | 237fca63f6ad7d9207145db245bb19fd8b412d2c | |
| parent | 9b1778fc77af2f1631143adc0f4f760e184260ac (diff) | |
stm32/i2cslave: Change irq handler name to i2c_slave_irq_handler.
Remove the "ev" part, so this handler can be generalised to also handle
error IRQs.
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | ports/stm32/i2cslave.c | 4 | ||||
| -rw-r--r-- | ports/stm32/i2cslave.h | 2 | ||||
| -rw-r--r-- | ports/stm32/mboot/main.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/ports/stm32/i2cslave.c b/ports/stm32/i2cslave.c index a575c5308..44604db69 100644 --- a/ports/stm32/i2cslave.c +++ b/ports/stm32/i2cslave.c @@ -35,7 +35,7 @@ void i2c_slave_init_helper(i2c_slave_t *i2c, int addr) { i2c->CR1 = I2C_CR1_ACK | I2C_CR1_PE; } -void i2c_slave_ev_irq_handler(i2c_slave_t *i2c) { +void i2c_slave_irq_handler(i2c_slave_t *i2c) { uint32_t sr1 = i2c->SR1; if (sr1 & I2C_SR1_ADDR) { // Address matched @@ -70,7 +70,7 @@ void i2c_slave_init_helper(i2c_slave_t *i2c, int addr) { i2c->CR1 |= I2C_CR1_PE; } -void i2c_slave_ev_irq_handler(i2c_slave_t *i2c) { +void i2c_slave_irq_handler(i2c_slave_t *i2c) { uint32_t isr = i2c->ISR; if (isr & I2C_ISR_ADDR) { // Address matched diff --git a/ports/stm32/i2cslave.h b/ports/stm32/i2cslave.h index cc4e7f9be..a2108ab23 100644 --- a/ports/stm32/i2cslave.h +++ b/ports/stm32/i2cslave.h @@ -78,7 +78,7 @@ static inline void i2c_slave_shutdown(i2c_slave_t *i2c, int irqn) { NVIC_DisableIRQ(irqn); } -void i2c_slave_ev_irq_handler(i2c_slave_t *i2c); +void i2c_slave_irq_handler(i2c_slave_t *i2c); // These should be provided externally int i2c_slave_process_addr_match(i2c_slave_t *i2c, int rw); diff --git a/ports/stm32/mboot/main.c b/ports/stm32/mboot/main.c index 2be879335..59f2d8757 100644 --- a/ports/stm32/mboot/main.c +++ b/ports/stm32/mboot/main.c @@ -1755,7 +1755,7 @@ void SysTick_Handler(void) { #if defined(MBOOT_I2C_SCL) void I2Cx_EV_IRQHandler(void) { - i2c_slave_ev_irq_handler(MBOOT_I2Cx); + i2c_slave_irq_handler(MBOOT_I2Cx); } #endif |
