Demo for MAX32625PICO board library

Dependencies:   USBDevice max32625pico

Fork of PICO_self_test by Greg Steiert

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);
    }
}