| /components/legacy/usb/usbhost/core/ |
| A D | hub.c | 91 msg.content.hub = hcd->roothub; in rt_usbh_root_hub_connect_handler() 101 rt_usbh_event_signal(hcd, &msg); in rt_usbh_root_hub_connect_handler() 108 msg.content.hub = hcd->roothub; in rt_usbh_root_hub_disconnect_handler() 111 rt_usbh_event_signal(hcd, &msg); in rt_usbh_root_hub_disconnect_handler() 444 device->hcd = hub->hcd; in rt_usbh_hub_port_change() 550 hub->hcd = device->hcd; in rt_usbh_hub_enable() 706 if(hcd->roothub == RT_NULL) in rt_usbh_hub_init() 713 hcd->roothub->hcd = hcd; in rt_usbh_hub_init() 714 hcd->roothub->num_ports = hcd->num_ports; in rt_usbh_hub_init() 717 hcd->usb_mq = rt_mq_create(hcd->parent.parent.name, 32, 16, RT_IPC_FLAG_FIFO); in rt_usbh_hub_init() [all …]
|
| A D | usbhost_core.c | 48 dev[i].hcd = uhcd; in rt_usbh_alloc_instance() 109 rt_usb_hcd_alloc_pipe(device->hcd, &device->pipe_ep0_out, device, &ep0_out_desc); in rt_usbh_attatch_instance() 110 rt_usb_hcd_alloc_pipe(device->hcd, &device->pipe_ep0_in, device, &ep0_in_desc); in rt_usbh_attatch_instance() 135 rt_usb_hcd_free_pipe(device->hcd,device->pipe_ep0_out); in rt_usbh_attatch_instance() 136 rt_usb_hcd_free_pipe(device->hcd,device->pipe_ep0_in); in rt_usbh_attatch_instance() 143 rt_usb_hcd_alloc_pipe(device->hcd, &device->pipe_ep0_out, device, &ep0_out_desc); in rt_usbh_attatch_instance() 144 rt_usb_hcd_alloc_pipe(device->hcd, &device->pipe_ep0_in, device, &ep0_in_desc); in rt_usbh_attatch_instance() 290 rt_usb_hcd_free_pipe(device->hcd,device->pipe_ep0_out); in rt_usbh_detach_instance() 291 rt_usb_hcd_free_pipe(device->hcd,device->pipe_ep0_in); in rt_usbh_detach_instance() 297 rt_usb_hcd_free_pipe(device->hcd,rt_list_entry(l,struct upipe,list)); in rt_usbh_detach_instance() [all …]
|
| /components/drivers/usb/cherryusb/port/hpmicro/ |
| A D | usb_hc_hpm.c | 50 usb_phy_init((USB_Type *)(bus->hcd.reg_base), true); in usb_hc_low_level_init() 55 usb_host_mode_init((USB_Type *)(bus->hcd.reg_base)); in usb_hc_low_level2_init() 57 if (bus->hcd.reg_base == HPM_USB0_BASE) { in usb_hc_low_level2_init() 58 g_usb_hpm_busid[0] = bus->hcd.hcd_id; in usb_hc_low_level2_init() 64 g_usb_hpm_busid[1] = bus->hcd.hcd_id; in usb_hc_low_level2_init() 74 usb_phy_deinit((USB_Type *)(bus->hcd.reg_base)); in usb_hc_low_level_deinit() 76 if (bus->hcd.reg_base == HPM_USB0_BASE) { in usb_hc_low_level_deinit() 96 speed = usb_get_port_speed((USB_Type *)(bus->hcd.reg_base)); in usbh_get_port_speed()
|
| /components/drivers/usb/cherryusb/port/rp2040/ |
| A D | usb_hc_rp2040.c | 107 pipe = &g_rp2040_hcd[bus->hcd.hcd_id].pipe_pool[chidx]; in rp2040_init_endpoint() 764 g_rp2040_hcd[bus->hcd.hcd_id].port_csc = 1; in USBH_IRQHandler() 765 g_rp2040_hcd[bus->hcd.hcd_id].port_pec = 1; in USBH_IRQHandler() 766 g_rp2040_hcd[bus->hcd.hcd_id].port_pe = 1; in USBH_IRQHandler() 767 bus->hcd.roothub.int_buffer[0] = (1 << 1); in USBH_IRQHandler() 768 usbh_hub_thread_wakeup(&bus->hcd.roothub); in USBH_IRQHandler() 770 g_rp2040_hcd[bus->hcd.hcd_id].port_csc = 1; in USBH_IRQHandler() 771 g_rp2040_hcd[bus->hcd.hcd_id].port_pec = 1; in USBH_IRQHandler() 772 g_rp2040_hcd[bus->hcd.hcd_id].port_pe = 0; in USBH_IRQHandler() 773 bus->hcd.roothub.int_buffer[0] = (1 << 1); in USBH_IRQHandler() [all …]
|
| /components/drivers/usb/cherryusb/port/ehci/ |
| A D | usb_hc_ehci.c | 37 qtd = &ehci_qtd_pool[bus->hcd.hcd_id][i]; in ehci_qtd_alloc() 76 qh = &ehci_qh_pool[bus->hcd.hcd_id][i]; in ehci_qh_alloc() 803 g_async_qh_head[bus->hcd.hcd_id].hw.hlp = QH_HLP_QH(&g_async_qh_head[bus->hcd.hcd_id]); in usb_hc_init() 821 g_framelist[bus->hcd.hcd_id][i] = QH_HLP_QH(&g_periodic_qh_head[bus->hcd.hcd_id]); in usb_hc_init() 840 g_ehci_hcd[bus->hcd.hcd_id].has_tt = g_ehci_hcd[bus->hcd.hcd_id].n_cc ? false : true; in usb_hc_init() 844 g_ehci_hcd[bus->hcd.hcd_id].ppc, in usb_hc_init() 903 if (g_ehci_hcd[bus->hcd.hcd_id].ppc) { in usb_hc_init() 912 if (g_ehci_hcd[bus->hcd.hcd_id].has_tt) { in usb_hc_init() 919 if (g_ehci_hcd[bus->hcd.hcd_id].has_tt) { in usb_hc_init() 958 if (g_ehci_hcd[bus->hcd.hcd_id].ppc) { in usb_hc_deinit() [all …]
|
| A D | usb_glue_ma35d0.c | 44 if (bus->hcd.reg_base == HSUSBH0_BASE) { in usb_hc_low_level_init() 71 rt_hw_interrupt_install(HSUSBH0_IRQn, nu_echi_isr, (void *)bus->hcd.hcd_id, "ehci0"); in usb_hc_low_level_init() 75 } else if (bus->hcd.reg_base == HSUSBH1_BASE) { in usb_hc_low_level_init() 101 rt_hw_interrupt_install(HSUSBH1_IRQn, nu_echi_isr, (void *)bus->hcd.hcd_id, "ehci1"); in usb_hc_low_level_init()
|
| A D | usb_glue_t113.c | 97 *(volatile rt_uint32_t *)(bus->hcd.reg_base + 0x810) &= ~(1 << 3); in usb_clean_siddp() 107 …*(volatile rt_uint32_t *)(bus->hcd.reg_base + 0x800) |= (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8… in usb_hci_set_passby() 119 USBH_IRQHandler(bus->hcd.hcd_id); in t113_ehci_isr() 135 OHCI_IRQHandler(bus->hcd.hcd_id); in t113_ohci_isr() 163 …ector : %d, phy : %X\n", bus->busid, vector, *(volatile rt_uint32_t *)(bus->hcd.reg_base + 0x810)); in usb_hc_low_level_init()
|
| A D | usb_hc_ehci.h | 13 #define EHCI_HCCR ((struct ehci_hccr *)(uintptr_t)(bus->hcd.reg_base + CONFIG_USB_EHCI_HCCR_OFFSET)) 14 …_HCOR ((struct ehci_hcor *)(uintptr_t)(bus->hcd.reg_base + CONFIG_USB_EHCI_HCCR_OFFSET + g_ehci_hc…
|
| A D | usb_glue_aic.c | 32 USBH_IRQHandler(bus->hcd.hcd_id); in aic_ehci_isr() 39 OHCI_IRQHandler(bus->hcd.hcd_id); in aic_ohci_isr() 89 if (bus->hcd.reg_base == config[i].base_addr) in usb_hc_low_level_init()
|
| /components/drivers/usb/cherryusb/port/dwc2/ |
| A D | usb_hc_dwc2.c | 11 #define USB_OTG_GLB ((DWC2_GlobalTypeDef *)(bus->hcd.reg_base)) 695 dwc2_get_hwparams(bus->hcd.reg_base, &g_dwc2_hcd[bus->hcd.hcd_id].hw_params); in usb_hc_init() 696 dwc2_get_user_params(bus->hcd.reg_base, &g_dwc2_hcd[bus->hcd.hcd_id].user_params); in usb_hc_init() 702 …g_dwc2_hcd[bus->hcd.hcd_id].user_params.total_fifo_size = g_dwc2_hcd[bus->hcd.hcd_id].hw_params.to… in usb_hc_init() 1440 bus->hcd.roothub.int_buffer[0] = (1 << 1); in dwc2_port_irq_handler() 1441 usbh_hub_thread_wakeup(&bus->hcd.roothub); in dwc2_port_irq_handler() 1444 g_dwc2_hcd[bus->hcd.hcd_id].port_csc = 1; in dwc2_port_irq_handler() 1450 g_dwc2_hcd[bus->hcd.hcd_id].port_pec = 1; in dwc2_port_irq_handler() 1482 g_dwc2_hcd[bus->hcd.hcd_id].port_occ = 1; in dwc2_port_irq_handler() 1505 g_dwc2_hcd[bus->hcd.hcd_id].port_csc = 1; in USBH_IRQHandler() [all …]
|
| A D | usb_glue_kendryte.c | 116 if ((uintptr_t)rt_hw_mmu_v2p(&mmu_info, (void *)bus->hcd.reg_base) == usb_dev_addr[0]) { in usb_hc_low_level_init() 128 … rt_hw_interrupt_install(173, usb_hc_interrupt_cb, (void *)(uintptr_t)bus->hcd.hcd_id, "usbh0"); in usb_hc_low_level_init() 143 … rt_hw_interrupt_install(174, usb_hc_interrupt_cb, (void *)(uintptr_t)bus->hcd.hcd_id, "usbh1"); in usb_hc_low_level_init() 150 if ((uintptr_t)rt_hw_mmu_v2p(&mmu_info, (void *)bus->hcd.reg_base) == usb_dev_addr[0]) { in usb_hc_low_level_deinit()
|
| A D | usb_glue_st.c | 662 if (bus->hcd.reg_base == 0x40040000UL) { // USB_OTG_HS_PERIPH_BASE in usb_hc_low_level_init() 663 g_usb_dwc2_busid[1] = bus->hcd.hcd_id; in usb_hc_low_level_init() 666 g_usb_dwc2_busid[0] = bus->hcd.hcd_id; in usb_hc_low_level_init() 670 g_dwc2_instance.Instance = (USB_OTG_GlobalTypeDef *)bus->hcd.reg_base; in usb_hc_low_level_init() 680 if (bus->hcd.reg_base == 0x40040000UL) { // USB_OTG_HS_PERIPH_BASE in usb_hc_low_level_deinit() 688 g_dwc2_instance.Instance = (USB_OTG_GlobalTypeDef *)bus->hcd.reg_base; in usb_hc_low_level_deinit()
|
| A D | usb_glue_esp.c | 194 void *reg_base = (void*)bus->hcd.reg_base; in usb_hc_low_level_init() 224 void *reg_base = (void*)bus->hcd.reg_base; in usb_hc_low_level_deinit()
|
| /components/legacy/usb/usbhost/class/ |
| A D | hid.c | 53 if (rt_usb_hcd_setup_xfer(device->hcd, device->pipe_ep0_out, &setup, timeout) == 8) in rt_usbh_hid_set_idle() 54 if (rt_usb_hcd_pipe_xfer(device->hcd, device->pipe_ep0_in, RT_NULL, 0, timeout) == 0) in rt_usbh_hid_set_idle() 89 if (rt_usb_hcd_setup_xfer(device->hcd, device->pipe_ep0_out, &setup, timeout) == 8) in rt_usbh_hid_get_report() 91 if (rt_usb_hcd_pipe_xfer(device->hcd, device->pipe_ep0_in, buffer, size, timeout) == size) in rt_usbh_hid_get_report() 132 if (rt_usb_hcd_setup_xfer(device->hcd, device->pipe_ep0_out, &setup, timeout) == 8) in rt_usbh_hid_set_report() 165 if (rt_usb_hcd_setup_xfer(device->hcd, device->pipe_ep0_out, &setup, timeout) == 8) in rt_usbh_hid_set_protocal() 201 if (rt_usb_hcd_setup_xfer(device->hcd, device->pipe_ep0_out, &setup, timeout) == 8) in rt_usbh_hid_get_report_descriptor() 258 RT_ASSERT(((struct uhintf*)pipe->inst)->device->hcd != RT_NULL); in rt_usbh_hid_callback() 260 rt_usb_hcd_pipe_xfer(((struct uhintf*)pipe->inst)->device->hcd, pipe, in rt_usbh_hid_callback() 347 ret = rt_usb_hcd_alloc_pipe(intf->device->hcd, &hid->pipe_in, in rt_usbh_hid_enable() [all …]
|
| A D | adk.c | 77 if(rt_usb_hcd_control_xfer(device->hcd, device, &setup, (void*)protocol, 2, in rt_usbh_adk_get_protocol() 111 if(rt_usb_hcd_control_xfer(device->hcd, device, &setup, (void*)str, in rt_usbh_adk_send_string() 144 if(rt_usb_hcd_control_xfer(device->hcd, device, &setup, RT_NULL, 0, in rt_usbh_adk_start() 170 length = rt_usb_hcd_bulk_xfer(intf->device->hcd, adk->pipe_in, in rt_usbh_adk_read() 196 length = rt_usb_hcd_bulk_xfer(intf->device->hcd, adk->pipe_out, in rt_usbh_adk_write() 321 ret = rt_usb_hcd_alloc_pipe(intf->device->hcd, &adk->pipe_in, in rt_usbh_adk_enable() 328 ret = rt_usb_hcd_alloc_pipe(intf->device->hcd, &adk->pipe_out, in rt_usbh_adk_enable() 389 rt_usb_hcd_free_pipe(intf->device->hcd, adk->pipe_in); in rt_usbh_adk_disable() 392 rt_usb_hcd_free_pipe(intf->device->hcd, adk->pipe_out); in rt_usbh_adk_disable()
|
| A D | mass.c | 80 size = rt_usb_hcd_pipe_xfer(stor->pipe_in->inst->hcd, in _pipe_check() 122 size = rt_usb_hcd_pipe_xfer(stor->pipe_out->inst->hcd, stor->pipe_out, in rt_usb_bulk_only_xfer() 133 size = rt_usb_hcd_pipe_xfer(pipe->inst->hcd, pipe, (void*)buffer, in rt_usb_bulk_only_xfer() 144 size = rt_usb_hcd_pipe_xfer(stor->pipe_in->inst->hcd, stor->pipe_in, in rt_usb_bulk_only_xfer() 221 if(rt_usb_hcd_setup_xfer(device->hcd, device->pipe_ep0_out, &setup, timeout) != 8) in rt_usbh_storage_get_max_lun() 225 if(rt_usb_hcd_pipe_xfer(device->hcd, device->pipe_ep0_in, max_lun, 1, timeout) != 1) in rt_usbh_storage_get_max_lun() 229 if(rt_usb_hcd_pipe_xfer(device->hcd, device->pipe_ep0_out, RT_NULL, 0, timeout) != 0) in rt_usbh_storage_get_max_lun() 270 if(rt_usb_hcd_setup_xfer(device->hcd, device->pipe_ep0_out, &setup, timeout) != 8) in rt_usbh_storage_reset() 274 if(rt_usb_hcd_pipe_xfer(device->hcd, device->pipe_ep0_in, RT_NULL, 0, timeout) != 0) in rt_usbh_storage_reset()
|
| A D | ukbd.c | 47 if (rt_usb_hcd_pipe_xfer(intf->device->hcd, ((struct uhid*)intf->user_data)->pipe_in, in kbd_task()
|
| A D | umouse.c | 140 if (rt_usb_hcd_pipe_xfer(intf->device->hcd, ((struct uhid*)intf->user_data)->pipe_in, in mouse_task()
|
| /components/drivers/include/drivers/ |
| A D | usb_host.h | 72 struct uhcd *hcd; member 123 struct uhcd *hcd; member 169 void rt_usbh_hub_init(struct uhcd *hcd); 211 void rt_usbh_root_hub_connect_handler(struct uhcd *hcd, rt_uint8_t port, rt_bool_t isHS); 212 void rt_usbh_root_hub_disconnect_handler(struct uhcd *hcd, rt_uint8_t port); 244 return hcd->ops->open_pipe(*pipe); in rt_usb_hcd_alloc_pipe() 251 rt_inline rt_err_t rt_usb_hcd_free_pipe(uhcd_t hcd, upipe_t pipe) in rt_usb_hcd_free_pipe() argument 254 hcd->ops->close_pipe(pipe); in rt_usb_hcd_free_pipe() 259 int rt_usb_hcd_pipe_xfer(uhcd_t hcd, upipe_t pipe, void* buffer, int nbytes, int timeout); 260 rt_inline int rt_usb_hcd_setup_xfer(uhcd_t hcd, upipe_t pipe, ureq_t setup, int timeout) in rt_usb_hcd_setup_xfer() argument [all …]
|
| /components/drivers/usb/cherryusb/port/ohci/ |
| A D | usb_hc_ohci.c | 29 memset(&g_ohci_hcd[bus->hcd.hcd_id], 0, sizeof(struct ohci_hcd)); in ohci_init() 33 ohci_hcca[bus->hcd.hcd_id].inttbl[i] = 0; in ohci_init() 37 ed = &g_ohci_ed_pool[bus->hcd.hcd_id][index]; in ohci_init() 51 ed = &g_ohci_ed_pool[bus->hcd.hcd_id][index]; in ohci_init() 75 OHCI_HCOR->hchcca = (uintptr_t)&ohci_hcca[bus->hcd.hcd_id]; in ohci_init() 90 g_ohci_hcd[bus->hcd.hcd_id].n_ports = OHCI_HCOR->hcrhdescriptora & OHCI_RHDESCA_NDP_MASK; in ohci_init() 91 USB_LOG_INFO("OHCI n_ports:%d\r\n", g_ohci_hcd[bus->hcd.hcd_id].n_ports); in ohci_init() 126 ed = &g_ohci_ed_pool[bus->hcd.hcd_id][index]; in ohci_deinit() 144 nports = g_ohci_hcd[bus->hcd.hcd_id].n_ports; in ohci_roothub_control() 299 bus->hcd.roothub.int_buffer[0] |= (1 << (port + 1)); in OHCI_IRQHandler() [all …]
|
| A D | usb_hc_ohci.h | 13 #define OHCI_HCOR ((struct ohci_hcor *)(uintptr_t)(bus->hcd.reg_base + CONFIG_USB_OHCI_HCOR_OFFSET))
|
| /components/drivers/usb/cherryusb/port/musb/ |
| A D | usb_hc_musb.c | 17 #define USB_BASE (bus->hcd.reg_base) 461 g_musb_hcd[bus->hcd.hcd_id].port_pe = 0; in usbh_reset_port() 475 g_musb_hcd[bus->hcd.hcd_id].port_pe = 1; in usbh_reset_port() 1003 g_musb_hcd[bus->hcd.hcd_id].port_csc = 1; in USBH_IRQHandler() 1004 g_musb_hcd[bus->hcd.hcd_id].port_pec = 1; in USBH_IRQHandler() 1005 g_musb_hcd[bus->hcd.hcd_id].port_pe = 1; in USBH_IRQHandler() 1006 bus->hcd.roothub.int_buffer[0] = (1 << 1); in USBH_IRQHandler() 1007 usbh_hub_thread_wakeup(&bus->hcd.roothub); in USBH_IRQHandler() 1011 g_musb_hcd[bus->hcd.hcd_id].port_csc = 1; in USBH_IRQHandler() 1012 g_musb_hcd[bus->hcd.hcd_id].port_pec = 1; in USBH_IRQHandler() [all …]
|
| /components/drivers/usb/cherryusb/port/nxp/ |
| A D | usb_glue_mcx.c | 398 usb_host_mode_init((CHIPIDEA_TypeDef *)(bus->hcd.reg_base)); in usb_hc_low_level2_init() 411 CHIPIDEA_TypeDef *ptr = (CHIPIDEA_TypeDef *)bus->hcd.reg_base; in usbh_get_port_speed()
|
| /components/drivers/usb/cherryusb/core/ |
| A D | usbh_core.c | 651 bus->hcd.hcd_id = busid; in usbh_bus_init() 652 bus->hcd.reg_base = reg_base; in usbh_bus_init() 934 hub = &bus->hcd.roothub; in usbh_find_class_instance() 956 hub = &bus->hcd.roothub; in usbh_find_hubport() 1001 hub = &bus->hcd.roothub; in lsusb() 1015 hub = &bus->hcd.roothub; in lsusb()
|
| /components/drivers/usb/cherryusb/class/hub/ |
| A D | usbh_hub.c | 682 hub = &bus->hcd.roothub; in usbh_hub_initialize() 689 hub->int_buffer = bus->hcd.roothub_intbuf; in usbh_hub_initialize() 713 hub = &bus->hcd.roothub; in usbh_hub_deinitialize()
|