From 619d45c0ffc02ca122f5ec7c34a1d6f82060fb7d Mon Sep 17 00:00:00 2001 From: Michael Walker Date: Thu, 3 May 2018 18:41:14 -0700 Subject: Fix MK66F18 compilation for the following HALs: Serial, I2C, EXT, ADC, GPT, PWM, SPI --- os/hal/ports/KINETIS/LLD/hal_i2c_lld.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'os/hal/ports/KINETIS/LLD/hal_i2c_lld.c') 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(); -- cgit v1.2.3