Some more tweaks to the ipod installation:
[Rockbox.git] / uisimulator / common / fmradio.c
blob4ce4d669762aed5922e22cb5a54eecac323f4374
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 by Linus Nielsen Feltzing
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
19 #include <stdbool.h>
20 #include "config.h"
21 #include "debug.h"
22 #include "tuner.h"
24 #ifdef CONFIG_TUNER
26 static int frequency = 0;
27 static bool mono = false;
29 void radio_set(int setting, int value)
31 switch(setting)
33 case RADIO_SLEEP:
34 break;
36 case RADIO_FREQUENCY:
37 frequency = value;
38 break;
40 case RADIO_MUTE:
41 break;
43 case RADIO_FORCE_MONO:
44 mono = value?true:false;
45 break;
47 default:
48 return;
52 int radio_get(int setting)
54 int val = 0;
56 switch(setting)
58 case RADIO_PRESENT:
59 val = 1; /* true */
60 break;
62 case RADIO_TUNED:
63 if(frequency == 99500000)
64 val = 1;
65 break;
67 case RADIO_STEREO:
68 if(frequency == 99500000)
69 val = mono?0:1;
70 break;
72 case RADIO_ALL: /* debug query */
73 break;
75 return val;
78 #endif