hm60x/hm801: Fix blinking white screen.
[maemo-rb.git] / firmware / export / si4700.h
blob6b7992c0253fa4a59ba2cfd5ca2a834696f28351
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * $Id$
11 * Tuner header for the Silicon Labs SI4700
13 * Copyright (C) 2008 Dave Chapman
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
23 ****************************************************************************/
25 #ifndef _SI4700_H_
26 #define _SI4700_H_
27 #include <stdint.h>
29 #define HAVE_RADIO_REGION
30 #define HAVE_RADIO_RSSI
32 struct si4700_dbg_info
34 uint16_t regs[16]; /* Read registers */
37 bool si4700_detect(void);
38 void si4700_init(void);
39 int si4700_set(int setting, int value);
40 int si4700_get(int setting);
41 void si4700_dbg_info(struct si4700_dbg_info *nfo);
42 /* For interrupt-based mono/stereo indicator */
43 bool si4700_st(void);
45 /** RDS support **/
46 void si4700_rds_init(void);
47 /* Radio is fully powered up or about to be powered down */
48 void si4700_rds_powerup(bool on);
49 #ifdef RDS_ISR_PROCESSING
50 /* Read raw RDS info for processing - asynchronously */
51 void si4700_read_raw_async(int count); /* implemented by target */
52 void si4700_rds_read_raw_async(void);
53 void si4700_rds_read_raw_async_complete(unsigned char *regbuf,
54 uint16_t data[4]);
55 #else /* ndef RDS_ISR_PROCESSING */
56 /* Read raw RDS info for processing */
57 bool si4700_rds_read_raw(uint16_t data[4]);
58 #endif /* RDS_ISR_PROCESSING */
59 /* Obtain specified string */
60 char* si4700_get_rds_info(int setting);
61 /* Set the event flag */
62 void si4700_rds_set_event(void);
64 #ifndef CONFIG_TUNER_MULTI
65 #define tuner_set si4700_set
66 #define tuner_get si4700_get
67 #define tuner_get_rds_info si4700_get_rds_info
68 #endif
70 #endif /* _SI4700_H_ */