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:
- 160:5571c4ff569f
- Parent:
- 156:ff21514d8981
- Child:
- 165:d1b4690b3f8b
--- a/drivers/SPI.h Thu Nov 23 11:44:04 2017 +0000 +++ b/drivers/SPI.h Wed Jan 17 16:13:02 2018 +0000 @@ -246,6 +246,14 @@ */ void start_transfer(const void *tx_buffer, int tx_length, void *rx_buffer, int rx_length, unsigned char bit_width, const event_callback_t& callback, int event); +private: + /** Lock deep sleep only if it is not yet locked */ + void lock_deep_sleep(); + + /** Unlock deep sleep in case it is locked */ + void unlock_deep_sleep(); + + #if TRANSACTION_QUEUE_SIZE_SPI /** Start a new transaction @@ -274,6 +282,7 @@ CThunk<SPI> _irq; event_callback_t _callback; DMAUsage _usage; + bool _deep_sleep_locked; #endif void aquire(void);