diff options
| author | sakumisu <[email protected]> | 2023-12-30 14:39:34 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2023-12-30 14:39:34 +0800 |
| commit | 67a3bbe02ecaf7052b28090c01faf9ca5e2140df (patch) | |
| tree | ccf8c8ffc59d81aa89a69557696f627488225166 | |
| parent | 65b2de960bf4b1c4666b43a8a805670c1cb9fe2b (diff) | |
fix hctsiz macro name
| -rw-r--r-- | port/dwc2/usb_hc_dwc2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/port/dwc2/usb_hc_dwc2.c b/port/dwc2/usb_hc_dwc2.c index f8412b96..65d72054 100644 --- a/port/dwc2/usb_hc_dwc2.c +++ b/port/dwc2/usb_hc_dwc2.c @@ -916,7 +916,7 @@ static void dwc2_inchan_irq_handler(uint8_t ch_num) if (urb->errorcode == 0) { uint32_t count = chan->xferlen - (USB_OTG_HC(ch_num)->HCTSIZ & USB_OTG_HCTSIZ_XFRSIZ); /* how many size has received */ - uint32_t has_used_packets = chan->num_packets - ((USB_OTG_HC(ch_num)->HCTSIZ & USB_OTG_DIEPTSIZ_PKTCNT) >> 19); /* how many packets have used */ + uint32_t has_used_packets = chan->num_packets - ((USB_OTG_HC(ch_num)->HCTSIZ & USB_OTG_HCTSIZ_PKTCNT) >> 19); /* how many packets have used */ urb->actual_length += count; @@ -1022,7 +1022,7 @@ static void dwc2_outchan_irq_handler(uint8_t ch_num) if (urb->errorcode == 0) { uint32_t count = USB_OTG_HC(ch_num)->HCTSIZ & USB_OTG_HCTSIZ_XFRSIZ; /* last packet size */ - uint32_t has_used_packets = chan->num_packets - ((USB_OTG_HC(ch_num)->HCTSIZ & USB_OTG_DIEPTSIZ_PKTCNT) >> 19); /* how many packets have used */ + uint32_t has_used_packets = chan->num_packets - ((USB_OTG_HC(ch_num)->HCTSIZ & USB_OTG_HCTSIZ_PKTCNT) >> 19); /* how many packets have used */ urb->actual_length += (has_used_packets - 1) * USB_GET_MAXPACKETSIZE(urb->ep->wMaxPacketSize) + count; //the same with urb->actual_length += chan->xferlen; |
