3 * Menu sub-routines / Setup.
4 * Copyright (C) 2013-09-11 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.
30 #include "menu_memoryfreq.h"
32 #include "commondef.h"
33 #include "backlight.h"
38 c = printhelp_2lines("Save settings", "A=Yes");
48 c = printhelp_2lines("Load settings", "A=Yes B=Init");
55 c = printhelp_2lines("X) Load Error", "A=Fix");
63 } else if(c == charcode_b){
74 c = printhelp_2lines("Setup F=HELP", "5=Return");
82 printstr("BL Level:");
83 val = read_numeric(setup.backlight_level, 3, 0,1);
84 if((val & 0x80000000) == 0) {
85 if(val > 255) val = 255;
86 if(val < 15) val = 15;
87 setup.backlight_level = (unsigned char)val;
91 printstr("FM Bandwidth:");
92 // c = akc6955_get_fmbandwidth();
93 setup.fmbandwidth = pollkey_numeric(0) & 3;
94 akc6955_set_fmbandwidth(setup.fmbandwidth);
100 c = setup.threshold_fmcnr;
101 c = pollkey_numeric(c);
102 akc6955_set_thresh_fmcnr(c & 3);
106 c = setup.threshold_amcnr;
107 c = pollkey_numeric(c);
108 akc6955_set_thresh_amcnr(c & 3);
111 printstr("Stereo th:");
112 c = setup.threshold_fmstereo;
113 c = pollkey_numeric(c);
114 akc6955_set_thresh_fmstereo(c & 3);
129 printstr("BL Long:");
130 val = read_numeric(setup.backlight_long, 3, 0,1);
131 if((val & 0x80000000) == 0) {
132 if(val > 999) val = 999;
133 setup.backlight_long = val;