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: max32625pico SerialInterface USBDevice
Revision 8:9b85634550c7, committed 2016-12-14
- Comitter:
- switches
- Date:
- Wed Dec 14 19:53:25 2016 +0000
- Parent:
- 7:5de026dd3a82
- Child:
- 9:e59eb5f5ce32
- Commit message:
- Updated SerialInterface library with GPIO and SPI configuration options.
Changed in this revision
| SerialInterface.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/SerialInterface.lib Tue Dec 13 21:30:06 2016 +0000 +++ b/SerialInterface.lib Wed Dec 14 19:53:25 2016 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/switches/code/SerialInterface/#0bd9ec504040 +https://developer.mbed.org/users/switches/code/SerialInterface/#9e27e2a46fa6
--- a/main.cpp Tue Dec 13 21:30:06 2016 +0000
+++ b/main.cpp Wed Dec 14 19:53:25 2016 +0000
@@ -19,7 +19,7 @@
// Serial Interfaces
I2C i2c(P3_4, P3_5);
SPI spi(P5_1, P5_2, P5_0);
-DigitalOut ssel(P5_3);
+DigitalInOut gpio[] = {P5_3, P5_4, P5_5, P5_6, P3_0, P3_1, P3_2, P3_3};
// Threads
Thread threadUSB;
@@ -107,7 +107,9 @@
pegasus.init(MAX32630FTHR::VIO_3V3);
// Serial Interface Setup
- serInt.init(&i2c, &spi, &ssel);
+ serInt.init(&i2c, &spi, gpio);
+ gpio[0].write(1);
+ gpio[0].output();
rLED = LED_OFF;