summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2023-03-25 00:17:04 +0800
committersakumisu <[email protected]>2023-03-25 00:36:44 +0800
commitc47b8dd3e1d66ef93656a5c9cd898a2c626b614d (patch)
tree7942a8d29e1466f6c9ad447fb474e7e39bb0b697
parent25d14f3f89cb775898e0e4c483201a0991265fbd (diff)
enable dwc2 nak irq for bulk if someday uses
-rw-r--r--port/dwc2/usb_hc_dwc2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/port/dwc2/usb_hc_dwc2.c b/port/dwc2/usb_hc_dwc2.c
index 19dcebc5..1f18771f 100644
--- a/port/dwc2/usb_hc_dwc2.c
+++ b/port/dwc2/usb_hc_dwc2.c
@@ -194,6 +194,7 @@ static void dwc2_pipe_init(uint8_t ch_num, uint8_t devaddr, uint8_t ep_addr, uin
case USB_ENDPOINT_TYPE_CONTROL:
regval |= USB_OTG_HCINTMSK_NAKM;
case USB_ENDPOINT_TYPE_BULK:
+ //regval |= USB_OTG_HCINTMSK_NAKM;
break;
case USB_ENDPOINT_TYPE_INTERRUPT:
regval |= USB_OTG_HCINTMSK_NAKM;
@@ -979,7 +980,7 @@ static void dwc2_inchan_irq_handler(uint8_t ch_num)
/* re-activate the channel */
if (chan->ep_type == 0x00) {
dwc2_control_pipe_init(chan, urb->setup, urb->transfer_buffer, urb->transfer_buffer_length);
- } else if (chan->ep_type == 0x03) {
+ } else if ((chan->ep_type == 0x03) || (chan->ep_type == 0x02)) {
dwc2_bulk_intr_pipe_init(chan, urb->transfer_buffer, urb->transfer_buffer_length);
} else {
}
@@ -1108,7 +1109,7 @@ static void dwc2_outchan_irq_handler(uint8_t ch_num)
/* re-activate the channel */
if (chan->ep_type == 0x00) {
dwc2_control_pipe_init(chan, urb->setup, urb->transfer_buffer, urb->transfer_buffer_length);
- } else if (chan->ep_type == 0x03) {
+ } else if ((chan->ep_type == 0x03) || (chan->ep_type == 0x02)) {
dwc2_bulk_intr_pipe_init(chan, urb->transfer_buffer, urb->transfer_buffer_length);
} else {
}