From 749230620b6b3e183a824db848fc85a96733d242 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Fri, 16 Nov 2012 16:48:23 +0000 Subject: [PATCH] Removed iAP code from usb_buffer for release (non-functional anyway..) --- module_usb_audio/usb_buffer/usb_buffer.xc | 101 +--------------------- 1 file changed, 4 insertions(+), 97 deletions(-) diff --git a/module_usb_audio/usb_buffer/usb_buffer.xc b/module_usb_audio/usb_buffer/usb_buffer.xc index 798fc38e..12d5cef3 100644 --- a/module_usb_audio/usb_buffer/usb_buffer.xc +++ b/module_usb_audio/usb_buffer/usb_buffer.xc @@ -580,109 +580,16 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud #endif #ifdef IAP - //case testct_byref(c_iap_from_host, tmp): + #error IAP NOT SUPPORTED IN THIS RELEASE!! + /* IAP OUT from host */ case XUD_GetData_Select(c_iap_from_host, ep_iap_from_host, tmp): - {asm("#iap h->d"); - -#if 0 - if (tmp) { - // Is a control token, not expected - } else { - // Not a control token so is data - /* Get buffer data from host - IAP OUT from host always into a single buffer */ - xc_ptr p = iap_from_host_buffer + 4; - xc_ptr p0 = p; - int tail; - inuint(c_iap_from_host); // And discard - while (!testct(c_iap_from_host)) - { - unsigned int datum = inuint(c_iap_from_host); - write_via_xc_ptr(p, datum); - p += 4; - } - tail = inct(c_iap_from_host); - datalength = p - p0;// - 4; - switch (tail) - { - case 10: - // the tail is 0 which means - datalength -= 6; - break; - case 11: - // the tail is 1 which means - datalength -= 5; - break; - case 12: - // the tail is 2 which means - datalength -= 4; - break; - case 13: - // the tail is 3 which means - datalength -= 3; - break; - default: - break; - } - - // XUD_SetNotReady(ep_iap_from_host); -#endif - //write_via_xc_ptr(iap_from_host_buffer, datalength); - - /* release the buffer */ - //SET_SHARED_GLOBAL(g_iap_from_host_flag, 1); - } + asm("#iap h->d"); break; /* IAP IN to host */ case testct_byref(c_iap_to_host, tmp): asm("#iap d->h"); - if (tmp) - { - // Is a control token so reset - XUD_ResetDrain(c_iap_to_host); - XUD_ResetDrain(c_iap_to_host_int); - XUD_GetBusSpeed(c_iap_to_host); - XUD_GetBusSpeed(c_iap_to_host_int); - - //XUD_SetNotReady(ep_iap_to_host); - //XUD_SetNotReady(ep_iap_to_host_int); - } else { - inuint(c_iap_to_host); // And discard - // fill in the data - //XUD_SetData_Inline(ep_iap_to_host, c_iap_to_host); - - //XUD_SetNotReady(ep_iap_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); - } - break; - - /* IAP interrupt IN to host */ - case testct_byref(c_iap_to_host_int, tmp): - asm("#iap interrupt d->h"); - if (tmp) - { - // Is a control token so reset - XUD_ResetDrain(c_iap_to_host); - XUD_ResetDrain(c_iap_to_host_int); - XUD_GetBusSpeed(c_iap_to_host); - XUD_GetBusSpeed(c_iap_to_host_int); - - //XUD_SetNotReady(ep_iap_to_host); - //XUD_SetNotReady(ep_iap_to_host_int); - } - else - { - inuint(c_iap_to_host_int); // And discard - // fill in the data - // XUD_SetData_Inline(ep_iap_to_host_int, c_iap_to_host_int); - //XUD_SetNotReady(ep_iap_to_host_int); - // Don't need to handle data here as always ZLP - } - break; + break; #endif #ifdef HID_CONTROLS