Syed Shakeeb Sadiq
/
mbed_serial_display
4D display with Gecko board
main.cpp
- Committer:
- shakeeb
- Date:
- 2016-03-29
- Revision:
- 0:2bf48f170d3e
File content as of revision 0:2bf48f170d3e:
#include "mbed.h" Serial pc(USBTX, USBRX); Serial screen(PB9,PB10); DigitalOut pc_activity(LED1); DigitalOut screen_activity(LED2); int main(void) { screen.baud(9600); pc.printf("Hello World!\n\r"); while(1) { if(screen.readable()) { pc.putc(screen.getc()); screen_activity = !screen_activity; } if(pc.readable()) { /* screen.putc(0x01); screen.putc(0x06); screen.putc(0x01); screen.putc(0x00); screen.putc(0x01); screen.putc(0x1A); */ screen.putc(pc.getc()); pc_activity = !pc_activity; } } }