mbed library sources. Supersedes mbed-src.
Fork of mbed-dev by
Diff: drivers/SPI.h
- Revision:
- 170:19eb464bc2be
- Parent:
- 169:e3b6fe271b81
- Child:
- 174:b96e65c34a4d
--- a/drivers/SPI.h Wed Jul 19 17:31:21 2017 +0100 +++ b/drivers/SPI.h Thu Aug 03 13:13:39 2017 +0100 @@ -143,6 +143,15 @@ */ virtual void unlock(void); + /** Set default write data + * SPI requires the master to send some data during a read operation. + * Different devices may require different default byte values. + * For example: A SD Card requires default bytes to be 0xFF. + * + * @param data Default character to be transmitted while read operation + */ + void set_default_write_value(char data); + #if DEVICE_SPI_ASYNCH /** Start non-blocking SPI transfer using 8bit buffers. @@ -271,6 +280,7 @@ int _bits; int _mode; int _hz; + char _write_fill; private: /* Private acquire function without locking/unlocking