From 807d9e4b9207651d67bb374a60b3a7761842d12b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 19 Feb 2019 09:39:16 +1100 Subject: [PATCH] HAL_ChibiOS: added optional polled SPI mode --- libraries/AP_HAL_ChibiOS/SPIDevice.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/SPIDevice.cpp b/libraries/AP_HAL_ChibiOS/SPIDevice.cpp index 89bb46eea1..85cc0c54b5 100644 --- a/libraries/AP_HAL_ChibiOS/SPIDevice.cpp +++ b/libraries/AP_HAL_ChibiOS/SPIDevice.cpp @@ -174,11 +174,19 @@ void SPIDevice::do_transfer(const uint8_t *send, uint8_t *recv, uint32_t len) return; } + +#if defined(HAL_SPI_USE_POLLED) + for (uint16_t i=0; i