From d28283e30228bc3092cf67baa879c2159e3d4a63 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 26 May 2018 18:43:23 +1000 Subject: [PATCH] AP_HAL: added clock_pulse() method to SPIDevice this is used by SPI SDCard interface for HAL_ChibiOS --- libraries/AP_HAL/SPIDevice.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/AP_HAL/SPIDevice.h b/libraries/AP_HAL/SPIDevice.h index 6d85712df6..7bb94ec89e 100644 --- a/libraries/AP_HAL/SPIDevice.h +++ b/libraries/AP_HAL/SPIDevice.h @@ -45,6 +45,12 @@ public: virtual bool transfer_fullduplex(const uint8_t *send, uint8_t *recv, uint32_t len) = 0; + /* + * send N bytes of clock pulses without taking CS. This is used + * when initialising microSD interfaces over SPI + */ + virtual bool clock_pulse(uint32_t len) { return false; } + /* See Device::get_semaphore() */ virtual Semaphore *get_semaphore() override = 0;