From b30f3697d29751dde3e221bc8d43204854a72b63 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 27 Aug 2019 07:59:21 +1000 Subject: [PATCH] HAL_ChibiOS: fixed build without ISR limit --- libraries/AP_HAL_ChibiOS/I2CDevice.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_HAL_ChibiOS/I2CDevice.cpp b/libraries/AP_HAL_ChibiOS/I2CDevice.cpp index b289edb3e7..f3ca77aade 100644 --- a/libraries/AP_HAL_ChibiOS/I2CDevice.cpp +++ b/libraries/AP_HAL_ChibiOS/I2CDevice.cpp @@ -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);