summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2011-04-30 10:40:05 +0000
committerBertrik Sikken <bertrik@sikken.nl>2011-04-30 10:40:05 +0000
commit16e793f5d1d626e6506f2b172efa03f46fb0ed39 (patch)
tree024a3241cb6c5ca9ccbc48fe115d2c4f2b4384c0 /apps
parenteac9577f7611f1c505e3168aeb956dd02865afc8 (diff)
downloadrockbox-16e793f5d1d626e6506f2b172efa03f46fb0ed39.tar.gz
rockbox-16e793f5d1d626e6506f2b172efa03f46fb0ed39.zip
iap: update handling of IdentifyDeviceLingoes command and fix RF tuner detection code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29797 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/iap.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/iap.c b/apps/iap.c
index dcdb0fbb91..11b57bb606 100644
--- a/apps/iap.c
+++ b/apps/iap.c
@@ -312,7 +312,12 @@ static void iap_handlepkt_mode0(void)
{
cmd_ok_mode0(cmd);
- if (serbuf[6] == 0x35)
+ uint32_t lingoes = (serbuf[3] << 24) |
+ (serbuf[4] << 16) |
+ (serbuf[5] << 8) |
+ (serbuf[6] << 0);
+
+ if (lingoes == 0x35)
/* FM transmitter sends this: */
/* FF 55 0E 00 13 00 00 00 35 00 00 00 04 00 00 00 00 A6 (??)*/
{
@@ -323,12 +328,11 @@ static void iap_handlepkt_mode0(void)
unsigned char data3[] = {0x05, 0x02};
iap_send_pkt(data3, sizeof(data3));
}
-
else
{
/* ipod fm remote sends this: */
/* FF 55 0E 00 13 00 00 00 8D 00 00 00 0E 00 00 00 03 41 */
- if (serbuf[6] |= 0x80)
+ if (lingoes & (1 << 7)) /* bit 7 = RF tuner lingo */
radio_present = 1;
/* GetDevAuthenticationInfo */
unsigned char data4[] = {0x00, 0x14};