mirror of
https://github.com/sakumisu/CherryUSB.git
synced 2025-05-09 00:21:44 +08:00
HPMicro: update hpmicro port files
Signed-off-by: Zhihong Chen <zhihong.chen@hpmicro.com>
This commit is contained in:
parent
6517919bd2
commit
70ef616676
@ -35,6 +35,11 @@ static void usb_host_mode_init(USB_Type *ptr)
|
||||
/* Set parallel transceiver width */
|
||||
ptr->PORTSC1 &= ~USB_PORTSC1_PTW_MASK;
|
||||
|
||||
#ifdef CONFIG_USB_HOST_FORCE_FULL_SPEED
|
||||
/* Set usb forced to full speed mode */
|
||||
ptr->PORTSC1 |= USB_PORTSC1_PFSC_MASK;
|
||||
#endif
|
||||
|
||||
/* Not use interrupt threshold. */
|
||||
ptr->USBCMD &= ~USB_USBCMD_ITC_MASK;
|
||||
}
|
||||
@ -53,7 +58,7 @@ void usb_hc_low_level_init(struct usbh_bus *bus)
|
||||
#endif
|
||||
}
|
||||
|
||||
usb_phy_init((USB_Type *)(bus->hcd.reg_base));
|
||||
usb_phy_init((USB_Type *)(bus->hcd.reg_base), true);
|
||||
intc_m_enable_irq(_hcd_irqnum[bus->hcd.hcd_id]);
|
||||
}
|
||||
|
||||
@ -86,18 +91,18 @@ uint8_t usbh_get_port_speed(struct usbh_bus *bus, const uint8_t port)
|
||||
|
||||
extern void USBH_IRQHandler(uint8_t busid);
|
||||
|
||||
SDK_DECLARE_EXT_ISR_M(IRQn_USB0, isr_usbh0)
|
||||
void isr_usbh0(void)
|
||||
{
|
||||
USBH_IRQHandler(_hcd_busid[0]);
|
||||
}
|
||||
SDK_DECLARE_EXT_ISR_M(IRQn_USB0, isr_usbh0)
|
||||
|
||||
#ifdef HPM_USB1_BASE
|
||||
SDK_DECLARE_EXT_ISR_M(IRQn_USB1, isr_usbh1)
|
||||
void isr_usbh1(void)
|
||||
{
|
||||
USBH_IRQHandler(_hcd_busid[1]);
|
||||
}
|
||||
SDK_DECLARE_EXT_ISR_M(IRQn_USB1, isr_usbh1)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -128,8 +128,6 @@ int usbd_set_remote_wakeup(uint8_t busid)
|
||||
}
|
||||
|
||||
usb_force_port_resume(ptr);
|
||||
while (ptr->PORTSC1 & USB_PORTSC1_FPR_MASK) {
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -362,18 +360,18 @@ void USBD_IRQHandler(uint8_t busid)
|
||||
|
||||
#if !defined(USBD_USE_CUSTOM_ISR) || !USBD_USE_CUSTOM_ISR
|
||||
|
||||
SDK_DECLARE_EXT_ISR_M(IRQn_USB0, isr_usbd0)
|
||||
void isr_usbd0(void)
|
||||
{
|
||||
USBD_IRQHandler(_dcd_busid[0]);
|
||||
}
|
||||
SDK_DECLARE_EXT_ISR_M(IRQn_USB0, isr_usbd0)
|
||||
|
||||
#ifdef HPM_USB1_BASE
|
||||
SDK_DECLARE_EXT_ISR_M(IRQn_USB1, isr_usbd1)
|
||||
void isr_usbd1(void)
|
||||
{
|
||||
USBD_IRQHandler(_dcd_busid[1]);
|
||||
}
|
||||
SDK_DECLARE_EXT_ISR_M(IRQn_USB1, isr_usbd1)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user