4 * Copyright (C) 2013-06-21 K.Ohta <whatisthis.sowhat ai gmail.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2,
10 * or (at your option) any later version.
11 * This library / program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 * See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this library; see the file COPYING. If not, write to the
18 * Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
21 * As a special exception, if you link this(includeed from sdcc) library
22 * with other files, some of which are compiled with SDCC,
23 * to produce an executable, this library does not by itself cause
24 * the resulting executable to be covered by the GNU General Public License.
25 * This exception does not however invalidate any other reasons why
26 * the executable file might be covered by the GNU General Public License.
37 #include <pic18fregs.h> /* ONLY FOR PIC18x */
44 #include "lcd_acm1602.h"
52 #define USER_BAND_NUM 4
54 unsigned char mode3k; // mode3k if am
62 extern unsigned int amfreq;
63 extern unsigned int fmfreq;
64 extern unsigned int amfreq_bank[AKC6955_BAND_AMEND];
65 extern unsigned int fmfreq_bank[AKC6955_BAND_FMEND];
66 extern unsigned char amband;
67 extern unsigned char fmband;
68 extern unsigned char fm;
69 extern unsigned char am_mode3k;
70 extern unsigned char am_userbandnum;
71 extern unsigned char fm_userbandnum;
72 extern unsigned char threshold;
73 extern unsigned char lowboost;
74 extern unsigned char stereo;
75 extern _userband_t am_usrbands[USER_BAND_NUM];
76 extern _userband_t fm_usrbands[USER_BAND_NUM];
77 extern banddesc am_userband_freq[USER_BAND_NUM];
78 extern banddesc fm_userband_freq[USER_BAND_NUM];
79 extern unsigned char volume;
80 extern unsigned char prevolume;
81 extern unsigned char fmbandwidth;
83 extern int backlight_long;
84 extern unsigned int ui_idlecount;
87 extern unsigned char stereoflag;
88 extern unsigned char tuneflag;
89 extern unsigned char cnrlevel;
91 extern unsigned int batlevel_6955;
92 extern unsigned int battlevel;
94 extern int recv_signal;
95 extern int backlight_counter;
96 extern unsigned char backlight_level;
97 extern unsigned char pollkeybuf[33];
98 extern unsigned char scanflag;
100 extern void update_display(void);
101 extern void update_status(void);
102 extern void save_eeprom(void);
103 extern unsigned char load_eeprom(void);
104 extern void setfreq_updown(unsigned char ctlword);
105 extern void setdefault(void);
110 extern void main_menu(void);
111 extern void input_userband(void);
112 extern void set_userband(void);
113 extern void call_userband(unsigned char num);
114 extern void setband_direct(void);
115 extern void setfreq_direct(void);
116 extern void set_stereo(void);
118 extern void scan_start(void);
119 extern void set_volume(void);
120 extern void toggle_amfm(void);
121 extern void updown_help(void);
122 extern void mainmenu_help(void);
123 extern void print_freq(unsigned char y);
124 extern void setup_akc6955(void);