Ashwin Athani
/
mX_UART1
mX mbed BaseBoard UART1
Diff: main.cpp
- Revision:
- 0:9299b9963466
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Dec 08 06:29:46 2010 +0000 @@ -0,0 +1,19 @@ +#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"); + } + } +} \ No newline at end of file