Remove IAP_BUFFERED as this is the only option now.
This commit is contained in:
@@ -17,10 +17,6 @@
|
||||
#undef IAP
|
||||
#endif
|
||||
|
||||
#if defined(IAP_BUFFERED) && (IAP_BUFFERED == 0)
|
||||
#undef IAP_BUFFERED
|
||||
#endif
|
||||
|
||||
#if defined(CONNECTOR_30_PIN) && (CONNECTOR_30_PIN == 0)
|
||||
#undef CONNECTOR_30_PIN
|
||||
#endif
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
void decouple(chanend c_audio_out,
|
||||
chanend ?c_led,
|
||||
chanend ?c_midi, chanend ?c_clk_int
|
||||
#ifdef IAP_BUFFERED
|
||||
#ifdef IAP
|
||||
, chanend ?c_iap
|
||||
#endif
|
||||
);
|
||||
|
||||
@@ -157,7 +157,6 @@ int midi_from_host_usb_ep = 0;
|
||||
#endif
|
||||
|
||||
#ifdef IAP
|
||||
#ifdef IAP_BUFFERED
|
||||
unsigned g_iap_reset = 0;
|
||||
unsigned g_iap_from_host_flag = 0;
|
||||
unsigned g_iap_to_host_flag = 0;
|
||||
@@ -165,7 +164,6 @@ int iap_to_host_usb_ep = 0;
|
||||
int iap_to_host_int_usb_ep = 0;
|
||||
int iap_from_host_usb_ep = 0;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int aud_from_host_usb_ep = 0;
|
||||
int aud_to_host_usb_ep = 0;
|
||||
@@ -178,13 +176,11 @@ int g_midi_from_host_buffer[MAX_USB_MIDI_PACKET_SIZE/4+4];
|
||||
#endif
|
||||
|
||||
#ifdef IAP
|
||||
#ifdef IAP_BUFFERED
|
||||
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];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// shared global aud buffering variables
|
||||
|
||||
@@ -638,7 +634,7 @@ void check_for_interrupt(chanend ?c_clk_int) {
|
||||
#pragma unsafe arrays
|
||||
void decouple(chanend c_mix_out,
|
||||
chanend ?c_midi, chanend ?c_clk_int
|
||||
#ifdef IAP_BUFFERED
|
||||
#ifdef IAP
|
||||
, chanend ?c_iap
|
||||
#endif
|
||||
)
|
||||
@@ -664,7 +660,6 @@ void decouple(chanend c_mix_out,
|
||||
#endif
|
||||
|
||||
#ifdef IAP
|
||||
#ifdef IAP_BUFFERED
|
||||
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);
|
||||
@@ -680,7 +675,6 @@ void decouple(chanend c_mix_out,
|
||||
int iap_waiting_on_send_to_host = 0;
|
||||
int iap_to_host_flag = 0;
|
||||
int iap_from_host_flag = 0;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int t = array_to_xc_ptr(outAudioBuff);
|
||||
@@ -752,7 +746,6 @@ void decouple(chanend c_mix_out,
|
||||
#endif
|
||||
|
||||
#ifdef IAP
|
||||
#ifdef IAP_BUFFERED
|
||||
//asm("ldaw %0, dp[g_iap_to_host_buffer]":"=r"(iap_to_host_buffer));
|
||||
asm("ldaw %0, dp[g_iap_from_host_buffer]":"=r"(iap_from_host_buffer));
|
||||
|
||||
@@ -767,7 +760,6 @@ void decouple(chanend c_mix_out,
|
||||
// send the current host -> device buffer out of the fifo
|
||||
XUD_SetReady(iap_from_host_usb_ep, 1);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef OUTPUT
|
||||
// wait for usb_buffer to set up
|
||||
@@ -1172,7 +1164,6 @@ void decouple(chanend c_mix_out,
|
||||
#endif // MIDI
|
||||
|
||||
#ifdef IAP
|
||||
#ifdef IAP_BUFFERED
|
||||
GET_SHARED_GLOBAL(iap_reset, g_iap_reset);
|
||||
if (iap_reset) {
|
||||
iap_send_reset(c_iap); // What if this happen in the middle of a send/ack?
|
||||
@@ -1297,7 +1288,6 @@ void decouple(chanend c_mix_out,
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#endif // IAP
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
void buffer(chanend c_aud_out, chanend c_aud_in, chanend c_aud_fb,
|
||||
chanend c_midi_from_host,
|
||||
chanend c_midi_to_host,
|
||||
#ifdef IAP_BUFFERED
|
||||
#ifdef IAP
|
||||
chanend c_iap_from_host,
|
||||
chanend c_iap_to_host,
|
||||
chanend c_iap_to_host_int,
|
||||
|
||||
@@ -74,7 +74,7 @@ extern unsigned g_numUsbChanIn;
|
||||
void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud_fb,
|
||||
chanend c_midi_from_host,
|
||||
chanend c_midi_to_host,
|
||||
#ifdef IAP_BUFFERED
|
||||
#ifdef IAP
|
||||
chanend c_iap_from_host,
|
||||
chanend c_iap_to_host,
|
||||
chanend c_iap_to_host_int,
|
||||
@@ -92,12 +92,10 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
|
||||
XUD_ep ep_midi_to_host = XUD_Init_Ep(c_midi_to_host);
|
||||
#endif
|
||||
#ifdef IAP
|
||||
#ifdef IAP_BUFFERED
|
||||
XUD_ep ep_iap_from_host = XUD_Init_Ep(c_iap_from_host);
|
||||
XUD_ep ep_iap_to_host = XUD_Init_Ep(c_iap_to_host);
|
||||
XUD_ep ep_iap_to_host_int = XUD_Init_Ep(c_iap_to_host_int);
|
||||
#endif
|
||||
#endif
|
||||
#if defined(SPDIF_RX) || defined(ADAT_RX)
|
||||
XUD_ep ep_int = XUD_Init_Ep(c_int);
|
||||
#endif
|
||||
@@ -129,11 +127,9 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
|
||||
#endif
|
||||
|
||||
#ifdef IAP
|
||||
#ifdef IAP_BUFFERED
|
||||
xc_ptr iap_from_host_buffer = 0;
|
||||
xc_ptr iap_to_host_buffer = 0;
|
||||
xc_ptr iap_to_host_waiting_buffer = 0;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
set_thread_fast_mode_on();
|
||||
@@ -184,7 +180,6 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
|
||||
#endif
|
||||
|
||||
#ifdef IAP
|
||||
#ifdef IAP_BUFFERED
|
||||
// get the two buffers to use for iap device->host
|
||||
asm("ldaw %0, dp[g_iap_to_host_buffer_A]":"=r"(iap_to_host_buffer));
|
||||
asm("ldaw %0, dp[g_iap_to_host_buffer_B]":"=r"(iap_to_host_waiting_buffer));
|
||||
@@ -199,7 +194,6 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
|
||||
swap(iap_to_host_buffer, iap_to_host_waiting_buffer);
|
||||
SET_SHARED_GLOBAL(g_iap_from_host_flag, 1);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef OUTPUT
|
||||
SET_SHARED_GLOBAL(g_aud_from_host_flag, 1);
|
||||
@@ -545,7 +539,6 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
|
||||
#endif
|
||||
|
||||
#ifdef IAP
|
||||
#ifdef IAP_BUFFERED
|
||||
case inuint_byref(c_iap_from_host, tmp):
|
||||
asm("#iap h->d");
|
||||
|
||||
@@ -625,7 +618,6 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
|
||||
// Don't need to handle data here as always ZLP
|
||||
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user