add volatile for HcEpType & ChannelEna
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user