diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2010-06-16 20:29:08 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2010-06-16 20:29:08 +0000 |
commit | ff8e76e9e534dde1e6a57a84d49b89dad847cafd (patch) | |
tree | 3fdbb6307e1c1350d13bb205a96e0a5d7df3ad01 /firmware/export/rda5802.h | |
parent | 60d5f5050b00e05385cbe55a9d639a56e013ff3f (diff) | |
download | rockbox-ff8e76e9e534dde1e6a57a84d49b89dad847cafd.tar.gz rockbox-ff8e76e9e534dde1e6a57a84d49b89dad847cafd.zip |
The mystery FM chip in some Sansa Clip+ players has been identified as a RDA5802, so rename files and functions. Also fix several bugs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26871 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/rda5802.h')
-rw-r--r-- | firmware/export/rda5802.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/firmware/export/rda5802.h b/firmware/export/rda5802.h new file mode 100644 index 0000000000..e61ecb40ae --- /dev/null +++ b/firmware/export/rda5802.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * $Id$ | ||
10 | * | ||
11 | * Tuner header for the RDA Microelectronics RDA5802 FM tuner chip | ||
12 | * | ||
13 | * Copyright (C) 2010 Bertrik Sikken | ||
14 | * | ||
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. | ||
19 | * | ||
20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
21 | * KIND, either express or implied. | ||
22 | * | ||
23 | ****************************************************************************/ | ||
24 | |||
25 | #ifndef _RDA5802_H_ | ||
26 | #define _RDA5802_H_ | ||
27 | |||
28 | #define HAVE_RADIO_REGION | ||
29 | |||
30 | struct rda5802_region_data | ||
31 | { | ||
32 | unsigned char deemphasis; /* 0: 75us, 1: 50us */ | ||
33 | unsigned char band; /* 0: us/europe, 1: japan */ | ||
34 | } __attribute__((packed)); | ||
35 | |||
36 | extern const struct rda5802_region_data rda5802_region_data[TUNER_NUM_REGIONS]; | ||
37 | |||
38 | struct rda5802_dbg_info | ||
39 | { | ||
40 | uint16_t regs[16]; /* Read registers */ | ||
41 | }; | ||
42 | |||
43 | bool rda5802_detect(void); | ||
44 | void rda5802_init(void); | ||
45 | int rda5802_set(int setting, int value); | ||
46 | int rda5802_get(int setting); | ||
47 | void rda5802_dbg_info(struct rda5802_dbg_info *nfo); | ||
48 | |||
49 | #ifndef CONFIG_TUNER_MULTI | ||
50 | #define tuner_set rda5802_set | ||
51 | #define tuner_get rda5802_get | ||
52 | #endif | ||
53 | |||
54 | #endif /* _RDA5802_H_ */ | ||