From a005118640ed5fb6c891eb25e5a8356c2721f88a Mon Sep 17 00:00:00 2001 From: Stefan `Sec` Zehl Date: Tue, 20 Dec 2011 01:23:00 +0100 Subject: [PATCH] Move lcdread menu entry to debug loadable (add: lcdInit EXPORT, lcdRead needs it) --- firmware/l0dable/EXPORTS | 2 +- firmware/l0dable/debug.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/firmware/l0dable/EXPORTS b/firmware/l0dable/EXPORTS index 6dd540a..75ad3d9 100644 --- a/firmware/l0dable/EXPORTS +++ b/firmware/l0dable/EXPORTS @@ -124,4 +124,4 @@ i2cEngine i2cInit timer32Callback0 lcdRead - +lcdInit diff --git a/firmware/l0dable/debug.c b/firmware/l0dable/debug.c index b57a296..66c7b3f 100644 --- a/firmware/l0dable/debug.c +++ b/firmware/l0dable/debug.c @@ -25,6 +25,7 @@ void Qstatus(void); void getsp(void); void uptime(void); void uuid(void); +void lcdrtest(void); static const struct MENU submenu_debug={ "debug", { { "ChkBattery", &ChkBattery}, @@ -33,6 +34,7 @@ static const struct MENU submenu_debug={ "debug", { { "ChkFunk", &ChkFunk}, { "Qstatus", &Qstatus}, // { "ShowSP", &getsp}, + { "lcdrtest", &lcdrtest}, { "Uptime", &uptime}, { "Uuid", &uuid}, {NULL,NULL} @@ -314,3 +316,18 @@ void ChkFunk(){ while(!getInputRaw())work_queue(); }; +// //# MENU lcdread +void lcdrtest(void){ + lcdClear(); + lcdPrint("ID1:"); lcdPrintInt(lcdRead(128+64+16+8 +2 )); lcdNl(); + lcdPrint("ID2:"); lcdPrintInt(lcdRead(128+64+16+8 +2+1)); lcdNl(); + lcdPrint("ID3:"); lcdPrintInt(lcdRead(128+64+16+8+4 )); lcdNl(); + lcdPrint("ID4:"); lcdPrintInt(lcdRead(128+64+16+8+4 +1)); lcdNl(); + lcdPrint("Tmp:"); lcdPrintInt(lcdRead(128+64+16+8+4+2 )); lcdNl(); + lcdPrint("VM:"); lcdPrintInt(lcdRead(128+64+16+8+4+2+1)); lcdNl(); + // lcd_select(); mylcdWrite(0,128+32+8+4+1); lcd_deselect(); + delayms(10); + lcdInit(); + lcdRefresh(); + while(!getInputRaw())delayms(10); +};