summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2011-12-17 20:24:19 +0000
committerBertrik Sikken <bertrik@sikken.nl>2011-12-17 20:24:19 +0000
commit8c19dcd598144d028ff1647d850d3a17483e6b9c (patch)
treeb1baea8ffcf26bedf0dea800c62ad33df9fa18f0 /firmware/export
parent17ed3253fc98bcca59d70531a4d81b3be75dc7ea (diff)
downloadrockbox-8c19dcd598144d028ff1647d850d3a17483e6b9c.tar.gz
rockbox-8c19dcd598144d028ff1647d850d3a17483e6b9c.zip
FS#12370: Initial RDS support for Si4701/Si4703 tuner (beast and clip zip)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31346 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/config/gigabeats.h4
-rw-r--r--firmware/export/config/sansaclipzip.h5
-rw-r--r--firmware/export/rds.h33
-rw-r--r--firmware/export/si4700.h14
4 files changed, 55 insertions, 1 deletions
diff --git a/firmware/export/config/gigabeats.h b/firmware/export/config/gigabeats.h
index 0171dd8942..04e7b156b6 100644
--- a/firmware/export/config/gigabeats.h
+++ b/firmware/export/config/gigabeats.h
@@ -89,6 +89,8 @@
89/* Define this if you have a SI4700 fm radio tuner */ 89/* Define this if you have a SI4700 fm radio tuner */
90#define CONFIG_TUNER SI4700 90#define CONFIG_TUNER SI4700
91 91
92#define HAVE_RDS_CAP
93
92/* Define this if you have the WM8978 audio codec */ 94/* Define this if you have the WM8978 audio codec */
93#define HAVE_WM8978 95#define HAVE_WM8978
94 96
@@ -161,7 +163,7 @@
161#define GPIO_EVENT_MASK (USE_GPIO1_EVENTS) 163#define GPIO_EVENT_MASK (USE_GPIO1_EVENTS)
162 164
163/* Define this if target has an additional number of threads specific to it */ 165/* Define this if target has an additional number of threads specific to it */
164#define TARGET_EXTRA_THREADS 2 166#define TARGET_EXTRA_THREADS 3
165 167
166/* Type of mobile power - check this out */ 168/* Type of mobile power - check this out */
167#define BATTERY_CAPACITY_DEFAULT 700 /* default battery capacity */ 169#define BATTERY_CAPACITY_DEFAULT 700 /* default battery capacity */
diff --git a/firmware/export/config/sansaclipzip.h b/firmware/export/config/sansaclipzip.h
index 1eaa67fed0..1ff41a00ec 100644
--- a/firmware/export/config/sansaclipzip.h
+++ b/firmware/export/config/sansaclipzip.h
@@ -34,6 +34,8 @@
34 explicitly if different */ 34 explicitly if different */
35#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO) 35#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO)
36 36
37#define HAVE_RDS_CAP
38
37/* define this if you have a bitmap LCD display */ 39/* define this if you have a bitmap LCD display */
38#define HAVE_LCD_BITMAP 40#define HAVE_LCD_BITMAP
39/* define this if you have a colour LCD */ 41/* define this if you have a colour LCD */
@@ -138,6 +140,9 @@
138/* define this if the flash memory uses the SecureDigital Memory Card protocol */ 140/* define this if the flash memory uses the SecureDigital Memory Card protocol */
139#define CONFIG_STORAGE STORAGE_SD 141#define CONFIG_STORAGE STORAGE_SD
140 142
143/* Define this if target has an additional number of threads specific to it */
144#define TARGET_EXTRA_THREADS 1 /* RDS thread */
145
141#define BATTERY_CAPACITY_DEFAULT 300 /* default battery capacity */ 146#define BATTERY_CAPACITY_DEFAULT 300 /* default battery capacity */
142#define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */ 147#define BATTERY_CAPACITY_MIN 300 /* min. capacity selectable */
143#define BATTERY_CAPACITY_MAX 300 /* max. capacity selectable */ 148#define BATTERY_CAPACITY_MAX 300 /* max. capacity selectable */
diff --git a/firmware/export/rds.h b/firmware/export/rds.h
new file mode 100644
index 0000000000..990f9b47f3
--- /dev/null
+++ b/firmware/export/rds.h
@@ -0,0 +1,33 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (c) 2011 by Bertrik Sikken
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21#include <stdint.h>
22#include <stdbool.h>
23
24void rds_init(void);
25
26void rds_reset(void);
27bool rds_process(uint16_t data[4]);
28
29uint16_t rds_get_pi(void);
30char* rds_get_ps(void);
31char* rds_get_rt(void);
32
33
diff --git a/firmware/export/si4700.h b/firmware/export/si4700.h
index 06a87c484f..761ad1ca24 100644
--- a/firmware/export/si4700.h
+++ b/firmware/export/si4700.h
@@ -39,10 +39,24 @@ void si4700_init(void);
39int si4700_set(int setting, int value); 39int si4700_set(int setting, int value);
40int si4700_get(int setting); 40int si4700_get(int setting);
41void si4700_dbg_info(struct si4700_dbg_info *nfo); 41void si4700_dbg_info(struct si4700_dbg_info *nfo);
42/* For interrupt-based mono/stereo indicator */
43bool si4700_st(void);
44
45/** RDS support **/
46void si4700_rds_init(void);
47/* Read raw RDS info for processing */
48bool si4700_rds_read_raw(uint16_t data[4]);
49/* Radio is fully powered up or about to be powered down */
50void si4700_rds_powerup(bool on);
51/* Obtain specified string */
52char* si4700_get_rds_info(int setting);
53/* Set the event flag */
54void si4700_rds_set_event(void);
42 55
43#ifndef CONFIG_TUNER_MULTI 56#ifndef CONFIG_TUNER_MULTI
44#define tuner_set si4700_set 57#define tuner_set si4700_set
45#define tuner_get si4700_get 58#define tuner_get si4700_get
59#define tuner_get_rds_info si4700_get_rds_info
46#endif 60#endif
47 61
48#endif /* _SI4700_H_ */ 62#endif /* _SI4700_H_ */