ddad

Dependencies:   mbed

Fork of class_7segment_serial by tatiuc embedded

HostIO.cpp

Committer:
mijimy
Date:
2017-06-06
Revision:
2:120a14d6f055

File content as of revision 2:120a14d6f055:

#include "HostIO.h"


void HostInit(void) {
pc.printf("\n\rType two digit numbers to be displayed on the 7-seg display\n\r");
}

char GetKeyInput(void) {
char c = pc.getc(); // get keyboard data (note numerical ascii range 0x30-0x39)
pc.printf("%c",c); // print ascii value to host PC terminal
return (c&0x0F); // return value as non-ascii (bitmask c with value 0x0F)
}