![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Embedded software Assessment 2
Dependencies: MCP23017 SDFileSystem USBDevice WattBob_TextLCD mbed
Diff: Function.h
- Revision:
- 0:86bba6bf9b6f
- Child:
- 1:9a3cfeca7ecd
diff -r 000000000000 -r 86bba6bf9b6f Function.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Function.h Sat Feb 15 16:03:46 2014 +0000 @@ -0,0 +1,19 @@ +#include "MCP23017.h" +#include "WattBob_TextLCD.h" +#include "mbed.h" + +MCP23017 Port(p9,p10,0x40) ; // 16-bit parallel I/O object +WattBob_TextLCD LCD(&Port); // pointer to 2*16 chacater LCD object + +void Write_LCD(const char STR[],int8_t PY,int8_t PX,bool clr){ + if(clr) + LCD.cls(); + LCD.locate(PY,PX); + LCD.printf(STR); +} + +void Init_LCD(){ + Port.write_bit(1,BL_BIT); + Write_LCD("Muaiyd",0,4,1); + Write_LCD("Heriot-Watt Uni.",1,0,0); +} \ No newline at end of file