MCP23S17 Test

Dependencies:   MCP23S17 mbed mbed-rtos

Revision:
2:c8c30a78bbb3
Parent:
1:5321e8f5b339
Child:
3:42a3ae578926
--- a/main.cpp	Fri Oct 28 06:09:46 2016 +0000
+++ b/main.cpp	Fri Oct 28 06:57:55 2016 +0000
@@ -3,6 +3,9 @@
  *
  * https://developer.mbed.org/users/romilly/code/MCP23S17/
  *
+ * mbed:  rev 121
+ * mbed-rtos: rev 117
+ *
  * Created: 2016.10.28
  *
  */
@@ -13,8 +16,8 @@
 
 #define OPCODE (0x40)
 
-SPI Spi(PC_12, PC_11, PC_10); // mosi, miso, sclk
-//SPI Spi(PA_7, PA_6, PA_5); // mosi, miso, sclk
+SPI Spi(PC_12, PC_11, PC_10); // SPI3: mosi, miso, sclk
+//SPI Spi(PA_7, PA_6, PA_5); // SPI1:  mosi, miso, sclk
 
 // MCP23S17(SPI& spi, PinName ncs, char writeOpcode);
 MCP23S17 Mcp23s17(Spi, PD_2, OPCODE);
@@ -37,7 +40,7 @@
         wait(0.2);
     }
     Mcp23s17.write(PORT_A, 0x00);
-   
+    
     while (true) {
         char data = ~Mcp23s17.read(PORT_B);
         Mcp23s17.write(PORT_A, data);