![](/media/cache/profiles/17a98ed636b0294602e63e75d11339a2.jpg.50x50_q85.jpg)
a simple uart (printf) test program
Revision 0:48b5be00cf5e, committed 2018-06-17
- Comitter:
- poushen
- Date:
- Sun Jun 17 06:37:37 2018 +0000
- Commit message:
- a simple uart (printf) test program.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 48b5be00cf5e main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun Jun 17 06:37:37 2018 +0000 @@ -0,0 +1,26 @@ +#include "mbed.h" + +DigitalOut myled(LED2); + +// for LPCXpresso LPC1114 board +// UART TX: xp9, dp16 +// UART RX: xp10, dp15 +// ************************************* +// ** serial port: 9600, 8, N, 1, N +// ************************************* +//Serial pc(xp9, xp10); + +int main() { + //pc.printf("LPC1114 demo \r\n"); + + while(1) { + myled = 1; + printf("led on\n\r"); + for (int i=0; i<1000000; i++); + //wait(1); + myled = 0; + printf("led off\n\r"); + for (int i=0; i<1000000; i++); + //wait(1); + } +}
diff -r 000000000000 -r 48b5be00cf5e mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Jun 17 06:37:37 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/5aab5a7997ee \ No newline at end of file