From 96bccba638e9d8dd27d9769f6d9d0b14cbaf0fe3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 12 Dec 2019 20:36:58 +1100 Subject: [PATCH] HAL_ChibiOS: fixed build of SPI clock test --- libraries/AP_HAL_ChibiOS/SPIDevice.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/SPIDevice.cpp b/libraries/AP_HAL_ChibiOS/SPIDevice.cpp index 73fa6e61e2..fbc39e17eb 100644 --- a/libraries/AP_HAL_ChibiOS/SPIDevice.cpp +++ b/libraries/AP_HAL_ChibiOS/SPIDevice.cpp @@ -426,11 +426,11 @@ void SPIDevice::test_clock_freq(void) hal.console->printf("Waiting for USB\n"); for (uint8_t i=0; i<3; i++) { hal.scheduler->delay(1000); - hal.console->printf("Waiting %u\n", AP_HAL::millis()); + hal.console->printf("Waiting %u\n", (unsigned)AP_HAL::millis()); } hal.console->printf("CLOCKS=\n"); for (uint8_t i=0; iprintf("%u:%u ", i+1, bus_clocks[i]); + hal.console->printf("%u:%u ", unsigned(i+1), unsigned(bus_clocks[i])); } hal.console->printf("\n"); @@ -465,7 +465,7 @@ void SPIDevice::test_clock_freq(void) uint32_t t1 = AP_HAL::micros(); spiStop(spi_devices[i].driver); spiReleaseBus(spi_devices[i].driver); - hal.console->printf("SPI[%u] clock=%u\n", spi_devices[i].busid, unsigned(1000000ULL * len * 8ULL / uint64_t(t1 - t0))); + hal.console->printf("SPI[%u] clock=%u\n", unsigned(spi_devices[i].busid), unsigned(1000000ULL * len * 8ULL / uint64_t(t1 - t0))); } hal.util->free_type(buf1, len, AP_HAL::Util::MEM_DMA_SAFE); hal.util->free_type(buf2, len, AP_HAL::Util::MEM_DMA_SAFE);