#include "power.h"
#include "commondef.h"
#include "eeprom.h"
-
+#include "backlight.h"
void call_freqbank(unsigned int num)
{
unsigned char _fm;
unsigned char _band;
unsigned char _userband;
- unsigned char n;
unsigned char c;
+ unsigned char dispf = 0xff;
_fm = setup.fm;
_freq = setup.amfreq;
_CLS();
do {
- _LOCATE(0,0);
- printstr("CH:");
- print_numeric_nosupress(setup.memorynum, 3);
- printstr(" 8/2/A");
- update_status();
- print_freq(1);
- _HOME();
- c = pollkey_single_timeout(44, 1); // About 1s
+ if(dispf != 0) {
+ _LOCATE(0,0);
+ printstr("CH:");
+ print_numeric_nosupress(setup.memorynum, 3);
+ printstr(" 8/2/A");
+ update_status();
+ print_freq(1);
+ _HOME();
+ }
+ c = pollkey_single_timeout(41, 1); // 23*41 = 943ms
+ backlight_reset(c);
+ dispf = backlight_dec(dispf);
+
switch(c) {
case charcode_7: // UP 1CH
setup.memorynum++;
}
call_freqbank(setup.memorynum);
break;
- case charcode_8: // Up CH FAST
+ case charcode_8: // Up CH MID
setup.memorynum += USER_MEMORY_NUM;
if(setup.memorynum >= (USER_MEMORY_NUM * USER_MEMORY_BANKS)) {
setup.memorynum = setup.memorynum - USER_MEMORY_NUM * USER_MEMORY_BANKS;
}
call_freqbank(setup.memorynum);
break;
- case charcode_2: // Down CH FAST
+ case charcode_2: // Down CH MID
if(setup.memorynum < USER_MEMORY_NUM) {
setup.memorynum = (USER_MEMORY_NUM * USER_MEMORY_BANKS) - USER_MEMORY_NUM + setup.memorynum;
} else {
}
call_freqbank(setup.memorynum);
break;
- case charcode_5: // Reset
+ case charcode_5: // Recall
+ call_freqbank(setup.memorynum);
+ break;
+ case charcode_d: // Reset
if(_fm) { // AM
setup.fmband = _band;
setup.fm_userbandnum = _userband;
case charcode_a:
goto _l0;
break;
+ case charcode_e: // Set Light
default:
break;
}
-// _HOME();
+ idle_time_ms(9); // Pad 9ms, 1Loop = 1000ms.
} while(1);
_l0:
_CLS();