UART test for the CORE-1000
Dependencies: mbed
Revision 0:7c5a7244a344, committed 2019-01-09
- Comitter:
- odb
- Date:
- Wed Jan 09 04:23:27 2019 +0000
- Commit message:
- UART test for the CORE-1000
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 7c5a7244a344 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jan 09 04:23:27 2019 +0000 @@ -0,0 +1,26 @@ +#include <mbed.h> + + +//const char hometown[15] = "Coreone tech"; +//const char banner[37] = "Serial Communication Test"; +const char PROMPT = '>'; +DigitalOut myled(LED1); +//Serial pc(USBTX, USBRX); // tx, rx +Serial pc(PA_11, PA_12); // tx, rx +int main() { + pc.baud(115200); + // displayBanner(); + // newline(); + pc.putc(PROMPT); + while(1) + { + if(pc.readable()) + { + + char c = pc.getc(); + printf("%c\n\r", c); + myled = !myled; + } + pc.printf("test\n\r"); + } +} \ No newline at end of file
diff -r 000000000000 -r 7c5a7244a344 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jan 09 04:23:27 2019 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/4f6c30876dfa \ No newline at end of file