Skip to content

Commit a4ca42f

Browse files
committed
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 <[email protected]>
1 parent 9b1778f commit a4ca42f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

ports/stm32/i2cslave.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void i2c_slave_init_helper(i2c_slave_t *i2c, int addr) {
3535
i2c->CR1 = I2C_CR1_ACK | I2C_CR1_PE;
3636
}
3737

38-
void i2c_slave_ev_irq_handler(i2c_slave_t *i2c) {
38+
void i2c_slave_irq_handler(i2c_slave_t *i2c) {
3939
uint32_t sr1 = i2c->SR1;
4040
if (sr1 & I2C_SR1_ADDR) {
4141
// Address matched
@@ -70,7 +70,7 @@ void i2c_slave_init_helper(i2c_slave_t *i2c, int addr) {
7070
i2c->CR1 |= I2C_CR1_PE;
7171
}
7272

73-
void i2c_slave_ev_irq_handler(i2c_slave_t *i2c) {
73+
void i2c_slave_irq_handler(i2c_slave_t *i2c) {
7474
uint32_t isr = i2c->ISR;
7575
if (isr & I2C_ISR_ADDR) {
7676
// Address matched

ports/stm32/i2cslave.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static inline void i2c_slave_shutdown(i2c_slave_t *i2c, int irqn) {
7878
NVIC_DisableIRQ(irqn);
7979
}
8080

81-
void i2c_slave_ev_irq_handler(i2c_slave_t *i2c);
81+
void i2c_slave_irq_handler(i2c_slave_t *i2c);
8282

8383
// These should be provided externally
8484
int i2c_slave_process_addr_match(i2c_slave_t *i2c, int rw);

ports/stm32/mboot/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1755,7 +1755,7 @@ void SysTick_Handler(void) {
17551755

17561756
#if defined(MBOOT_I2C_SCL)
17571757
void I2Cx_EV_IRQHandler(void) {
1758-
i2c_slave_ev_irq_handler(MBOOT_I2Cx);
1758+
i2c_slave_irq_handler(MBOOT_I2Cx);
17591759
}
17601760
#endif
17611761

0 commit comments

Comments
 (0)