HAL_ChibiOS: fixed build without ISR limit

This commit is contained in:
Andrew Tridgell 2019-08-27 07:59:21 +10:00
parent 97c56c068e
commit b30f3697d2
1 changed files with 2 additions and 0 deletions

View File

@ -284,8 +284,10 @@ bool I2CDevice::_transfer(const uint8_t *send, uint32_t send_len,
break;
}
#ifdef STM32_I2C_ISR_LIMIT
AP_HAL::Util::PersistentData &pd = hal.util->persistent_data;
pd.i2c_isr_count += I2CD[bus.busnum].i2c->isr_count;
#endif
if (ret == MSG_OK) {
bus.bouncebuffer_finish(send, recv, recv_len);