aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/KINETIS/LLD/hal_i2c_lld.c
diff options
context:
space:
mode:
authorMichael Walker <walkerstop@gmail.com>2018-05-03 18:41:14 -0700
committerMichael Walker <walkerstop@gmail.com>2018-05-07 07:45:08 -0700
commit619d45c0ffc02ca122f5ec7c34a1d6f82060fb7d (patch)
tree675aee7e3fb3446313cef31dbec44202de9bbbc3 /os/hal/ports/KINETIS/LLD/hal_i2c_lld.c
parentf4b640014d7b042e80dfaec520d3a02fb7220dfe (diff)
downloadChibiOS-Contrib-619d45c0ffc02ca122f5ec7c34a1d6f82060fb7d.tar.gz
ChibiOS-Contrib-619d45c0ffc02ca122f5ec7c34a1d6f82060fb7d.tar.bz2
ChibiOS-Contrib-619d45c0ffc02ca122f5ec7c34a1d6f82060fb7d.zip
Fix MK66F18 compilation for the following HALs: Serial, I2C, EXT, ADC, GPT, PWM, SPI
Diffstat (limited to 'os/hal/ports/KINETIS/LLD/hal_i2c_lld.c')
-rw-r--r--os/hal/ports/KINETIS/LLD/hal_i2c_lld.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/os/hal/ports/KINETIS/LLD/hal_i2c_lld.c b/os/hal/ports/KINETIS/LLD/hal_i2c_lld.c
index a005c32..f615dd5 100644
--- a/os/hal/ports/KINETIS/LLD/hal_i2c_lld.c
+++ b/os/hal/ports/KINETIS/LLD/hal_i2c_lld.c
@@ -442,7 +442,13 @@ static inline msg_t _i2c_txrx_timeout(I2CDriver *i2cp, i2caddr_t addr,
/* wait until the bus is released */
/* Calculating the time window for the timeout on the busy bus condition.*/
start = osalOsGetSystemTimeX();
+#if defined(OSAL_TIME_MS2I)
end = start + OSAL_TIME_MS2I(KINETIS_I2C_BUSY_TIMEOUT);
+#elif defined(OSAL_TIME_MS2ST)
+ end = start + OSAL_TIME_MS2ST(KINETIS_I2C_BUSY_TIMEOUT);
+#else
+ end = start + OSAL_MS2ST(KINETIS_I2C_BUSY_TIMEOUT);
+#endif
while(true) {
osalSysLock();