diff --git a/firmware/applications/adc.c b/firmware/applications/adc.c index fefbb24..2d8b6c8 100644 --- a/firmware/applications/adc.c +++ b/firmware/applications/adc.c @@ -25,7 +25,7 @@ void main_adc(void) { while (1) { uint32_t results; - lcdDisplay(0); + lcdDisplay(); delayms(10); if(gpioGetValue(RB_BTN1)==0){ @@ -48,7 +48,7 @@ void main_adc(void) { if (gpioGetValue(RB_BTN4)==0) { while(gpioGetValue(RB_BTN4)==0); DoString(0,8,"Enter ISP!"); - lcdDisplay(0); + lcdDisplay(); EnableWatchdog(1000*5); ReinvokeISP(); diff --git a/firmware/applications/bsx.c b/firmware/applications/bsx.c index 54689ce..df4c4a6 100644 --- a/firmware/applications/bsx.c +++ b/firmware/applications/bsx.c @@ -21,19 +21,19 @@ void main_bsx(void) { font = &Font_7x8; DoString(0, 0, "bsx"); - lcdDisplay(0); + lcdDisplay(); delayms(1000); usbMSCInit(); while (1) { uint32_t results; - lcdDisplay(0); + lcdDisplay(); delayms(10); if (gpioGetValue(RB_BTN4)==0) { while(gpioGetValue(RB_BTN4)==0); DoString(0,8,"Enter ISP!"); - lcdDisplay(0); + lcdDisplay(); ReinvokeISP(); } } diff --git a/firmware/applications/cdc.c b/firmware/applications/cdc.c index 88e3838..f26303c 100644 --- a/firmware/applications/cdc.c +++ b/firmware/applications/cdc.c @@ -68,7 +68,7 @@ void main_cdc(void) CDC_RdOutBuf (buf, &l); puts(buf); dx=DoString(dx,0,buf); - lcdDisplay(0); + lcdDisplay(); } //puts("hello world\r\n"); //delayms(1); diff --git a/firmware/applications/default.c b/firmware/applications/default.c index f2df310..2e41ac6 100644 --- a/firmware/applications/default.c +++ b/firmware/applications/default.c @@ -94,15 +94,15 @@ void main_default(void) { systickInit(10); if(getInputRaw()==BTN_ENTER){ - ISPandReset(7); + ISPandReset(); }; font=&Font_7x8; if(lcdInitConfig()){ - lcdDisplay(0); + lcdDisplay(); getInputWait(); }else{ - lcdDisplay(0); + lcdDisplay(); delayms(300); }; diff --git a/firmware/applications/exe.c b/firmware/applications/exe.c index 7559a92..44b2d2d 100644 --- a/firmware/applications/exe.c +++ b/firmware/applications/exe.c @@ -20,7 +20,7 @@ void execute_menu(void){ void msc_menu(void){ DoString(0,8,"MSC Enabled."); - lcdDisplay(0); + lcdDisplay(); usbMSCInit(); while(!getInputRaw())delayms(10); DoString(0,16,"MSC Disabled."); @@ -29,8 +29,8 @@ void msc_menu(void){ void gotoISP(void) { DoString(0,0,"Enter ISP!"); - lcdDisplay(0); - ISPandReset(5); + lcdDisplay(); + ISPandReset(); } void lcd_mirror(void) { @@ -44,7 +44,7 @@ void adc_check(void) { dx=DoString(0,dy,"Voltage:"); while ((getInputRaw())==BTN_NONE){ DoInt(dx,dy,GetVoltage()); - lcdDisplay(0); + lcdDisplay(); }; dy+=8; dx=DoString(0,dy,"Done."); @@ -77,7 +77,7 @@ void main_exe(void) { while (1) { lcdFill(0); // clear display buffer - lcdDisplay(0); + lcdDisplay(); handleMenu(&mainmenu); gotoISP(); } diff --git a/firmware/applications/executor.c b/firmware/applications/executor.c index 5f66a58..3fdf65a 100644 --- a/firmware/applications/executor.c +++ b/firmware/applications/executor.c @@ -17,7 +17,7 @@ void execute (const void *function, uint16_t length){ DoString(0,8,"Enter RAM!"); DoIntX(0,16,(uint32_t)function); DoIntX(0,24,(uint32_t)dst); - lcdDisplay(0); + lcdDisplay(); for(int i=0;i timer){ //schneller fix wenn ton zurueckgesetzt wird, aber timer weiterlaeuft TMR_TMR32B0TC=0; } - lcdDisplay(0); + lcdDisplay(); delayms(10); key= getInput(); @@ -56,8 +56,8 @@ void main_lilafisch(void) { if(key==BTN_LEFT){ timer32Disable(0); DoString(0,8,"Enter ISP!"); - lcdDisplay(0); - ISPandReset(5); + lcdDisplay(); + ISPandReset(); } //font = &Font_Ubuntu36pt; diff --git a/firmware/applications/mandelbrot.c b/firmware/applications/mandelbrot.c index 22dcde8..686a26a 100644 --- a/firmware/applications/mandelbrot.c +++ b/firmware/applications/mandelbrot.c @@ -113,7 +113,7 @@ void cross(char x, char y) { lcdSetPixel(x-2,y,false); lcdSetPixel(x,y+2,false); lcdSetPixel(x,y-2,false); - lcdDisplay(0); + lcdDisplay(); } void blink(){ @@ -139,7 +139,7 @@ void main_mandelbrot(void) { mandelMove(); if (mandel.dirty) mandelCalc(); - lcdDisplay(0); + lcdDisplay(); //TODO fix this if (!autozoom) { diff --git a/firmware/applications/mandelbrot2.c b/firmware/applications/mandelbrot2.c index 9cd59dc..5425108 100644 --- a/firmware/applications/mandelbrot2.c +++ b/firmware/applications/mandelbrot2.c @@ -106,7 +106,7 @@ void main_mandelbrot2(void) { font=&Font_7x8; mandelInit(); while (1) { - lcdDisplay(0); + lcdDisplay(); mandelMove(); if (mandel.dirty) { mandelCalc(); @@ -114,8 +114,8 @@ void main_mandelbrot2(void) { if(gpioGetValue(RB_BTN0)==0 && gpioGetValue(RB_BTN4)==0){ DoString(0,0,"Enter ISP!"); - lcdDisplay(0); - ISPandReset(5); + lcdDisplay(); + ISPandReset(); } } diff --git a/firmware/applications/menutest.c b/firmware/applications/menutest.c index 5e96c83..7aa01b1 100644 --- a/firmware/applications/menutest.c +++ b/firmware/applications/menutest.c @@ -58,7 +58,7 @@ void main_menutest(void) { font_direction = FONT_DIR_LTR; // LeftToRight is the default while (1) { - lcdDisplay(0); + lcdDisplay(); delayms(10); lcdFill(0); // clear display buffer @@ -91,7 +91,7 @@ void decBacklight(void) { void gotoISP(void) { DoString(0,58,"Enter ISP!"); - lcdDisplay(0); + lcdDisplay(); EnableWatchdog(5000); ReinvokeISP(); } diff --git a/firmware/applications/minimal.c b/firmware/applications/minimal.c index 076f2fc..d5f2f66 100644 --- a/firmware/applications/minimal.c +++ b/firmware/applications/minimal.c @@ -16,7 +16,7 @@ void main_minimal(void) { font_direction = FONT_DIR_LTR; // LeftToRight is the default while (1) { - lcdDisplay(0); + lcdDisplay(); delayms(10); key= getInput(); @@ -25,8 +25,8 @@ void main_minimal(void) { // Easy flashing if(key==BTN_LEFT){ DoString(0,8,"Enter ISP!"); - lcdDisplay(0); - ISPandReset(5); + lcdDisplay(); + ISPandReset(); } //font = &Font_Ubuntu36pt; diff --git a/firmware/applications/remote.c b/firmware/applications/remote.c index d4bbdf0..4effc17 100644 --- a/firmware/applications/remote.c +++ b/firmware/applications/remote.c @@ -59,7 +59,7 @@ void f_recv(void){ lcdPrint("ct:");lcdPrintIntHex( *(int*)(buf+ 4) ); lcdNl(); lcdPrint("id:");lcdPrintIntHex( *(int*)(buf+ 8) ); lcdNl(); lcdPrint("xx:");lcdPrintIntHex( *(int*)(buf+12) ); lcdNl(); - lcdDisplay(0); + lcdDisplay(); }; }; @@ -101,7 +101,7 @@ void f_send(void){ lcdPrint("F-St:"); lcdPrintInt(status); if(buf[2]==BTN_ENTER) break; - lcdDisplay(0); + lcdDisplay(); len=nrf_rcv_pkt_time_encr(10,sizeof(buf),buf,testkey); if(len>0){ lcdPrint("Got!"); @@ -113,8 +113,8 @@ void f_send(void){ void gotoISP(void) { DoString(0,0,"Enter ISP!"); - lcdDisplay(0); - ISPandReset(5); + lcdDisplay(); + ISPandReset(); } void lcd_mirror(void) { @@ -128,7 +128,7 @@ void adc_check(void) { dx=DoString(0,dy,"Voltage:"); while ((getInputRaw())==BTN_NONE){ DoInt(dx,dy,GetVoltage()); - lcdDisplay(0); + lcdDisplay(); }; dy+=8; dx=DoString(0,dy,"Done."); @@ -136,7 +136,7 @@ void adc_check(void) { void msc_menu(void){ DoString(0,8,"MSC Enabled."); - lcdDisplay(0); + lcdDisplay(); usbMSCInit(); while(!getInputRaw())delayms(10); DoString(0,16,"MSC Disabled."); @@ -177,7 +177,7 @@ void main_remote(void) { while (1) { lcdFill(0); // clear display buffer - lcdDisplay(0); + lcdDisplay(); handleMenu(&mainmenu); gotoISP(); } diff --git a/firmware/applications/s.c b/firmware/applications/s.c index 89a044e..e6d4910 100644 --- a/firmware/applications/s.c +++ b/firmware/applications/s.c @@ -56,7 +56,7 @@ void main_s(void) { while (1) { ctr++; uint32_t results; - lcdDisplay(j); + lcdDisplay(); delayms(10); font=fonts[fontctr]; @@ -76,7 +76,7 @@ void main_s(void) { if(gpioGetValue(RB_BTN0)==0){ while(gpioGetValue(RB_BTN0)==0); DoString(0,8,"Enter ISP!"); - lcdDisplay(0); + lcdDisplay(); EnableWatchdog(1000*5); ReinvokeISP(); }; diff --git a/firmware/applications/schneider.c b/firmware/applications/schneider.c index 80a2948..9e7ec11 100644 --- a/firmware/applications/schneider.c +++ b/firmware/applications/schneider.c @@ -34,15 +34,15 @@ void main_schneider(void) { // Easy flashing if(key==BTN_LEFT){ DoString(0,8,"Enter ISP!"); - lcdDisplay(0); - ISPandReset(5); + lcdDisplay(); + ISPandReset(); }; // Display nickname //font = &Font_Ubuntu36pt; dx=DoString(0,0,"Test"); dx=DoInt(dx,0,ctr++); - lcdDisplay(0); + lcdDisplay(); encryption_decryption_demo("This is encrypted", "1c56d302cf642a8e1ba4b48cc4fbe2845ee32dce7", "45f46eb303edf2e62f74bd68368d979e265ee3c03", diff --git a/firmware/applications/sec.c b/firmware/applications/sec.c index b4dab2f..84b29dd 100644 --- a/firmware/applications/sec.c +++ b/firmware/applications/sec.c @@ -30,7 +30,7 @@ void main_sec(void) { while (1) { ctr++; - lcdDisplay(0); + lcdDisplay(); delayms(10); key= getInput(); @@ -48,8 +48,8 @@ void main_sec(void) { // Easy flashing if(key==BTN_LEFT){ DoString(0,8,"Enter ISP!"); - lcdDisplay(0); - ISPandReset(5); + lcdDisplay(); + ISPandReset(); }; // Display nickname diff --git a/firmware/applications/spaceinvaders.c b/firmware/applications/spaceinvaders.c index 599a665..c774fd4 100644 --- a/firmware/applications/spaceinvaders.c +++ b/firmware/applications/spaceinvaders.c @@ -222,7 +222,7 @@ void main_spaceinvaders(void) { draw_enemy(); draw_shot(); draw_status(); - lcdDisplay(0); + lcdDisplay(); delayms(10); } return; diff --git a/firmware/applications/vcard.c b/firmware/applications/vcard.c index b9298f4..6cbda10 100644 --- a/firmware/applications/vcard.c +++ b/firmware/applications/vcard.c @@ -311,8 +311,8 @@ void main_vcard(void) { // Easy flashing if(key==BTN_LEFT){ DoString(0,8,"Enter ISP!"); - lcdDisplay(0); - ISPandReset(5); + lcdDisplay(); + ISPandReset(); }else if(key==BTN_UP){ //lcdClear(); //lcdPrintln("Generating..."); diff --git a/firmware/basic/basic.h b/firmware/basic/basic.h index 8aacbca..f754f18 100644 --- a/firmware/basic/basic.h +++ b/firmware/basic/basic.h @@ -126,7 +126,7 @@ void rbInit(void); // reinvoke_isp.c void ReinvokeISP(void); void EnableWatchdog(uint32_t ms); -void ISPandReset(int delay); +void ISPandReset(void); // delayms.c void delayms(uint32_t ms); diff --git a/firmware/basic/keyin.c b/firmware/basic/keyin.c index 1beea2d..69254be 100644 --- a/firmware/basic/keyin.c +++ b/firmware/basic/keyin.c @@ -29,10 +29,6 @@ uint8_t getInput(void) { result += BTN_RIGHT; } - if (result == (BTN_LEFT+BTN_UP+BTN_ENTER)){ /* Development hack */ - ISPandReset(5); - } - return result; } diff --git a/firmware/basic/menu.c b/firmware/basic/menu.c index 64e9474..818972f 100644 --- a/firmware/basic/menu.c +++ b/firmware/basic/menu.c @@ -41,7 +41,7 @@ void handleMenu(const struct MENU *the_menu) { } line += font->u8Height; } - lcdDisplay(0); + lcdDisplay(); switch (getInput()) { case BTN_UP: @@ -78,7 +78,7 @@ void handleMenu(const struct MENU *the_menu) { lcdRefresh(); if (the_menu->entries[menuselection]->callback!=NULL) the_menu->entries[menuselection]->callback(); - lcdDisplay(0); + lcdDisplay(); getInputWait(); break; diff --git a/firmware/basic/reinvoke_isp.c b/firmware/basic/reinvoke_isp.c index 84f05b4..2b3a6f3 100644 --- a/firmware/basic/reinvoke_isp.c +++ b/firmware/basic/reinvoke_isp.c @@ -74,14 +74,14 @@ void EnableWatchdog(uint32_t ms){ WDT_WDFEED = WDT_WDFEED_FEED2; }; -void ISPandReset(int delay){ +void ISPandReset(void){ #if CFG_USBMSC if(usbMSCenabled){ usbMSCOff(); delayms(500); }; #endif - EnableWatchdog(1000*delay); + EnableWatchdog(1000*5); ReinvokeISP(); }; diff --git a/firmware/lcd/display.c b/firmware/lcd/display.c index c4565ac..23e0b04 100644 --- a/firmware/lcd/display.c +++ b/firmware/lcd/display.c @@ -126,7 +126,7 @@ bool lcdGetPixel(char x, char y){ return byte & (1 << y_off); } -void lcdDisplay(uint32_t shift) { +void lcdDisplay(void) { char byte; select(); @@ -137,9 +137,9 @@ void lcdDisplay(uint32_t shift) { for(page=0; page