mbed official / mbed

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Revision:
123:b0220dba8be7
Parent:
122:f9eeca106725
--- a/SPI.h	Thu Jul 07 14:34:11 2016 +0100
+++ b/SPI.h	Fri Aug 12 13:04:35 2016 +0200
@@ -20,7 +20,9 @@
 
 #if DEVICE_SPI
 
+#include "PlatformMutex.h"
 #include "spi_api.h"
+#include "SingletonPtr.h"
 
 #if DEVICE_SPI_ASYNCH
 #include "CThunk.h"
@@ -246,7 +248,7 @@
 
     void aquire(void);
     static SPI *_owner;
-    PlatformMutex _mutex;
+    static SingletonPtr<PlatformMutex> _mutex;
     int _bits;
     int _mode;
     int _hz;