add version string at poweron, also check for poweroff keys in interrupt
This commit is contained in:
parent
8af9701e15
commit
ee917a71e5
@ -16,7 +16,6 @@ extern "C" {
|
||||
|
||||
void KeyInit(void);
|
||||
void KeyScan(void);
|
||||
const uint32_t GetNewKeys(void);
|
||||
|
||||
#ifdef DEBUG_KEYS
|
||||
const uint8_t* DebugGetKeys(void);
|
||||
|
@ -64,6 +64,10 @@ void timer0_isr() SDCC_ISR(1,1)
|
||||
NewKeyEmpty = 0;
|
||||
}
|
||||
|
||||
if (Keys[0] == 8 && Keys[4] == 8){
|
||||
TURN_OFF();
|
||||
}
|
||||
|
||||
//track time
|
||||
#ifdef TRACK_TIME
|
||||
count++;
|
||||
@ -162,12 +166,14 @@ int main()
|
||||
latch_on();
|
||||
LCD_Open();
|
||||
KeyInit();
|
||||
Timer0Init(); // display refresh & switch read
|
||||
Timer0Init(); //for reading keyboard
|
||||
BACKLIGHT_ON(); //turn on led backlight
|
||||
|
||||
ExpBuf[0] = 0;
|
||||
ExpBuf[1] = 0;
|
||||
|
||||
LCD_OutString("STC RPN Calculator v1.00", 32);
|
||||
|
||||
#ifdef DEBUG_UPTIME
|
||||
i = 0;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user