forked from PAWPAW-Mirror/lib_xua
Added reset for iAP int ep
This commit is contained in:
@@ -1167,7 +1167,8 @@ void decouple(chanend c_mix_out,
|
|||||||
|
|
||||||
#ifdef IAP
|
#ifdef IAP
|
||||||
GET_SHARED_GLOBAL(iap_reset, g_iap_reset);
|
GET_SHARED_GLOBAL(iap_reset, g_iap_reset);
|
||||||
if (iap_reset) {
|
if (iap_reset)
|
||||||
|
{
|
||||||
iap_send_reset(c_iap); // What if this happen in the middle of a send/ack?
|
iap_send_reset(c_iap); // What if this happen in the middle of a send/ack?
|
||||||
iap_reset = 0;
|
iap_reset = 0;
|
||||||
iap_expecting_length = 1;
|
iap_expecting_length = 1;
|
||||||
|
|||||||
@@ -134,6 +134,10 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
|
|||||||
|
|
||||||
set_thread_fast_mode_on();
|
set_thread_fast_mode_on();
|
||||||
|
|
||||||
|
#ifdef IAP
|
||||||
|
XUD_ResetEndpoint(ep_iap_to_host_int, null);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(SPDIF_RX) || defined(ADAT_RX)
|
#if defined(SPDIF_RX) || defined(ADAT_RX)
|
||||||
asm("stw %0, dp[int_usb_ep]"::"r"(ep_int));
|
asm("stw %0, dp[int_usb_ep]"::"r"(ep_int));
|
||||||
#endif
|
#endif
|
||||||
@@ -615,15 +619,20 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud
|
|||||||
/* IAP interrupt IN to host */
|
/* IAP interrupt IN to host */
|
||||||
case testct_byref(c_iap_to_host_int, tmp):
|
case testct_byref(c_iap_to_host_int, tmp):
|
||||||
asm("#iap interrupt d->h");
|
asm("#iap interrupt d->h");
|
||||||
if (tmp) {
|
if (tmp)
|
||||||
// Is a control token so reset
|
{
|
||||||
} else {
|
// Is a control token so reset
|
||||||
inuint(c_iap_to_host_int); // And discard
|
//printint(1);
|
||||||
// fill in the data
|
XUD_ResetEndpoint(ep_iap_to_host_int, null);
|
||||||
XUD_SetData_Inline(ep_iap_to_host_int, c_iap_to_host_int);
|
XUD_SetNotReady(ep_iap_to_host_int);
|
||||||
|
}
|
||||||
XUD_SetNotReady(ep_iap_to_host_int);
|
else
|
||||||
// Don't need to handle data here as always ZLP
|
{
|
||||||
|
inuint(c_iap_to_host_int); // And discard
|
||||||
|
// fill in the data
|
||||||
|
XUD_SetData_Inline(ep_iap_to_host_int, c_iap_to_host_int);
|
||||||
|
XUD_SetNotReady(ep_iap_to_host_int);
|
||||||
|
// Don't need to handle data here as always ZLP
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user