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>
This commit is contained in:
Damien George
2025-07-19 01:59:41 +10:00
parent 9b1778fc77
commit a4ca42f094
3 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -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);

View File

@@ -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