From ec026e36dbd666599746d2ef95169f23041dc440 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Thu, 7 Mar 2013 11:52:28 +0000 Subject: [PATCH] Just tidy up --- module_usb_audio/endpoint0/descriptors_2.h | 3 +-- module_usb_audio/endpoint0/endpoint0.xc | 22 +--------------------- module_usb_audio/usb_buffer/decouple.xc | 3 ++- module_usb_audio/usb_buffer/usb_buffer.xc | 3 +-- 4 files changed, 5 insertions(+), 26 deletions(-) diff --git a/module_usb_audio/endpoint0/descriptors_2.h b/module_usb_audio/endpoint0/descriptors_2.h index 077dd146..ca38d944 100644 --- a/module_usb_audio/endpoint0/descriptors_2.h +++ b/module_usb_audio/endpoint0/descriptors_2.h @@ -1,8 +1,7 @@ /** * @file DeviceDescriptors_2.h - * @brief Device Descriptors and params for Audio 2.0 + * @brief Device Descriptors * @author Ross Owen, XMOS Limited - * @version 1.4 */ diff --git a/module_usb_audio/endpoint0/endpoint0.xc b/module_usb_audio/endpoint0/endpoint0.xc index 4e135d1b..b67bbd8f 100755 --- a/module_usb_audio/endpoint0/endpoint0.xc +++ b/module_usb_audio/endpoint0/endpoint0.xc @@ -85,7 +85,7 @@ unsigned char mixSel[MIX_INPUTS]; int min(int x, int y); /* Records alt setting for each interface */ -int interfaceAlt[NUM_INTERFACES] = {0, 0, 0, 0}; +int interfaceAlt[NUM_INTERFACES]; /* Global current device config var*/ unsigned g_config = 0; @@ -267,24 +267,6 @@ void Endpoint0( chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl, VendorAudioRequestsInit(c_audioControl, c_mix_ctl, c_clk_ctl); #endif -#if 0 - { - char rdata[1]; - char wdata[1]; - - //wdata[0] = 77; - //write_glx_periph_reg(GLXID, XS1_GLX_PERIPH_SCTH_ID, 0x0, 0, 1, wdata); - - - read_glx_periph_reg(GLXID, XS1_GLX_PERIPH_SCTH_ID, 0x1, 0, 1, rdata); - - if(rdata[0] != 0) - { - while(1); - } - // printintln(rdata[0]); -#endif - #ifdef DFU /* Check if device has started in DFU mode */ if (DFUReportResetState(null)) @@ -893,8 +875,6 @@ void Endpoint0( chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl, { g_curUsbSpeed = XUD_ResetEndpoint(ep0_out, ep0_in); - //printintln(g_curUsbSpeed); - g_config = 0; #ifdef DFU diff --git a/module_usb_audio/usb_buffer/decouple.xc b/module_usb_audio/usb_buffer/decouple.xc index 7669c53d..5328bcdb 100644 --- a/module_usb_audio/usb_buffer/decouple.xc +++ b/module_usb_audio/usb_buffer/decouple.xc @@ -1005,6 +1005,7 @@ void decouple(chanend c_mix_out, #ifdef IAP +#if 1 GET_SHARED_GLOBAL(iap_reset, g_iap_reset); if (iap_reset) { @@ -1016,6 +1017,7 @@ void decouple(chanend c_mix_out, iap_data_collected_from_device = 0; SET_SHARED_GLOBAL(g_iap_to_host_flag, 0); } +#endif // Need to handle sending ZLP on iap_to_host_usb_ep_int to signal iOS device to collect from bulk endpoint. /* Check if buffer() has send IAP packet to host */ GET_SHARED_GLOBAL(iap_to_host_flag, g_iap_to_host_flag); @@ -1069,7 +1071,6 @@ void decouple(chanend c_mix_out, if (iap_data_remaining_to_device) { read_byte_via_xc_ptr(datum_iap, iap_from_host_rdptr); - //printintln(datum_iap); outuint(c_iap, datum_iap); iap_from_host_rdptr += 1; iap_data_remaining_to_device -= 1; diff --git a/module_usb_audio/usb_buffer/usb_buffer.xc b/module_usb_audio/usb_buffer/usb_buffer.xc index 611c9bcd..33189720 100644 --- a/module_usb_audio/usb_buffer/usb_buffer.xc +++ b/module_usb_audio/usb_buffer/usb_buffer.xc @@ -592,7 +592,7 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud case XUD_SetData_Select(c_iap_to_host, ep_iap_to_host, tmp): asm("#iap d->h"); - // ack the decouple thread to say it has been sent to host + // ack the decouple thread to say it has been sent to host SET_SHARED_GLOBAL(g_iap_to_host_flag, 1); swap(iap_to_host_buffer, iap_to_host_waiting_buffer); @@ -600,7 +600,6 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud case XUD_SetData_Select(c_iap_to_host_int, ep_iap_to_host_int, tmp): asm("#iap int d->h"); - //printintln(1); break; #endif