diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2011-05-02 21:55:13 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2011-05-02 21:55:13 +0000 |
commit | 069567c0bc98304181d5bb47286c1852fdc0333e (patch) | |
tree | 77b8f071cb45b6717f3176d54707acca0eb105da /firmware/drivers/tuner/ipod_remote_tuner.c | |
parent | 8aa1577a0b802f17b89166ea5de34a7a9354dc3b (diff) | |
download | rockbox-069567c0bc98304181d5bb47286c1852fdc0333e.tar.gz rockbox-069567c0bc98304181d5bb47286c1852fdc0333e.zip |
iap: pass length and data pointer to iap_handlepkt functions, this prepares for iap large packet support.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29815 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/tuner/ipod_remote_tuner.c')
-rw-r--r-- | firmware/drivers/tuner/ipod_remote_tuner.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/firmware/drivers/tuner/ipod_remote_tuner.c b/firmware/drivers/tuner/ipod_remote_tuner.c index a7a16c5217..ad84cb9890 100644 --- a/firmware/drivers/tuner/ipod_remote_tuner.c +++ b/firmware/drivers/tuner/ipod_remote_tuner.c | |||
@@ -52,13 +52,16 @@ static void rmt_tuner_signal_power(unsigned char value) | |||
52 | tuner_signal_power = (int)(value); | 52 | tuner_signal_power = (int)(value); |
53 | } | 53 | } |
54 | 54 | ||
55 | void rmt_tuner_freq(const unsigned char *serbuf) | 55 | void rmt_tuner_freq(unsigned int len, const unsigned char *buf) |
56 | { | 56 | { |
57 | unsigned int khz = (serbuf[3] << 24) | (serbuf[4] << 16) | | 57 | /* length currently unused */ |
58 | (serbuf[5] << 8) | serbuf[6]; | 58 | (void)len; |
59 | |||
60 | unsigned int khz = (buf[2] << 24) | (buf[3] << 16) | | ||
61 | (buf[4] << 8) | buf[5]; | ||
59 | tuner_frequency = khz *1000 ; | 62 | tuner_frequency = khz *1000 ; |
60 | radio_tuned = true; | 63 | radio_tuned = true; |
61 | rmt_tuner_signal_power(serbuf[7]); | 64 | rmt_tuner_signal_power(buf[6]); |
62 | } | 65 | } |
63 | 66 | ||
64 | static void rmt_tuner_set_freq(int curr_freq) | 67 | static void rmt_tuner_set_freq(int curr_freq) |
@@ -270,15 +273,15 @@ static bool reply_timeout(void) | |||
270 | return (timeout >= TIMEOUT_VALUE); | 273 | return (timeout >= TIMEOUT_VALUE); |
271 | } | 274 | } |
272 | 275 | ||
273 | void rmt_tuner_rds_data(const unsigned char *serbuf) | 276 | void rmt_tuner_rds_data(unsigned int len, const unsigned char *buf) |
274 | { | 277 | { |
275 | if (serbuf[3] == 0x1E) | 278 | if (buf[2] == 0x1E) |
276 | { | 279 | { |
277 | strlcpy(rds_radioname,serbuf+5,8); | 280 | strlcpy(rds_radioname,buf+4,8); |
278 | } | 281 | } |
279 | else if(serbuf[3] == 0x04) | 282 | else if(buf[2] == 0x04) |
280 | { | 283 | { |
281 | strlcpy(rds_radioinfo,serbuf+5,(serbuf[0]-4)); | 284 | strlcpy(rds_radioinfo,buf+4,len-4); |
282 | } | 285 | } |
283 | rds_event = true; | 286 | rds_event = true; |
284 | } | 287 | } |