The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
Diff: drivers/SPI.h
- Revision:
- 148:fd96258d940d
- Parent:
- 147:a97add6d7e64
- Child:
- 152:235179ab3f27
--- a/drivers/SPI.h Wed Jul 19 16:46:19 2017 +0100 +++ b/drivers/SPI.h Thu Aug 03 13:37:00 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