From 954728c9e9052faf22196a6835cd3fd0d53f4f61 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 18 Nov 2016 20:54:48 +1100 Subject: [PATCH] AP_HAL: added set_chip_select() API for devices with unusual timings --- libraries/AP_HAL/Device.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libraries/AP_HAL/Device.h b/libraries/AP_HAL/Device.h index 0247e60819..b13b41fd09 100644 --- a/libraries/AP_HAL/Device.h +++ b/libraries/AP_HAL/Device.h @@ -181,6 +181,13 @@ public: */ virtual bool unregister_callback(PeriodicHandle h) { return false; } + /* + * support for direct control of SPI chip select. Needed for + * devices with unusual SPI transfer patterns that include + * specific delays + */ + virtual bool set_chip_select(bool set) { return false; } + /** * Some devices connected on the I2C or SPI bus require a bit to be set on * the register address in order to perform a read operation. This sets a