From ab989696503c5703b9f47b9fb6bac22e11833a50 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Thu, 7 Mar 2013 16:56:57 +0000 Subject: [PATCH] Further simplification of IAP receive data case - no longer stick length in buffer[0]. Its pointless --- module_usb_audio/usb_buffer/usb_buffer.xc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/module_usb_audio/usb_buffer/usb_buffer.xc b/module_usb_audio/usb_buffer/usb_buffer.xc index 317f5a1d..e83879bb 100644 --- a/module_usb_audio/usb_buffer/usb_buffer.xc +++ b/module_usb_audio/usb_buffer/usb_buffer.xc @@ -595,11 +595,6 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud asm("#iap h->d"); if(tmp >= 0) { - /* Stick length in beginning of buffer.. */ - write_via_xc_ptr(iap_from_host_buffer, tmp); - - /* Read length from buffer[0] */ - //read_via_xc_ptr(iap_data_remaining_to_device, iap_from_host_buffer); iap_data_remaining_to_device = tmp; // Send length first so iAP thread knows how much data to expect @@ -607,7 +602,7 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud outuint(c_iap, iap_data_remaining_to_device); /* Increment read pointer - buffer[0] is length */ - iap_from_host_rdptr = iap_from_host_buffer + 4; + iap_from_host_rdptr = iap_from_host_buffer; if (iap_data_remaining_to_device) { @@ -740,7 +735,7 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud if (iap_data_remaining_to_device == 0) { /* We have read an entire packet - Mark ready to receive another */ - XUD_SetReady_OutPtr(ep_iap_from_host, iap_from_host_buffer+4); + XUD_SetReady_OutPtr(ep_iap_from_host, iap_from_host_buffer); } else {