mX mbed BaseBoard UART0

Dependencies:   mbed

main.cpp

Committer:
ashwin_athani
Date:
2010-12-08
Revision:
0:ab972252d85e

File content as of revision 0:ab972252d85e:

#include "mbed.h"

Serial UART0(p9, p10);  // tx, rx

int main()
{
    while(1)
    {
        UART0.baud(115200);
        if(UART0.getc() == 'a')
        {
            UART0.printf("Hello World\n");
        }
        else
        {
            UART0.printf("Press 'a'\n");
        }      
    }
}