libmaple/i2c.c
void _i2c_irq_error_handler(i2c_dev *dev) {
    I2C_CRUMB(ERROR_ENTRY, dev->regs->SR1, dev->regs->SR2);

    dev->error_flags = dev->regs->SR2 & (I2C_SR1_BERR |
                                         I2C_SR1_ARLO |
                                         I2C_SR1_AF |
                                         I2C_SR1_OVR);
    /* Clear flags */
    dev->regs->SR1 = 0;
    dev->regs->SR2 = 0;

    i2c_stop_condition(dev);
    i2c_disable_irq(dev, I2C_IRQ_BUFFER | I2C_IRQ_EVENT | I2C_IRQ_ERROR);
    dev->state = I2C_STATE_ERROR;
}
/*
 * Interrupt handler for I2C error conditions. Aborts any pending I2C
 * transactions.
 */
Interrupt handler for I2C error conditions. Aborts any pending I2C
transactions.
Interrupt handler for I2C error conditions . Aborts any pending I2C transactions .
void _i2c_irq_error_handler(i2c_dev *dev) {
    I2C_CRUMB(ERROR_ENTRY, dev->regs->SR1, dev->regs->SR2);
    dev->error_flags = dev->regs->SR2 & (I2C_SR1_BERR |
                                         I2C_SR1_ARLO |
                                         I2C_SR1_AF |
                                         I2C_SR1_OVR);
    dev->regs->SR1 = 0;
    dev->regs->SR2 = 0;
    i2c_stop_condition(dev);
    i2c_disable_irq(dev, I2C_IRQ_BUFFER | I2C_IRQ_EVENT | I2C_IRQ_ERROR);
    dev->state = I2C_STATE_ERROR;
}
void _i2c_irq_error_handler ( i2c_dev * dev ) { I2C_CRUMB ( ERROR_ENTRY , dev -> regs -> SR1 , dev -> regs -> SR2 ) ; dev -> error_flags = dev -> regs -> SR2 & ( I2C_SR1_BERR | I2C_SR1_ARLO | I2C_SR1_AF | I2C_SR1_OVR ) ; dev -> regs -> SR1 = 0 ; dev -> regs -> SR2 = 0 ; i2c_stop_condition ( dev ) ; i2c_disable_irq ( dev , I2C_IRQ_BUFFER | I2C_IRQ_EVENT | I2C_IRQ_ERROR ) ; dev -> state = I2C_STATE_ERROR ; }
Interrupt handler for I2C error conditions.
Interrupt handler for I2C error conditions .
/* Clear flags */