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.
Dependencies: ExioBufferdController MCP23S17 mbed-rtos mbed
Diff: main.cpp
- Revision:
- 2:0a339555ddf6
- Parent:
- 1:1046d9aef179
- Child:
- 3:ee7fd89f2539
diff -r 1046d9aef179 -r 0a339555ddf6 main.cpp
--- a/main.cpp Fri Nov 04 19:50:19 2016 +0000
+++ b/main.cpp Fri Nov 04 19:59:59 2016 +0000
@@ -24,16 +24,20 @@
{
printf("*** Test ExioInBuffer ***\r\n");
- // Reset MCP23S17
+ // Reset MCP23S17 (初期化時にreset()が必要)
Exio.reset();
- ExioInBuffer exioInBuffer(&Exio, ExioPortB, 10);
+ ExioInBuffer exioInBufferA(&Exio, ExioPortA, 1);
+ ExioInBuffer exioInBufferB(&Exio, ExioPortB, 1);
- exioInBuffer.run();
+ exioInBufferA.run();
+ exioInBufferB.run();
while (true) {
- uint8_t v = exioInBuffer.readPort();
- printf("%d\r\n", v);
+ uint8_t va = exioInBufferA.readPort();
+ uint8_t vb = exioInBufferB.readPort();
+
+ printf("%d %d\r\n", va, vb);
//Thread::wait(10);
}
}