Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of MCP23S17_Basic_IO_Demo by
Diff: main.cpp
- Revision:
- 6:9f1bf46845ab
- Parent:
- 5:ec6bfed1bada
- Child:
- 7:2e7fe8cc61fc
--- a/main.cpp Wed Jan 31 06:19:25 2018 +0000
+++ b/main.cpp Wed Jan 31 06:22:29 2018 +0000
@@ -50,7 +50,8 @@
// Start Loopback test sending out and reading back values
// loopback test uses A0 and B0 pins - so use a wire to jumper those two pins on MCP23S17 together
while (1) {
- B0 = chip.read(PORT_B)& 0x01;
+ B0 = !(chip.read(PORT_B)& 0x01);
+
chip.write(PORT_A,B0);
// chip.write(PORT_A,0); // turn off LED
// write 0xAA to MCP23S17 Port A
