enable dwc2 nak irq for bulk if someday uses

This commit is contained in:
sakumisu
2023-03-25 00:17:04 +08:00
parent 25d14f3f89
commit c47b8dd3e1

View File

@@ -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 {
}