From f6d95a5b6041a9215d2deec7e37b0736b5ad4285 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Thu, 7 Mar 2013 16:37:09 +0000 Subject: [PATCH] IAP removed from decouple --- module_usb_audio/usb_buffer/decouple.xc | 51 ----------------------- module_usb_audio/usb_buffer/usb_buffer.xc | 12 ++++-- 2 files changed, 9 insertions(+), 54 deletions(-) diff --git a/module_usb_audio/usb_buffer/decouple.xc b/module_usb_audio/usb_buffer/decouple.xc index 2b0db215..776af732 100644 --- a/module_usb_audio/usb_buffer/decouple.xc +++ b/module_usb_audio/usb_buffer/decouple.xc @@ -19,12 +19,6 @@ **/ #include #include "xc_ptr.h" -#define NO_INLINE_MIDI_SELECT_HANDLER 1 -#include "usb_midi.h" -#define NO_INLINE_IAP_SELECT_HANDLER 1 -#ifdef IAP -#include "iAP.h" -#endif #include "devicedefines.h" #include "interrupt.h" #include "clockcmds.h" @@ -77,36 +71,11 @@ unsigned dir = 0; void GetADCCounts(unsigned samFreq, int &min, int &mid, int &max); -#ifdef IAP -static inline void swap(xc_ptr &a, xc_ptr &b) -{ - xc_ptr tmp; - tmp = a; - a = b; - b = tmp; - return; -} - -unsigned g_iap_reset = 1; -unsigned g_iap_from_host_flag = 0; -unsigned g_iap_to_host_flag = 0; -int iap_to_host_usb_ep = 0; -int iap_to_host_int_usb_ep = 0; -int iap_from_host_usb_ep = 0; -unsigned int g_iap_to_host_buffer_A[MAX_IAP_PACKET_SIZE/4+4]; -unsigned int g_iap_to_host_buffer_B[MAX_IAP_PACKET_SIZE/4+4]; -int g_iap_from_host_buffer[MAX_IAP_PACKET_SIZE/4+4]; -unsigned g_zero_buffer[1]; -unsigned char gc_zero_buffer[4]; -#endif - int aud_from_host_usb_ep = 0; int aud_to_host_usb_ep = 0; int int_usb_ep = 0; - /* Shared global audio buffering variables */ - unsigned g_aud_from_host_buffer; unsigned g_aud_to_host_buffer; unsigned g_aud_to_host_flag = 0; @@ -556,26 +525,6 @@ void decouple(chanend c_mix_out, int aud_to_host_flag = 0; #endif -#ifdef IAP - xc_ptr iap_from_host_rdptr; - xc_ptr iap_from_host_buffer; - xc_ptr iap_to_host_buffer_being_sent = array_to_xc_ptr(g_iap_to_host_buffer_A); - xc_ptr iap_to_host_buffer_being_collected = array_to_xc_ptr(g_iap_to_host_buffer_B); - xc_ptr zero_buffer = array_to_xc_ptr(g_zero_buffer); - - int is_ack_iap; - int is_reset; - int iap_reset; - unsigned int datum_iap; - int iap_data_remaining_to_device = 0; - int iap_data_collected_from_device = 0; - int iap_waiting_on_send_to_host = 0; - int iap_to_host_flag = 0; - int iap_from_host_flag = 0; - int iap_expecting_length = 1; - int iap_expecting_data_length = 0; -#endif - int t = array_to_xc_ptr(outAudioBuff); int aud_in_ready = 0; diff --git a/module_usb_audio/usb_buffer/usb_buffer.xc b/module_usb_audio/usb_buffer/usb_buffer.xc index 6880aad9..da763be2 100644 --- a/module_usb_audio/usb_buffer/usb_buffer.xc +++ b/module_usb_audio/usb_buffer/usb_buffer.xc @@ -58,10 +58,16 @@ int g_midi_from_host_buffer[MAX_USB_MIDI_PACKET_SIZE/4+4]; #endif #ifdef IAP -extern unsigned int g_iap_to_host_buffer_A[MAX_IAP_PACKET_SIZE/4+4]; -extern unsigned int g_iap_to_host_buffer_B[MAX_IAP_PACKET_SIZE/4+4]; -extern int g_iap_from_host_buffer[MAX_IAP_PACKET_SIZE/4+4]; +unsigned int g_iap_to_host_buffer_A[MAX_IAP_PACKET_SIZE/4+4]; +unsigned int g_iap_to_host_buffer_B[MAX_IAP_PACKET_SIZE/4+4]; +int g_iap_from_host_buffer[MAX_IAP_PACKET_SIZE/4+4]; unsigned char gc_zero_buffer2[4]; +unsigned g_iap_reset = 1; +unsigned g_iap_from_host_flag = 0; +unsigned g_iap_to_host_flag = 0; +int iap_to_host_usb_ep = 0; +int iap_to_host_int_usb_ep = 0; +int iap_from_host_usb_ep = 0; #endif unsigned char fb_clocks[16];