This program reads the voltages on the board to ensure they are operating correctly and it implements a USB MSD card reader to verify USB and microSD connectivity.
Dependencies: USBDevice SDFileSystem max32630fthr mbed
Fork of FTHR_USBMSD_Demo by
Diff: main.cpp
- Revision:
- 8:4bb2ec578490
- Parent:
- 7:62efbc5411c8
diff -r 62efbc5411c8 -r 4bb2ec578490 main.cpp --- a/main.cpp Mon Dec 19 22:45:22 2016 +0000 +++ b/main.cpp Fri Feb 03 22:43:55 2017 +0000 @@ -31,7 +31,7 @@ gLED = LED_OFF; bLED = LED_OFF; while(1) { - Thread::wait(500); + wait_ms(500); gLED = !gLED; } } @@ -40,7 +40,7 @@ float readMon(MAX14690::monCfg_t monCfg) { pegasus.max14690.monSet(monCfg, MAX14690::MON_DIV4); - Thread::wait(5); + wait_ms(5); return (4.8f * monIn); } @@ -134,12 +134,12 @@ if (!button) { keyboard.mediaControl(KEY_MUTE); ledCnt++; - rLED = (ledCnt & 1); - gLED = (ledCnt & 2); - bLED = (ledCnt & 4); - Thread::wait(500); + gLED = (ledCnt & 1); + bLED = (ledCnt & 2); + rLED = gLED ^ bLED; + wait_ms(500); } else { - Thread::wait(50); + wait_ms(50); } } }