Hackaday demo: Signal generator

Dependencies:   SDFileSystem mbed

main.cpp

Committer:
wd5gnr
Date:
2015-09-15
Revision:
1:c229c3ceb909
Parent:
0:8baa10bd07de

File content as of revision 1:c229c3ceb909:

#include "mbed.h"

#define _EXTERN_ 
#include "main.h"
#include "sdcard.h"
#include "cio.h"
#include "output.h"
#include "command.h"


#define BAUD 57600

// Atbitrary Pattern Generator -- Williams

// Serial port
Serial pc(USBTX, USBRX);
// Switch to supress auto loading
DigitalIn NoBoot(SW2); // NOTE: If you don't have a switch on PTA4 you may need to comment this out and the auto_open line below



int main()
{
    timebaseus=25.0f;  // set default
    pc.baud(BAUD);    // set baudrate
    if (NoBoot==1) auto_open(); // see note above
    command();  // Do commands, returns on g command
    exec();  // never returns
}