Remove argument from lcdDisplay() and ISPandReset()

This commit is contained in:
Stefan `Sec` Zehl 2011-07-18 22:09:31 +02:00
parent c39052259d
commit f4dee3550c
30 changed files with 84 additions and 88 deletions

View File

@ -25,7 +25,7 @@ void main_adc(void) {
while (1) { while (1) {
uint32_t results; uint32_t results;
lcdDisplay(0); lcdDisplay();
delayms(10); delayms(10);
if(gpioGetValue(RB_BTN1)==0){ if(gpioGetValue(RB_BTN1)==0){
@ -48,7 +48,7 @@ void main_adc(void) {
if (gpioGetValue(RB_BTN4)==0) { if (gpioGetValue(RB_BTN4)==0) {
while(gpioGetValue(RB_BTN4)==0); while(gpioGetValue(RB_BTN4)==0);
DoString(0,8,"Enter ISP!"); DoString(0,8,"Enter ISP!");
lcdDisplay(0); lcdDisplay();
EnableWatchdog(1000*5); EnableWatchdog(1000*5);
ReinvokeISP(); ReinvokeISP();

View File

@ -21,19 +21,19 @@ void main_bsx(void) {
font = &Font_7x8; font = &Font_7x8;
DoString(0, 0, "bsx"); DoString(0, 0, "bsx");
lcdDisplay(0); lcdDisplay();
delayms(1000); delayms(1000);
usbMSCInit(); usbMSCInit();
while (1) { while (1) {
uint32_t results; uint32_t results;
lcdDisplay(0); lcdDisplay();
delayms(10); delayms(10);
if (gpioGetValue(RB_BTN4)==0) { if (gpioGetValue(RB_BTN4)==0) {
while(gpioGetValue(RB_BTN4)==0); while(gpioGetValue(RB_BTN4)==0);
DoString(0,8,"Enter ISP!"); DoString(0,8,"Enter ISP!");
lcdDisplay(0); lcdDisplay();
ReinvokeISP(); ReinvokeISP();
} }
} }

View File

@ -68,7 +68,7 @@ void main_cdc(void)
CDC_RdOutBuf (buf, &l); CDC_RdOutBuf (buf, &l);
puts(buf); puts(buf);
dx=DoString(dx,0,buf); dx=DoString(dx,0,buf);
lcdDisplay(0); lcdDisplay();
} }
//puts("hello world\r\n"); //puts("hello world\r\n");
//delayms(1); //delayms(1);

View File

@ -94,15 +94,15 @@ void main_default(void) {
systickInit(10); systickInit(10);
if(getInputRaw()==BTN_ENTER){ if(getInputRaw()==BTN_ENTER){
ISPandReset(7); ISPandReset();
}; };
font=&Font_7x8; font=&Font_7x8;
if(lcdInitConfig()){ if(lcdInitConfig()){
lcdDisplay(0); lcdDisplay();
getInputWait(); getInputWait();
}else{ }else{
lcdDisplay(0); lcdDisplay();
delayms(300); delayms(300);
}; };

View File

@ -20,7 +20,7 @@ void execute_menu(void){
void msc_menu(void){ void msc_menu(void){
DoString(0,8,"MSC Enabled."); DoString(0,8,"MSC Enabled.");
lcdDisplay(0); lcdDisplay();
usbMSCInit(); usbMSCInit();
while(!getInputRaw())delayms(10); while(!getInputRaw())delayms(10);
DoString(0,16,"MSC Disabled."); DoString(0,16,"MSC Disabled.");
@ -29,8 +29,8 @@ void msc_menu(void){
void gotoISP(void) { void gotoISP(void) {
DoString(0,0,"Enter ISP!"); DoString(0,0,"Enter ISP!");
lcdDisplay(0); lcdDisplay();
ISPandReset(5); ISPandReset();
} }
void lcd_mirror(void) { void lcd_mirror(void) {
@ -44,7 +44,7 @@ void adc_check(void) {
dx=DoString(0,dy,"Voltage:"); dx=DoString(0,dy,"Voltage:");
while ((getInputRaw())==BTN_NONE){ while ((getInputRaw())==BTN_NONE){
DoInt(dx,dy,GetVoltage()); DoInt(dx,dy,GetVoltage());
lcdDisplay(0); lcdDisplay();
}; };
dy+=8; dy+=8;
dx=DoString(0,dy,"Done."); dx=DoString(0,dy,"Done.");
@ -77,7 +77,7 @@ void main_exe(void) {
while (1) { while (1) {
lcdFill(0); // clear display buffer lcdFill(0); // clear display buffer
lcdDisplay(0); lcdDisplay();
handleMenu(&mainmenu); handleMenu(&mainmenu);
gotoISP(); gotoISP();
} }

View File

@ -17,7 +17,7 @@ void execute (const void *function, uint16_t length){
DoString(0,8,"Enter RAM!"); DoString(0,8,"Enter RAM!");
DoIntX(0,16,(uint32_t)function); DoIntX(0,16,(uint32_t)function);
DoIntX(0,24,(uint32_t)dst); DoIntX(0,24,(uint32_t)dst);
lcdDisplay(0); lcdDisplay();
for(int i=0;i<length;i++){ for(int i=0;i<length;i++){
((char*)dst)[i]=((char*)function)[i]; ((char*)dst)[i]=((char*)function)[i];
@ -69,7 +69,7 @@ void execute_file (const char * fname){
int dx; int dx;
dx=DoString(0,16,"read: "); dx=DoString(0,16,"read: ");
DoInt(dx,16,readbytes); DoInt(dx,16,readbytes);
lcdDisplay(0); lcdDisplay();
dst=(void (*)(void)) ((uint32_t)(dst) | 1); // Enable Thumb mode! dst=(void (*)(void)) ((uint32_t)(dst) | 1); // Enable Thumb mode!
dst(); dst();
@ -101,7 +101,7 @@ void main_executor(void) {
while (1) { while (1) {
ctr++; ctr++;
lcdDisplay(0); lcdDisplay();
delayms(10); delayms(10);
key= getInput(); key= getInput();
@ -119,21 +119,21 @@ void main_executor(void) {
// Easy flashing // Easy flashing
if(key==BTN_LEFT){ if(key==BTN_LEFT){
DoString(0,8,"Enter ISP!"); DoString(0,8,"Enter ISP!");
lcdDisplay(0); lcdDisplay();
ISPandReset(5); ISPandReset();
}; };
// DF xecute // DF xecute
if(key==BTN_RIGHT){ if(key==BTN_RIGHT){
DoString(0,0,"Enter RAM!"); DoString(0,0,"Enter RAM!");
lcdDisplay(0); lcdDisplay();
while(getInput()!=BTN_NONE); while(getInput()!=BTN_NONE);
FATFS FatFs; /* File system object for logical drive */ FATFS FatFs; /* File system object for logical drive */
put_rc(f_mount(0, &FatFs)); put_rc(f_mount(0, &FatFs));
execute_file("0:test.c0d"); execute_file("0:test.c0d");
lcdDisplay(0); lcdDisplay();
while(!getInput()); while(!getInput());
}; };

View File

@ -109,7 +109,7 @@ void f_nick(void){
lcdPrint("x"); lcdPrint("x");
lcdPrintInt(y); lcdPrintInt(y);
lcdDisplay(0); lcdDisplay();
delayms(40); delayms(40);
key= getInputRaw(); key= getInputRaw();
@ -124,7 +124,7 @@ void f_nick(void){
}else if (key ==BTN_ENTER){ }else if (key ==BTN_ENTER){
lcdClear(); lcdClear();
lcdPrintln("Done."); lcdPrintln("Done.");
lcdDisplay(0); lcdDisplay();
ctr++; ctr++;
break; break;
}; };
@ -135,8 +135,8 @@ void f_nick(void){
void gotoISP(void) { void gotoISP(void) {
DoString(0,0,"Enter ISP!"); DoString(0,0,"Enter ISP!");
lcdDisplay(0); lcdDisplay();
ISPandReset(5); ISPandReset();
} }
void lcd_mirror(void) { void lcd_mirror(void) {
@ -154,7 +154,7 @@ void adc_check(void) {
dx=DoString(0,dy,"Voltage:"); dx=DoString(0,dy,"Voltage:");
while ((getInputRaw())==BTN_NONE){ while ((getInputRaw())==BTN_NONE){
DoInt(dx,dy,GetVoltage()); DoInt(dx,dy,GetVoltage());
lcdDisplay(0); lcdDisplay();
}; };
dy+=8; dy+=8;
dx=DoString(0,dy,"Done."); dx=DoString(0,dy,"Done.");
@ -162,7 +162,7 @@ void adc_check(void) {
void msc_menu(void){ void msc_menu(void){
DoString(0,8,"MSC Enabled."); DoString(0,8,"MSC Enabled.");
lcdDisplay(0); lcdDisplay();
usbMSCInit(); usbMSCInit();
while(!getInputRaw())delayms(10); while(!getInputRaw())delayms(10);
DoString(0,16,"MSC Disabled."); DoString(0,16,"MSC Disabled.");
@ -205,7 +205,7 @@ void main_font(void) {
while (1) { while (1) {
lcdFill(0); // clear display buffer lcdFill(0); // clear display buffer
lcdDisplay(0); lcdDisplay();
handleMenu(&mainmenu); handleMenu(&mainmenu);
gotoISP(); gotoISP();
} }

View File

@ -69,7 +69,7 @@ void main_fs(void) {
font_direction = FONT_DIR_LTR; // LeftToRight is the default font_direction = FONT_DIR_LTR; // LeftToRight is the default
while (1) { while (1) {
lcdDisplay(0); lcdDisplay();
delayms(10); delayms(10);
lcdFill(0); // clear display buffer lcdFill(0); // clear display buffer
@ -109,8 +109,8 @@ void tick_fs(void){
void gotoISP(void) { void gotoISP(void) {
DoString(0,0,"Enter ISP!"); DoString(0,0,"Enter ISP!");
lcdDisplay(0); lcdDisplay();
ISPandReset(5); ISPandReset();
} }
void put_rc_y (FRESULT rc, int y) { void put_rc_y (FRESULT rc, int y) {

View File

@ -163,8 +163,8 @@ void f_send(void){
void gotoISP(void) { void gotoISP(void) {
DoString(0,0,"Enter ISP!"); DoString(0,0,"Enter ISP!");
lcdDisplay(0); lcdDisplay();
ISPandReset(5); ISPandReset();
} }
void lcd_mirror(void) { void lcd_mirror(void) {
@ -178,7 +178,7 @@ void adc_check(void) {
dx=DoString(0,dy,"Voltage:"); dx=DoString(0,dy,"Voltage:");
while ((getInputRaw())==BTN_NONE){ while ((getInputRaw())==BTN_NONE){
DoInt(dx,dy,GetVoltage()); DoInt(dx,dy,GetVoltage());
lcdDisplay(0); lcdDisplay();
}; };
dy+=8; dy+=8;
dx=DoString(0,dy,"Done."); dx=DoString(0,dy,"Done.");
@ -230,7 +230,7 @@ void main_funk(void) {
openbeaconSetup(0x5ec); openbeaconSetup(0x5ec);
while (1) { while (1) {
lcdFill(0); // clear display buffer lcdFill(0); // clear display buffer
lcdDisplay(0); lcdDisplay();
handleMenu(&mainmenu); handleMenu(&mainmenu);
gotoISP(); gotoISP();
} }

View File

@ -57,7 +57,7 @@ void main_iggy(void) {
while (1) { while (1) {
ctr++; ctr++;
uint32_t results; uint32_t results;
lcdDisplay(j); lcdDisplay();
delayms(10); delayms(10);
font=fonts[fontctr]; font=fonts[fontctr];
@ -85,7 +85,7 @@ void main_iggy(void) {
if(gpioGetValue(RB_BTN0)==0){ if(gpioGetValue(RB_BTN0)==0){
while(gpioGetValue(RB_BTN0)==0); while(gpioGetValue(RB_BTN0)==0);
DoString(0,8,"Enter ISP!"); DoString(0,8,"Enter ISP!");
lcdDisplay(0); lcdDisplay();
EnableWatchdog(1000*5); EnableWatchdog(1000*5);
ReinvokeISP(); ReinvokeISP();
}; };
@ -99,7 +99,7 @@ void main_iggy(void) {
//on = ~on; //on = ~on;
//lcdSetPixel(20,20,true); //lcdSetPixel(20,20,true);
//lcdDisplay(0); //lcdDisplay();
//lcdSetPixel(20,21,0); //lcdSetPixel(20,21,0);
//lcdSetPixel(21,20,1); //lcdSetPixel(21,20,1);

View File

@ -29,11 +29,11 @@ void main_lilafisch(void) {
lcdToggleFlag(LCD_MIRRORX); lcdToggleFlag(LCD_MIRRORX);
backlightInit(); backlightInit();
font_direction = FONT_DIR_LTR; // LeftToRight is the default font_direction = FONT_DIR_LTR; // LeftToRight is the default
dx=DoString(0,0,"init timer"); lcdDisplay(0); dx=DoString(0,0,"init timer"); lcdDisplay();
timer32Init(0, (72E6/5E3)/2); //timer einschalten, auf 5kHz(?) setzen timer32Init(0, (72E6/5E3)/2); //timer einschalten, auf 5kHz(?) setzen
dx=DoString(0,0,"enable timer"); lcdDisplay(0); dx=DoString(0,0,"enable timer"); lcdDisplay();
timer32Enable(0); timer32Enable(0);
dx=DoString(0,0,"timer done"); lcdDisplay(0); dx=DoString(0,0,"timer done"); lcdDisplay();
while (1) { while (1) {
ton ++; ton ++;
@ -46,7 +46,7 @@ void main_lilafisch(void) {
if (TMR_TMR32B0TC > timer){ //schneller fix wenn ton zurueckgesetzt wird, aber timer weiterlaeuft if (TMR_TMR32B0TC > timer){ //schneller fix wenn ton zurueckgesetzt wird, aber timer weiterlaeuft
TMR_TMR32B0TC=0; TMR_TMR32B0TC=0;
} }
lcdDisplay(0); lcdDisplay();
delayms(10); delayms(10);
key= getInput(); key= getInput();
@ -56,8 +56,8 @@ void main_lilafisch(void) {
if(key==BTN_LEFT){ if(key==BTN_LEFT){
timer32Disable(0); timer32Disable(0);
DoString(0,8,"Enter ISP!"); DoString(0,8,"Enter ISP!");
lcdDisplay(0); lcdDisplay();
ISPandReset(5); ISPandReset();
} }
//font = &Font_Ubuntu36pt; //font = &Font_Ubuntu36pt;

View File

@ -113,7 +113,7 @@ void cross(char x, char y) {
lcdSetPixel(x-2,y,false); lcdSetPixel(x-2,y,false);
lcdSetPixel(x,y+2,false); lcdSetPixel(x,y+2,false);
lcdSetPixel(x,y-2,false); lcdSetPixel(x,y-2,false);
lcdDisplay(0); lcdDisplay();
} }
void blink(){ void blink(){
@ -139,7 +139,7 @@ void main_mandelbrot(void) {
mandelMove(); mandelMove();
if (mandel.dirty) mandelCalc(); if (mandel.dirty) mandelCalc();
lcdDisplay(0); lcdDisplay();
//TODO fix this //TODO fix this
if (!autozoom) { if (!autozoom) {

View File

@ -106,7 +106,7 @@ void main_mandelbrot2(void) {
font=&Font_7x8; font=&Font_7x8;
mandelInit(); mandelInit();
while (1) { while (1) {
lcdDisplay(0); lcdDisplay();
mandelMove(); mandelMove();
if (mandel.dirty) { if (mandel.dirty) {
mandelCalc(); mandelCalc();
@ -114,8 +114,8 @@ void main_mandelbrot2(void) {
if(gpioGetValue(RB_BTN0)==0 && gpioGetValue(RB_BTN4)==0){ if(gpioGetValue(RB_BTN0)==0 && gpioGetValue(RB_BTN4)==0){
DoString(0,0,"Enter ISP!"); DoString(0,0,"Enter ISP!");
lcdDisplay(0); lcdDisplay();
ISPandReset(5); ISPandReset();
} }
} }

View File

@ -58,7 +58,7 @@ void main_menutest(void) {
font_direction = FONT_DIR_LTR; // LeftToRight is the default font_direction = FONT_DIR_LTR; // LeftToRight is the default
while (1) { while (1) {
lcdDisplay(0); lcdDisplay();
delayms(10); delayms(10);
lcdFill(0); // clear display buffer lcdFill(0); // clear display buffer
@ -91,7 +91,7 @@ void decBacklight(void) {
void gotoISP(void) { void gotoISP(void) {
DoString(0,58,"Enter ISP!"); DoString(0,58,"Enter ISP!");
lcdDisplay(0); lcdDisplay();
EnableWatchdog(5000); EnableWatchdog(5000);
ReinvokeISP(); ReinvokeISP();
} }

View File

@ -16,7 +16,7 @@ void main_minimal(void) {
font_direction = FONT_DIR_LTR; // LeftToRight is the default font_direction = FONT_DIR_LTR; // LeftToRight is the default
while (1) { while (1) {
lcdDisplay(0); lcdDisplay();
delayms(10); delayms(10);
key= getInput(); key= getInput();
@ -25,8 +25,8 @@ void main_minimal(void) {
// Easy flashing // Easy flashing
if(key==BTN_LEFT){ if(key==BTN_LEFT){
DoString(0,8,"Enter ISP!"); DoString(0,8,"Enter ISP!");
lcdDisplay(0); lcdDisplay();
ISPandReset(5); ISPandReset();
} }
//font = &Font_Ubuntu36pt; //font = &Font_Ubuntu36pt;

View File

@ -59,7 +59,7 @@ void f_recv(void){
lcdPrint("ct:");lcdPrintIntHex( *(int*)(buf+ 4) ); lcdNl(); lcdPrint("ct:");lcdPrintIntHex( *(int*)(buf+ 4) ); lcdNl();
lcdPrint("id:");lcdPrintIntHex( *(int*)(buf+ 8) ); lcdNl(); lcdPrint("id:");lcdPrintIntHex( *(int*)(buf+ 8) ); lcdNl();
lcdPrint("xx:");lcdPrintIntHex( *(int*)(buf+12) ); lcdNl(); lcdPrint("xx:");lcdPrintIntHex( *(int*)(buf+12) ); lcdNl();
lcdDisplay(0); lcdDisplay();
}; };
}; };
@ -101,7 +101,7 @@ void f_send(void){
lcdPrint("F-St:"); lcdPrintInt(status); lcdPrint("F-St:"); lcdPrintInt(status);
if(buf[2]==BTN_ENTER) if(buf[2]==BTN_ENTER)
break; break;
lcdDisplay(0); lcdDisplay();
len=nrf_rcv_pkt_time_encr(10,sizeof(buf),buf,testkey); len=nrf_rcv_pkt_time_encr(10,sizeof(buf),buf,testkey);
if(len>0){ if(len>0){
lcdPrint("Got!"); lcdPrint("Got!");
@ -113,8 +113,8 @@ void f_send(void){
void gotoISP(void) { void gotoISP(void) {
DoString(0,0,"Enter ISP!"); DoString(0,0,"Enter ISP!");
lcdDisplay(0); lcdDisplay();
ISPandReset(5); ISPandReset();
} }
void lcd_mirror(void) { void lcd_mirror(void) {
@ -128,7 +128,7 @@ void adc_check(void) {
dx=DoString(0,dy,"Voltage:"); dx=DoString(0,dy,"Voltage:");
while ((getInputRaw())==BTN_NONE){ while ((getInputRaw())==BTN_NONE){
DoInt(dx,dy,GetVoltage()); DoInt(dx,dy,GetVoltage());
lcdDisplay(0); lcdDisplay();
}; };
dy+=8; dy+=8;
dx=DoString(0,dy,"Done."); dx=DoString(0,dy,"Done.");
@ -136,7 +136,7 @@ void adc_check(void) {
void msc_menu(void){ void msc_menu(void){
DoString(0,8,"MSC Enabled."); DoString(0,8,"MSC Enabled.");
lcdDisplay(0); lcdDisplay();
usbMSCInit(); usbMSCInit();
while(!getInputRaw())delayms(10); while(!getInputRaw())delayms(10);
DoString(0,16,"MSC Disabled."); DoString(0,16,"MSC Disabled.");
@ -177,7 +177,7 @@ void main_remote(void) {
while (1) { while (1) {
lcdFill(0); // clear display buffer lcdFill(0); // clear display buffer
lcdDisplay(0); lcdDisplay();
handleMenu(&mainmenu); handleMenu(&mainmenu);
gotoISP(); gotoISP();
} }

View File

@ -56,7 +56,7 @@ void main_s(void) {
while (1) { while (1) {
ctr++; ctr++;
uint32_t results; uint32_t results;
lcdDisplay(j); lcdDisplay();
delayms(10); delayms(10);
font=fonts[fontctr]; font=fonts[fontctr];
@ -76,7 +76,7 @@ void main_s(void) {
if(gpioGetValue(RB_BTN0)==0){ if(gpioGetValue(RB_BTN0)==0){
while(gpioGetValue(RB_BTN0)==0); while(gpioGetValue(RB_BTN0)==0);
DoString(0,8,"Enter ISP!"); DoString(0,8,"Enter ISP!");
lcdDisplay(0); lcdDisplay();
EnableWatchdog(1000*5); EnableWatchdog(1000*5);
ReinvokeISP(); ReinvokeISP();
}; };

View File

@ -34,15 +34,15 @@ void main_schneider(void) {
// Easy flashing // Easy flashing
if(key==BTN_LEFT){ if(key==BTN_LEFT){
DoString(0,8,"Enter ISP!"); DoString(0,8,"Enter ISP!");
lcdDisplay(0); lcdDisplay();
ISPandReset(5); ISPandReset();
}; };
// Display nickname // Display nickname
//font = &Font_Ubuntu36pt; //font = &Font_Ubuntu36pt;
dx=DoString(0,0,"Test"); dx=DoString(0,0,"Test");
dx=DoInt(dx,0,ctr++); dx=DoInt(dx,0,ctr++);
lcdDisplay(0); lcdDisplay();
encryption_decryption_demo("This is encrypted", encryption_decryption_demo("This is encrypted",
"1c56d302cf642a8e1ba4b48cc4fbe2845ee32dce7", "1c56d302cf642a8e1ba4b48cc4fbe2845ee32dce7",
"45f46eb303edf2e62f74bd68368d979e265ee3c03", "45f46eb303edf2e62f74bd68368d979e265ee3c03",

View File

@ -30,7 +30,7 @@ void main_sec(void) {
while (1) { while (1) {
ctr++; ctr++;
lcdDisplay(0); lcdDisplay();
delayms(10); delayms(10);
key= getInput(); key= getInput();
@ -48,8 +48,8 @@ void main_sec(void) {
// Easy flashing // Easy flashing
if(key==BTN_LEFT){ if(key==BTN_LEFT){
DoString(0,8,"Enter ISP!"); DoString(0,8,"Enter ISP!");
lcdDisplay(0); lcdDisplay();
ISPandReset(5); ISPandReset();
}; };
// Display nickname // Display nickname

View File

@ -222,7 +222,7 @@ void main_spaceinvaders(void) {
draw_enemy(); draw_enemy();
draw_shot(); draw_shot();
draw_status(); draw_status();
lcdDisplay(0); lcdDisplay();
delayms(10); delayms(10);
} }
return; return;

View File

@ -311,8 +311,8 @@ void main_vcard(void) {
// Easy flashing // Easy flashing
if(key==BTN_LEFT){ if(key==BTN_LEFT){
DoString(0,8,"Enter ISP!"); DoString(0,8,"Enter ISP!");
lcdDisplay(0); lcdDisplay();
ISPandReset(5); ISPandReset();
}else if(key==BTN_UP){ }else if(key==BTN_UP){
//lcdClear(); //lcdClear();
//lcdPrintln("Generating..."); //lcdPrintln("Generating...");

View File

@ -126,7 +126,7 @@ void rbInit(void);
// reinvoke_isp.c // reinvoke_isp.c
void ReinvokeISP(void); void ReinvokeISP(void);
void EnableWatchdog(uint32_t ms); void EnableWatchdog(uint32_t ms);
void ISPandReset(int delay); void ISPandReset(void);
// delayms.c // delayms.c
void delayms(uint32_t ms); void delayms(uint32_t ms);

View File

@ -29,10 +29,6 @@ uint8_t getInput(void) {
result += BTN_RIGHT; result += BTN_RIGHT;
} }
if (result == (BTN_LEFT+BTN_UP+BTN_ENTER)){ /* Development hack */
ISPandReset(5);
}
return result; return result;
} }

View File

@ -41,7 +41,7 @@ void handleMenu(const struct MENU *the_menu) {
} }
line += font->u8Height; line += font->u8Height;
} }
lcdDisplay(0); lcdDisplay();
switch (getInput()) { switch (getInput()) {
case BTN_UP: case BTN_UP:
@ -78,7 +78,7 @@ void handleMenu(const struct MENU *the_menu) {
lcdRefresh(); lcdRefresh();
if (the_menu->entries[menuselection]->callback!=NULL) if (the_menu->entries[menuselection]->callback!=NULL)
the_menu->entries[menuselection]->callback(); the_menu->entries[menuselection]->callback();
lcdDisplay(0); lcdDisplay();
getInputWait(); getInputWait();
break; break;

View File

@ -74,14 +74,14 @@ void EnableWatchdog(uint32_t ms){
WDT_WDFEED = WDT_WDFEED_FEED2; WDT_WDFEED = WDT_WDFEED_FEED2;
}; };
void ISPandReset(int delay){ void ISPandReset(void){
#if CFG_USBMSC #if CFG_USBMSC
if(usbMSCenabled){ if(usbMSCenabled){
usbMSCOff(); usbMSCOff();
delayms(500); delayms(500);
}; };
#endif #endif
EnableWatchdog(1000*delay); EnableWatchdog(1000*5);
ReinvokeISP(); ReinvokeISP();
}; };

View File

@ -126,7 +126,7 @@ bool lcdGetPixel(char x, char y){
return byte & (1 << y_off); return byte & (1 << y_off);
} }
void lcdDisplay(uint32_t shift) { void lcdDisplay(void) {
char byte; char byte;
select(); select();
@ -137,9 +137,9 @@ void lcdDisplay(uint32_t shift) {
for(page=0; page<RESY_B;page++) { for(page=0; page<RESY_B;page++) {
for(i=0; i<RESX; i++) { for(i=0; i<RESX; i++) {
if (lcd_layout & LCD_MIRRORX) if (lcd_layout & LCD_MIRRORX)
byte=lcdBuffer[page*RESX+RESX-1-((i+shift)%RESX)]; byte=lcdBuffer[page*RESX+RESX-1-(i)];
else else
byte=lcdBuffer[page*RESX+((i+shift)%RESX)]; byte=lcdBuffer[page*RESX+(i)];
if (lcd_layout & LCD_INVERTED) if (lcd_layout & LCD_INVERTED)
byte=~byte; byte=~byte;

View File

@ -22,7 +22,7 @@ extern uint8_t lcdBuffer[RESX*RESY_B];
void lcdInit(void); void lcdInit(void);
void lcdFill(char f); void lcdFill(char f);
void lcdDisplay(uint32_t shift); void lcdDisplay(void);
void lcdInvert(void); void lcdInvert(void);
void lcdToggleFlag(int flag); void lcdToggleFlag(int flag);
void lcdSetPixel(char x, char y, bool f); void lcdSetPixel(char x, char y, bool f);

View File

@ -41,7 +41,7 @@ void lcdClear(){
}; };
void lcdRefresh(){ void lcdRefresh(){
lcdDisplay(0); lcdDisplay();
}; };
void lcdMoveCrsr(signed int dx,signed int dy){ void lcdMoveCrsr(signed int dx,signed int dy){

View File

@ -52,7 +52,7 @@ void ram(void) {
draw_enemy(); draw_enemy();
draw_shot(); draw_shot();
draw_status(); draw_status();
lcdDisplay(0); lcdDisplay();
delayms(10); delayms(10);
} }
return; return;

View File

@ -26,7 +26,7 @@ int main(void) {
lcdInit(); // display lcdInit(); // display
lcdFill(0); lcdFill(0);
lcdDisplay(0); lcdDisplay();
wrapper(); // see module/ subdirectory wrapper(); // see module/ subdirectory
} }