diff options
| author | sakumisu <[email protected]> | 2024-02-07 21:37:17 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2024-02-07 21:37:17 +0800 |
| commit | e34ecc6cbba709d1e102392eb3edf0b5d7dfd7db (patch) | |
| tree | 6486aabaebda2c61527dd5573878ff9324f1c811 | |
| parent | d1c7fa8c191efa3028794b1d6965ea3229e14c85 (diff) | |
add volatile for HcEpType & ChannelEna
| -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 475a04ef..364b9cc6 100644 --- a/port/dwc2/usb_hc_dwc2.c +++ b/port/dwc2/usb_hc_dwc2.c @@ -236,8 +236,8 @@ static inline void dwc2_chan_transfer(struct usbh_bus *bus, uint8_t ch_num, uint static void dwc2_halt(struct usbh_bus *bus, uint8_t ch_num) { volatile uint32_t count = 0U; - uint32_t HcEpType = (USB_OTG_HC(ch_num)->HCCHAR & USB_OTG_HCCHAR_EPTYP) >> 18; - uint32_t ChannelEna = (USB_OTG_HC(ch_num)->HCCHAR & USB_OTG_HCCHAR_CHENA) >> 31; + volatile uint32_t HcEpType = (USB_OTG_HC(ch_num)->HCCHAR & USB_OTG_HCCHAR_EPTYP) >> 18; + volatile uint32_t ChannelEna = (USB_OTG_HC(ch_num)->HCCHAR & USB_OTG_HCCHAR_CHENA) >> 31; if (((USB_OTG_GLB->GAHBCFG & USB_OTG_GAHBCFG_DMAEN) == USB_OTG_GAHBCFG_DMAEN) && (ChannelEna == 0U)) { |
