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.

Revision:
101:7cff1c4259d7
Parent:
98:8ab26030e058
Child:
102:da0ca467f8b5
--- a/SPI.h	Wed May 27 08:07:35 2015 +0100
+++ b/SPI.h	Tue Jun 09 14:29:26 2015 +0100
@@ -45,10 +45,21 @@
  *
  * #include "mbed.h"
  *
+ * // hardware ssel (where applicable)
+ * //SPI device(p5, p6, p7, p8); // mosi, miso, sclk, ssel
+ *
+ * // software ssel
  * SPI device(p5, p6, p7); // mosi, miso, sclk
+ * DigitalOut cs(p8); // ssel
  *
  * int main() {
+ *     // hardware ssel (where applicable)
+ *     //int response = device.write(0xFF);
+ *
+ *     // software ssel
+ *     cs = 0;
  *     int response = device.write(0xFF);
+ *     cs = 1;
  * }
  * @endcode
  */
@@ -58,16 +69,14 @@
 
     /** Create a SPI master connected to the specified pins
      *
-     * Pin Options:
-     *  (5, 6, 7) or (11, 12, 13)
-     *
      *  mosi or miso can be specfied as NC if not used
      *
      *  @param mosi SPI Master Out, Slave In pin
      *  @param miso SPI Master In, Slave Out pin
      *  @param sclk SPI Clock pin
+     *  @param ssel SPI chip select pin
      */
-    SPI(PinName mosi, PinName miso, PinName sclk, PinName _unused=NC);
+    SPI(PinName mosi, PinName miso, PinName sclk, PinName ssel=NC);
 
     /** Configure the data transmission format
      *