crashtest-r0ket/firmware/applications/scroll.c

54 lines
897 B
C
Raw Normal View History

2011-07-19 00:43:15 +00:00
#include <sysinit.h>
#include "basic/basic.h"
#include "lcd/render.h"
#include "lcd/display.h"
#include "lcd/allfonts.h"
void backlightInit(void);
/**************************************************************************/
void main_scroll(void) {
int dx=0;
char key;
backlightInit();
font=&Font_7x8;
dx=DoString(0,0,"Hello World");
while (1) {
lcdDisplay();
//// delayms(10);
2011-07-21 18:02:44 +00:00
key= getInputRaw();
2011-07-19 00:43:15 +00:00
// Easy flashing
2011-07-21 18:02:44 +00:00
if(key&BTN_ENTER){
2011-07-19 00:43:15 +00:00
DoString(0,8,"Enter ISP!");
lcdDisplay();
ISPandReset();
}
2011-07-21 18:02:44 +00:00
if(key&BTN_RIGHT){
2011-07-19 00:43:15 +00:00
lcdShift(1,0,true);
}
2011-07-21 18:02:44 +00:00
if(key&BTN_LEFT){
2011-07-19 00:43:15 +00:00
lcdShift(-1,0,true);
}
2011-07-21 18:02:44 +00:00
if(key&BTN_UP){
2011-07-19 00:43:15 +00:00
lcdShift(0,1,true);
}
2011-07-21 18:02:44 +00:00
if(key&BTN_DOWN){
2011-07-19 00:43:15 +00:00
lcdShift(0,-1,true);
}
//font = &Font_Ubuntu36pt;
}
return;
}
void tick_scroll(void){
return;
};