Fix for bug 15181 - the iAP interrupt In EP can now be disabled, as its use is now reported as deprecated by the ATS system. Disabled by default.

This commit is contained in:
Sam Chesney
2014-02-14 14:18:37 +00:00
parent f2366e0f34
commit e3905ae3a4
5 changed files with 41 additions and 4 deletions

View File

@@ -86,7 +86,9 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
#ifdef IAP
chanend c_iap_from_host,
chanend c_iap_to_host,
#ifdef IAP_INT_EP
chanend c_iap_to_host_int,
#endif
chanend c_iap,
#endif
#if defined(SPDIF_RX) || defined(ADAT_RX)
@@ -113,8 +115,10 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
#ifdef IAP
XUD_ep ep_iap_from_host = XUD_InitEp(c_iap_from_host);
XUD_ep ep_iap_to_host = XUD_InitEp(c_iap_to_host);
#ifdef IAP_INT_EP
XUD_ep ep_iap_to_host_int = XUD_InitEp(c_iap_to_host_int);
#endif
#endif
#if defined(SPDIF_RX) || defined(ADAT_RX)
XUD_ep ep_int = XUD_InitEp(c_int);
#endif
@@ -548,8 +552,10 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
if(tmp == -1)
{
XUD_ResetEndpoint(ep_iap_to_host, null);
XUD_ResetEndpoint(ep_iap_to_host_int, null);
XUD_ResetEndpoint(ep_iap_to_host, null);
#ifdef IAP_INT_EP
XUD_ResetEndpoint(ep_iap_to_host_int, null);
#endif
iap_send_reset(c_iap);
iap_draining_chan = 1; // Drain c_iap until a reset is sent back
iap_data_collected_from_device = 0;
@@ -564,6 +570,7 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
}
break; /* IAP IN to host */
#ifdef IAP_INT_EP
case XUD_SetData_Select(c_iap_to_host_int, ep_iap_to_host_int, tmp):
asm("#iap int d->h");
@@ -571,6 +578,7 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
/* Note, could get a reset notification here, but deal with it in the case above */
break;
#endif
#endif
#ifdef HID_CONTROLS
/* HID Report Data */
@@ -698,14 +706,18 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
/* Note we don't ack the last byte yet... */
if (iap_data_collected_from_device == iap_expected_data_length)
{
int reset1, reset2;
int reset1 = 0, reset2;
#ifdef IAP_INT_EP
reset1 = XUD_SetReady_In(ep_iap_to_host_int, gc_zero_buffer, 0);
#endif
reset2 = XUD_SetReady_In(ep_iap_to_host, iap_to_host_buffer, iap_data_collected_from_device);
if((reset1 == -1) || (reset2 == -1))
{
printstr("rst 2");
#ifdef IAP_INT_EP
XUD_ResetEndpoint(ep_iap_to_host_int, null);
#endif
XUD_ResetEndpoint(ep_iap_to_host, null);
iap_send_reset(c_iap);
iap_draining_chan = 1; // Drain c_iap until a reset is sent back