4D display with Gecko board

Dependencies:   mbed

Committer:
shakeeb
Date:
Tue Mar 29 11:53:24 2016 +0000
Revision:
0:2bf48f170d3e
trying to show keyboard strokes on 4D display

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shakeeb 0:2bf48f170d3e 1 #include "mbed.h"
shakeeb 0:2bf48f170d3e 2
shakeeb 0:2bf48f170d3e 3 Serial pc(USBTX, USBRX);
shakeeb 0:2bf48f170d3e 4 Serial screen(PB9,PB10);
shakeeb 0:2bf48f170d3e 5
shakeeb 0:2bf48f170d3e 6 DigitalOut pc_activity(LED1);
shakeeb 0:2bf48f170d3e 7 DigitalOut screen_activity(LED2);
shakeeb 0:2bf48f170d3e 8
shakeeb 0:2bf48f170d3e 9 int main(void) {
shakeeb 0:2bf48f170d3e 10 screen.baud(9600);
shakeeb 0:2bf48f170d3e 11 pc.printf("Hello World!\n\r");
shakeeb 0:2bf48f170d3e 12
shakeeb 0:2bf48f170d3e 13 while(1)
shakeeb 0:2bf48f170d3e 14 {
shakeeb 0:2bf48f170d3e 15 if(screen.readable()) {
shakeeb 0:2bf48f170d3e 16 pc.putc(screen.getc());
shakeeb 0:2bf48f170d3e 17 screen_activity = !screen_activity;
shakeeb 0:2bf48f170d3e 18 }
shakeeb 0:2bf48f170d3e 19
shakeeb 0:2bf48f170d3e 20 if(pc.readable()) {
shakeeb 0:2bf48f170d3e 21 /*
shakeeb 0:2bf48f170d3e 22 screen.putc(0x01);
shakeeb 0:2bf48f170d3e 23 screen.putc(0x06);
shakeeb 0:2bf48f170d3e 24 screen.putc(0x01);
shakeeb 0:2bf48f170d3e 25 screen.putc(0x00);
shakeeb 0:2bf48f170d3e 26 screen.putc(0x01);
shakeeb 0:2bf48f170d3e 27 screen.putc(0x1A);
shakeeb 0:2bf48f170d3e 28 */
shakeeb 0:2bf48f170d3e 29 screen.putc(pc.getc());
shakeeb 0:2bf48f170d3e 30 pc_activity = !pc_activity;
shakeeb 0:2bf48f170d3e 31 }
shakeeb 0:2bf48f170d3e 32
shakeeb 0:2bf48f170d3e 33 }
shakeeb 0:2bf48f170d3e 34 }