Added isSPI3w API to DevSPI

Fork of X_NUCLEO_COMMON by ST

Revision:
23:5cd443e32f27
Parent:
18:06322fe82f27
--- a/DevSPI/DevSPI.h	Tue Aug 08 14:37:26 2017 +0000
+++ b/DevSPI/DevSPI.h	Fri Sep 22 09:23:53 2017 +0000
@@ -65,6 +65,8 @@
      */
     DevSPI(PinName mosi, PinName miso, PinName sclk) : SPI(mosi, miso, sclk)
     {
+        if (miso == NC) is_spi3w = true;
+        else is_spi3w = false;        
         /* Set default configuration. */
         setup(8, 3, 1E6);
     }
@@ -285,6 +287,10 @@
         return 0;
     }
 
+    inline bool isSPI3w() {
+	    return is_spi3w;
+	}
+	
 protected:
     inline uint16_t htons(uint16_t x) {
 #ifndef __DEV_SPI_BIG_ENDIAN