From 7b596416bf2cf533a514b4d1f7b95c6de6efa7d5 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Thu, 29 Dec 2011 12:02:49 +0000 Subject: Gigabeat S: Update RDS processing to use asynchronous I2C rather than thread. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31462 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/config/gigabeats.h | 3 ++- firmware/export/si4700.h | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'firmware/export') diff --git a/firmware/export/config/gigabeats.h b/firmware/export/config/gigabeats.h index 04e7b156b6..9a34791ab1 100644 --- a/firmware/export/config/gigabeats.h +++ b/firmware/export/config/gigabeats.h @@ -90,6 +90,7 @@ #define CONFIG_TUNER SI4700 #define HAVE_RDS_CAP +#define SI4700_RDS_ASYNC /* Define this if you have the WM8978 audio codec */ #define HAVE_WM8978 @@ -163,7 +164,7 @@ #define GPIO_EVENT_MASK (USE_GPIO1_EVENTS) /* Define this if target has an additional number of threads specific to it */ -#define TARGET_EXTRA_THREADS 3 +#define TARGET_EXTRA_THREADS 2 /* Type of mobile power - check this out */ #define BATTERY_CAPACITY_DEFAULT 700 /* default battery capacity */ diff --git a/firmware/export/si4700.h b/firmware/export/si4700.h index 761ad1ca24..fe55dd3853 100644 --- a/firmware/export/si4700.h +++ b/firmware/export/si4700.h @@ -44,10 +44,18 @@ bool si4700_st(void); /** RDS support **/ void si4700_rds_init(void); -/* Read raw RDS info for processing */ -bool si4700_rds_read_raw(uint16_t data[4]); /* Radio is fully powered up or about to be powered down */ void si4700_rds_powerup(bool on); +#ifdef SI4700_RDS_ASYNC +/* Read raw RDS info for processing - asynchronously */ +void si4700_read_raw_async(int count); +void si4700_rds_read_raw_async(void); +void si4700_rds_read_raw_async_complete(unsigned char *regbuf, + uint16_t data[4]); +#else +/* Read raw RDS info for processing */ +bool si4700_rds_read_raw(uint16_t data[4]); +#endif /* Obtain specified string */ char* si4700_get_rds_info(int setting); /* Set the event flag */ -- cgit v1.2.3