Whitespace changes in ep_buffer.xc

This commit is contained in:
Angel Cascarino
2022-01-12 15:30:43 +00:00
parent 6b0688d23e
commit d33397164b

View File

@@ -448,9 +448,9 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
if(receivedSampleFreq != AUDIO_STOP_FOR_DFU) if(receivedSampleFreq != AUDIO_STOP_FOR_DFU)
{ {
sampleFreq = receivedSampleFreq; sampleFreq = receivedSampleFreq;
#ifdef FB_TOLERANCE_TEST #ifdef FB_TOLERANCE_TEST
expected_fb = ((sampleFreq * 0x2000) / frameTime); expected_fb = ((sampleFreq * 0x2000) / frameTime);
#endif #endif
/* Reset FB */ /* Reset FB */
/* Note, Endpoint 0 will hold off host for a sufficient period to allow our feedback /* Note, Endpoint 0 will hold off host for a sufficient period to allow our feedback
* to stabilise (i.e. sofCount == 128 to fire) */ * to stabilise (i.e. sofCount == 128 to fire) */
@@ -798,9 +798,9 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
midi_waiting_on_send_to_host = 0; midi_waiting_on_send_to_host = 0;
} }
break; break;
#endif #endif
#ifdef IAP #ifdef IAP
/* IAP OUT from host. Datalength writen to tmp */ /* IAP OUT from host. Datalength writen to tmp */
case XUD_GetData_Select(c_iap_from_host, ep_iap_from_host, length, result): case XUD_GetData_Select(c_iap_from_host, ep_iap_from_host, length, result):
@@ -831,9 +831,9 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
if(result == XUD_RES_RST) if(result == XUD_RES_RST)
{ {
XUD_ResetEndpoint(ep_iap_to_host, null); XUD_ResetEndpoint(ep_iap_to_host, null);
#ifdef IAP_INT_EP #ifdef IAP_INT_EP
XUD_ResetEndpoint(ep_iap_to_host_int, null); XUD_ResetEndpoint(ep_iap_to_host_int, null);
#endif #endif
iap_send_reset(c_iap); iap_send_reset(c_iap);
iap_draining_chan = 1; // Drain c_iap until a reset is sent back iap_draining_chan = 1; // Drain c_iap until a reset is sent back
iap_data_collected_from_device = 0; iap_data_collected_from_device = 0;
@@ -848,15 +848,15 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
} }
break; /* IAP IN to host */ break; /* IAP IN to host */
#ifdef IAP_INT_EP #ifdef IAP_INT_EP
case XUD_SetData_Select(c_iap_to_host_int, ep_iap_to_host_int, result): case XUD_SetData_Select(c_iap_to_host_int, ep_iap_to_host_int, result):
/* Do nothing.. */ /* Do nothing.. */
/* Note, could get a reset notification here, but deal with it in the case above */ /* Note, could get a reset notification here, but deal with it in the case above */
break; break;
#endif #endif
#ifdef IAP_EA_NATIVE_TRANS #ifdef IAP_EA_NATIVE_TRANS
/* iAP EA Native Transport OUT from host */ /* iAP EA Native Transport OUT from host */
case XUD_GetData_Select(c_iap_ea_native_out, ep_iap_ea_native_out, iap_ea_native_rx_length, result): case XUD_GetData_Select(c_iap_ea_native_out, ep_iap_ea_native_out, iap_ea_native_rx_length, result):
if ((result == XUD_RES_OKAY) && iap_ea_native_rx_length > 0) if ((result == XUD_RES_OKAY) && iap_ea_native_rx_length > 0)
@@ -889,10 +889,10 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
} }
break; break;
//:: //::
#endif #endif
#endif #endif
#if( 0 < HID_CONTROLS ) #if( 0 < HID_CONTROLS )
/* HID Report Data */ /* HID Report Data */
case XUD_SetData_Select(c_hid, ep_hid, result): case XUD_SetData_Select(c_hid, ep_hid, result):
hid_ready_flag = 0U; hid_ready_flag = 0U;
@@ -902,9 +902,9 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
hidCalcNextReportTime(hid_ready_id); hidCalcNextReportTime(hid_ready_id);
hidClearChangePending(hid_ready_id); hidClearChangePending(hid_ready_id);
break; break;
#endif #endif
#ifdef MIDI #ifdef MIDI
/* Received word from MIDI thread - Check for ACK or Data */ /* Received word from MIDI thread - Check for ACK or Data */
case midi_get_ack_or_data(c_midi, is_ack, datum): case midi_get_ack_or_data(c_midi, is_ack, datum):
if (is_ack) if (is_ack)
@@ -955,9 +955,9 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
} }
} }
break; break;
#endif /* ifdef MIDI */ #endif /* ifdef MIDI */
#ifdef IAP #ifdef IAP
/* Received word from iap thread - Check for ACK or Data */ /* Received word from iap thread - Check for ACK or Data */
case iap_get_ack_or_reset_or_data(c_iap, is_ack_iap, is_reset, datum_iap): case iap_get_ack_or_reset_or_data(c_iap, is_ack_iap, is_reset, datum_iap):
@@ -1016,16 +1016,16 @@ void XUA_Buffer_Ep(register chanend c_aud_out,
if (iap_data_collected_from_device == iap_expected_data_length) if (iap_data_collected_from_device == iap_expected_data_length)
{ {
XUD_Result_t result1 = XUD_RES_OKAY, result2; XUD_Result_t result1 = XUD_RES_OKAY, result2;
#ifdef IAP_INT_EP #ifdef IAP_INT_EP
result1 = XUD_SetReady_In(ep_iap_to_host_int, gc_zero_buffer, 0); result1 = XUD_SetReady_In(ep_iap_to_host_int, gc_zero_buffer, 0);
#endif #endif
result2 = XUD_SetReady_In(ep_iap_to_host, iap_to_host_buffer, iap_data_collected_from_device); result2 = XUD_SetReady_In(ep_iap_to_host, iap_to_host_buffer, iap_data_collected_from_device);
if((result1 == XUD_RES_RST) || (result2 == XUD_RES_RST)) if((result1 == XUD_RES_RST) || (result2 == XUD_RES_RST))
{ {
#ifdef IAP_INT_EP #ifdef IAP_INT_EP
XUD_ResetEndpoint(ep_iap_to_host_int, null); XUD_ResetEndpoint(ep_iap_to_host_int, null);
#endif #endif
XUD_ResetEndpoint(ep_iap_to_host, null); XUD_ResetEndpoint(ep_iap_to_host, null);
iap_send_reset(c_iap); iap_send_reset(c_iap);
iap_draining_chan = 1; // Drain c_iap until a reset is sent back iap_draining_chan = 1; // Drain c_iap until a reset is sent back