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 USBDevice
main.cpp
- Committer:
- switches
- Date:
- 2016-11-20
- Revision:
- 3:7264c8044625
- Parent:
- 1:464c8b3634dc
- Child:
- 4:1c6819a42db0
File content as of revision 3:7264c8044625:
#include "mbed.h"
#include "max32630fthr.h"
#include "USBMSD_SD.h"
MAX32630FTHR pegasus(MAX32630FTHR::VIO_3V3);
DigitalOut rLED(LED1);
DigitalOut gLED(LED2);
// main() runs in its own thread in the OS
// (note the calls to Thread::wait below for delays)
int main()
{
gLED = LED_OFF;
rLED = LED_ON;
pegasus.init();
gLED = LED_ON;
Thread::wait(100);
USBMSD_SD sd(P0_5, P0_6, P0_4, P0_7); // mosi, miso, sclk, cs
rLED = LED_OFF;
while (true) {
gLED = !gLED;
Thread::wait(500);
}
}