From b51e6885d096b10c74f76cf24e009cec6eb0147a Mon Sep 17 00:00:00 2001 From: Stefan `Sec` Zehl Date: Thu, 4 Aug 2011 00:18:06 +0200 Subject: [PATCH] Ooops forgot file --- firmware/applications/l0dable.c | 43 +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 firmware/applications/l0dable.c diff --git a/firmware/applications/l0dable.c b/firmware/applications/l0dable.c new file mode 100644 index 0000000..f96a280 --- /dev/null +++ b/firmware/applications/l0dable.c @@ -0,0 +1,43 @@ +#include +#include + +#include "basic/basic.h" +#include "lcd/lcd.h" +#include "lcd/print.h" +#include "usb/usbmsc.h" + +/**************************************************************************/ +void gotoISP(void) { + DoString(0,0,"Enter ISP!"); + lcdDisplay(); + ISPandReset(); +} + +void msc_menu(void){ + DoString(0,8,"MSC Enabled."); + lcdDisplay(); + usbMSCInit(); + while(!getInputRaw())delayms(10); + DoString(0,16,"MSC Disabled."); + usbMSCOff(); +}; + +extern void (*ram)(void); + +static const struct MENU mainmenu = {"Mainmenu", { + {"Run Loadable", &ram}, + {"Invoke ISP", &gotoISP}, + {"MSC", &msc_menu}, + {NULL,NULL} +}}; + + + +/**************************************************************************/ + +void main_l0dable(void) { + lcdClear(); + lcdDisplay(); + handleMenu(&mainmenu); + gotoISP(); +};