if (sr1 & (1 << STM_I2C_SR1_SB))
stm_i2c->dr = ao_i2c_addr[index];
if (sr1 & (1 << STM_I2C_SR1_ADDR)) {
if (sr1 & (1 << STM_I2C_SR1_SB))
stm_i2c->dr = ao_i2c_addr[index];
if (sr1 & (1 << STM_I2C_SR1_ADDR)) {
ao_i2c_state[index] = I2C_RUNNING;
ao_wakeup(&ao_i2c_state[index]);
}
if (sr1 & (1 << STM_I2C_SR1_BTF)) {
ao_i2c_state[index] = I2C_RUNNING;
ao_wakeup(&ao_i2c_state[index]);
}
if (sr1 & (1 << STM_I2C_SR1_BTF)) {
ao_wakeup(&ao_i2c_state[index]);
}
if (sr1 & (1 << STM_I2C_SR1_RXNE)) {
if (ao_i2c_recv_len[index]) {
ao_wakeup(&ao_i2c_state[index]);
}
if (sr1 & (1 << STM_I2C_SR1_RXNE)) {
if (ao_i2c_recv_len[index]) {