summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.c6
-rw-r--r--apps/iap.c12
2 files changed, 14 insertions, 4 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index c0a476dc10..94076bf64d 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -122,6 +122,10 @@
122#include "usb_core.h" 122#include "usb_core.h"
123#endif 123#endif
124 124
125#if defined(IPOD_ACCESSORY_PROTOCOL)
126#include "iap.h"
127#endif
128
125/*---------------------------------------------------*/ 129/*---------------------------------------------------*/
126/* SPECIAL DEBUG STUFF */ 130/* SPECIAL DEBUG STUFF */
127/*---------------------------------------------------*/ 131/*---------------------------------------------------*/
@@ -1182,7 +1186,7 @@ bool dbg_ports(void)
1182#endif 1186#endif
1183 1187
1184#if defined(IPOD_ACCESSORY_PROTOCOL) 1188#if defined(IPOD_ACCESSORY_PROTOCOL)
1185extern unsigned char serbuf[]; 1189 const unsigned char *serbuf = iap_get_serbuf();
1186 lcd_putsf(0, line++, "IAP PACKET: %02x %02x %02x %02x %02x %02x %02x %02x", 1190 lcd_putsf(0, line++, "IAP PACKET: %02x %02x %02x %02x %02x %02x %02x %02x",
1187 serbuf[0], serbuf[1], serbuf[2], serbuf[3], serbuf[4], serbuf[5], 1191 serbuf[0], serbuf[1], serbuf[2], serbuf[3], serbuf[4], serbuf[5],
1188 serbuf[6], serbuf[7]); 1192 serbuf[6], serbuf[7]);
diff --git a/apps/iap.c b/apps/iap.c
index 4d2ec625cd..f53717e625 100644
--- a/apps/iap.c
+++ b/apps/iap.c
@@ -52,7 +52,7 @@ static unsigned long iap_remotebtn = 0;
52static int iap_repeatbtn = 0; 52static int iap_repeatbtn = 0;
53static bool iap_btnrepeat = false, iap_btnshuffle = false; 53static bool iap_btnrepeat = false, iap_btnshuffle = false;
54 54
55unsigned char serbuf[RX_BUFLEN]; 55static unsigned char serbuf[RX_BUFLEN];
56static int serbuf_i = 0; 56static int serbuf_i = 0;
57 57
58static unsigned char response[TX_BUFLEN]; 58static unsigned char response[TX_BUFLEN];
@@ -837,13 +837,13 @@ void iap_handlepkt(void)
837 /* tuner frequency from scan */ 837 /* tuner frequency from scan */
838 case 0x13: 838 case 0x13:
839 { 839 {
840 rmt_tuner_freq(); 840 rmt_tuner_freq(serbuf);
841 break; 841 break;
842 } 842 }
843 /* RDS station name 0x21 1E 00 + ASCII text*/ 843 /* RDS station name 0x21 1E 00 + ASCII text*/
844 case 0x21: 844 case 0x21:
845 { 845 {
846 rmt_tuner_rds_data(); 846 rmt_tuner_rds_data(serbuf);
847 break; 847 break;
848 } 848 }
849 } 849 }
@@ -868,3 +868,9 @@ int remote_control_rx(void)
868 868
869 return btn; 869 return btn;
870} 870}
871
872const unsigned char *iap_get_serbuf(void)
873{
874 return serbuf;
875}
876