AP_HAL_ChibiOS: correct HAL_SPI_CHECK_CLOCK_FREQ build error

This commit is contained in:
Andy Piper 2022-08-10 21:42:40 +01:00 committed by Andrew Tridgell
parent a6312ac893
commit 3521090dd5

View File

@ -500,7 +500,7 @@ void SPIDevice::test_clock_freq(void)
uint32_t t0 = AP_HAL::micros(); uint32_t t0 = AP_HAL::micros();
spiStartExchange(spi_devices[i].driver, len, buf1, buf2); spiStartExchange(spi_devices[i].driver, len, buf1, buf2);
chSysLock(); chSysLock();
msg_t msg = osalThreadSuspendTimeoutS(&spi_devices[i].driver->thread, TIME_MS2I(100)); msg_t msg = osalThreadSuspendTimeoutS(&spi_devices[i].driver->thread, chTimeMS2I(100));
chSysUnlock(); chSysUnlock();
if (msg == MSG_TIMEOUT) { if (msg == MSG_TIMEOUT) {
spiAbort(spi_devices[i].driver); spiAbort(spi_devices[i].driver);