ddad

Dependencies:   mbed

Fork of class_7segment_serial by tatiuc embedded

Committer:
mijimy
Date:
Tue Jun 06 10:00:51 2017 +0000
Revision:
2:120a14d6f055
sdsfsgdf

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mijimy 2:120a14d6f055 1 #include "HostIO.h"
mijimy 2:120a14d6f055 2
mijimy 2:120a14d6f055 3
mijimy 2:120a14d6f055 4 void HostInit(void) {
mijimy 2:120a14d6f055 5 pc.printf("\n\rType two digit numbers to be displayed on the 7-seg display\n\r");
mijimy 2:120a14d6f055 6 }
mijimy 2:120a14d6f055 7
mijimy 2:120a14d6f055 8 char GetKeyInput(void) {
mijimy 2:120a14d6f055 9 char c = pc.getc(); // get keyboard data (note numerical ascii range 0x30-0x39)
mijimy 2:120a14d6f055 10 pc.printf("%c",c); // print ascii value to host PC terminal
mijimy 2:120a14d6f055 11 return (c&0x0F); // return value as non-ascii (bitmask c with value 0x0F)
mijimy 2:120a14d6f055 12 }