diff options
| author | Cumhur Onat <[email protected]> | 2024-07-21 23:32:48 -0400 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-08-23 10:54:28 +0700 |
| commit | c7851e8dcbdac8f895cfe81f2479bc6fcfcc524a (patch) | |
| tree | 1346835654674e34f7d8fa08c0aab14ee67b32e7 /src | |
| parent | 5bb2e66ce774fe174742f0893d82cb7895285983 (diff) | |
only check SNDBAV IRQ if there is data to send
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/analog/max3421/hcd_max3421.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/portable/analog/max3421/hcd_max3421.c b/src/portable/analog/max3421/hcd_max3421.c index 342edef89..3d054b66e 100644 --- a/src/portable/analog/max3421/hcd_max3421.c +++ b/src/portable/analog/max3421/hcd_max3421.c @@ -629,8 +629,9 @@ static void xact_out(uint8_t rhport, max3421_ep_t *ep, bool switch_ep, bool in_i if (!ep->received_nak){ // do not write to fifo or sdnbc register again if previous attempt got NAK uint8_t const xact_len = (uint8_t) tu_min16(ep->total_len - ep->xferred_len, ep->packet_size); - TU_ASSERT(_hcd_data.hirq & HIRQ_SNDBAV_IRQ,); if (xact_len) { + // only check SNDBAV IRQ if there is data to send + TU_ASSERT(_hcd_data.hirq & HIRQ_SNDBAV_IRQ,); fifo_write(rhport, SNDFIFO_ADDR, ep->buf, xact_len, in_isr); } |
