mX mbed BaseBoard UART1

Dependencies:   mbed

main.cpp

Committer:
ashwin_athani
Date:
2010-12-08
Revision:
0:9299b9963466

File content as of revision 0:9299b9963466:

#include "mbed.h"

Serial UART1(p13, p14);  // tx, rx

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