diff --git a/modules/executor.c b/modules/executor.c new file mode 100644 index 0000000..4239a04 --- /dev/null +++ b/modules/executor.c @@ -0,0 +1,117 @@ +#include + +#include "basic/basic.h" + +#include "lcd/render.h" +#include "lcd/allfonts.h" + +void backlightInit(void); + +#include "loadable/blinktest.h" + +void execute (const void *function, uint16_t length){ + void (*dst)(void); + + dst=(void (*)(void)) 0x10001c00; + + DoString(0,8,"Enter RAM!"); + DoIntX(0,16,(uint32_t)function); + DoIntX(0,24,(uint32_t)dst); + lcdDisplay(0); + + for(int i=0;itrigger){ + ctr=0; + if (gpioGetValue(RB_LED2) == CFG_LED_OFF){ + gpioSetValue (RB_LED2, CFG_LED_ON); + } else { + gpioSetValue (RB_LED2, CFG_LED_OFF); + }; + }; + + // Print Voltage + font = &Font_7x8; + dx=DoString(0,yctr+28,"Voltage:"); + DoInt(dx,yctr+28,GetVoltage()); + + } + return; +} + +void tick_executor(void){ + static int foo=0; + static int toggle=0; + if(foo++>50){ + toggle=1-toggle; + foo=0; + gpioSetValue (RB_LED0, toggle); + }; + return; +}; + + +