mirror of https://github.com/ARMmbed/mbed-os.git
USBHOST: TARGET_STM fix in hal for hub support
parent
fdec62002e
commit
c581230cd3
|
@ -930,11 +930,15 @@ static void HCD_HC_IN_IRQHandler(HCD_HandleTypeDef *hhcd, uint8_t chnum)
|
|||
/* re-activate the channel */
|
||||
tmpreg = USBx_HC(chnum)->HCCHAR;
|
||||
tmpreg &= ~USB_OTG_HCCHAR_CHDIS;
|
||||
tmpreg |= USB_OTG_HCCHAR_CHENA;
|
||||
if ( hhcd->hc[chnum].urb_state != URB_ERROR) {
|
||||
tmpreg |= USB_OTG_HCCHAR_CHENA;
|
||||
reactivate = 1;
|
||||
}
|
||||
USBx_HC(chnum)->HCCHAR = tmpreg;
|
||||
reactivate = 1;
|
||||
}
|
||||
__HAL_HCD_CLEAR_HC_INT(chnum, USB_OTG_HCINT_CHH);
|
||||
if (hhcd->hc[chnum].state == 0) reactivate = 1;
|
||||
|
||||
if (reactivate == 0) HAL_HCD_HC_NotifyURBChange_Callback(hhcd, chnum, hhcd->hc[chnum].urb_state);
|
||||
}
|
||||
|
||||
|
|
|
@ -931,10 +931,14 @@ static void HCD_HC_IN_IRQHandler(HCD_HandleTypeDef *hhcd, uint8_t chnum)
|
|||
/* re-activate the channel */
|
||||
tmpreg = USBx_HC(chnum)->HCCHAR;
|
||||
tmpreg &= ~USB_OTG_HCCHAR_CHDIS;
|
||||
tmpreg |= USB_OTG_HCCHAR_CHENA;
|
||||
if ( hhcd->hc[chnum].urb_state != URB_ERROR) {
|
||||
tmpreg |= USB_OTG_HCCHAR_CHENA;
|
||||
reactivate = 1;
|
||||
}
|
||||
USBx_HC(chnum)->HCCHAR = tmpreg;
|
||||
reactivate = 1;
|
||||
|
||||
}
|
||||
if (hhcd->hc[chnum].state == 0) reactivate = 1;
|
||||
__HAL_HCD_CLEAR_HC_INT(chnum, USB_OTG_HCINT_CHH);
|
||||
if (reactivate == 0) HAL_HCD_HC_NotifyURBChange_Callback(hhcd, chnum, hhcd->hc[chnum].urb_state);
|
||||
}
|
||||
|
|
|
@ -932,11 +932,14 @@ static void HCD_HC_IN_IRQHandler (HCD_HandleTypeDef *hhcd, uint8_t chnum)
|
|||
/* re-activate the channel */
|
||||
tmpreg = USBx_HC(chnum)->HCCHAR;
|
||||
tmpreg &= ~USB_OTG_HCCHAR_CHDIS;
|
||||
tmpreg |= USB_OTG_HCCHAR_CHENA;
|
||||
if ( hhcd->hc[chnum].urb_state != URB_ERROR) {
|
||||
tmpreg |= USB_OTG_HCCHAR_CHENA;
|
||||
reactivate = 1;
|
||||
}
|
||||
USBx_HC(chnum)->HCCHAR = tmpreg;
|
||||
reactivate = 1;
|
||||
}
|
||||
__HAL_HCD_CLEAR_HC_INT(chnum, USB_OTG_HCINT_CHH);
|
||||
if (hhcd->hc[chnum].state == 0) reactivate = 1;
|
||||
if (reactivate == 0 )HAL_HCD_HC_NotifyURBChange_Callback(hhcd, chnum, hhcd->hc[chnum].urb_state);
|
||||
}
|
||||
|
||||
|
|
|
@ -939,11 +939,14 @@ static void HCD_HC_IN_IRQHandler (HCD_HandleTypeDef *hhcd, uint8_t chnum)
|
|||
/* re-activate the channel */
|
||||
tmpreg = USBx_HC(chnum)->HCCHAR;
|
||||
tmpreg &= ~USB_OTG_HCCHAR_CHDIS;
|
||||
tmpreg |= USB_OTG_HCCHAR_CHENA;
|
||||
if ( hhcd->hc[chnum].urb_state != URB_ERROR) {
|
||||
tmpreg |= USB_OTG_HCCHAR_CHENA;
|
||||
reactivate = 1;
|
||||
}
|
||||
USBx_HC(chnum)->HCCHAR = tmpreg;
|
||||
reactivate = 1;
|
||||
}
|
||||
__HAL_HCD_CLEAR_HC_INT(chnum, USB_OTG_HCINT_CHH);
|
||||
if (hhcd->hc[chnum].state == 0) reactivate = 1;
|
||||
if (reactivate == 0) HAL_HCD_HC_NotifyURBChange_Callback(hhcd, chnum, hhcd->hc[chnum].urb_state);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue