UART test for the CORE-1000
Dependencies: mbed
main.cpp
- Committer:
- odb
- Date:
- 2019-01-09
- Revision:
- 0:7c5a7244a344
File content as of revision 0:7c5a7244a344:
#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"); } }