Lines Matching refs:usb_handle
54 void *usb_handle; member
109 status = am_hal_usb_ep_xfer(priv->usb_handle, ep, NULL, 0); in udc_ambiq_tx()
111 status = am_hal_usb_ep_xfer(priv->usb_handle, ep, buf->data, buf->len); in udc_ambiq_tx()
141 status = am_hal_usb_ep_xfer(priv->usb_handle, ep, buf->data, rx_size); in udc_ambiq_rx()
158 am_hal_usb_intr_usb_enable(priv->usb_handle, in udc_ambiq_evt_callback()
162 am_hal_usb_ep_init(priv->usb_handle, 0, 0, EP0_MPS); in udc_ambiq_evt_callback()
164 am_hal_usb_set_dev_speed(priv->usb_handle, priv->usb_speed); in udc_ambiq_evt_callback()
171 am_hal_usb_set_dev_state(priv->usb_handle, AM_HAL_USB_DEV_STATE_ACTIVE); in udc_ambiq_evt_callback()
181 am_hal_usb_set_dev_state(priv->usb_handle, AM_HAL_USB_DEV_STATE_SUSPENDED); in udc_ambiq_evt_callback()
243 am_hal_usb_dev_speed_e e_speed = am_hal_get_usb_dev_speed(priv->usb_handle); in udc_ambiq_device_speed()
290 am_hal_usb_ep_state_reset(priv->usb_handle, ep_cfg->addr); in udc_ambiq_ep_dequeue()
304 am_hal_usb_ep_stall(priv->usb_handle, ep_cfg->addr); in udc_ambiq_ep_set_halt()
318 am_hal_usb_ep_clear_stall(priv->usb_handle, ep_cfg->addr); in udc_ambiq_ep_clear_halt()
359 status = am_hal_usb_ep_init(priv->usb_handle, ep_cfg->addr, endpoint_type, ep_cfg->mps); in udc_ambiq_ep_enable()
375 am_hal_usb_ep_state_reset(priv->usb_handle, ep_cfg->addr); in udc_ambiq_ep_disable()
385 am_hal_usb_start_remote_wakeup(priv->usb_handle); in udc_ambiq_host_wakeup()
395 am_hal_usb_set_addr(priv->usb_handle, addr); in udc_ambiq_set_address()
396 am_hal_usb_set_dev_state(priv->usb_handle, AM_HAL_USB_DEV_STATE_ADDRESSED); in udc_ambiq_set_address()
428 am_hal_usb_enter_test_mode(priv->usb_handle); in udc_ambiq_test_mode()
429 am_hal_usb_test_mode(priv->usb_handle, am_usb_test_mode); in udc_ambiq_test_mode()
439 am_hal_usb_attach(priv->usb_handle); in udc_ambiq_enable()
457 am_hal_usb_detach(priv->usb_handle); in udc_ambiq_disable()
458 am_hal_usb_intr_usb_disable(priv->usb_handle, USB_CFG2_SOFE_Msk | USB_CFG2_ResumeE_Msk | in udc_ambiq_disable()
461 am_hal_usb_intr_usb_clear(priv->usb_handle); in udc_ambiq_disable()
463 am_hal_usb_ep_state_reset(priv->usb_handle, i); in udc_ambiq_disable()
464 am_hal_usb_ep_state_reset(priv->usb_handle, BIT(7) | i); in udc_ambiq_disable()
476 am_hal_usb_intr_status_get(priv->usb_handle, &int_status[0], &int_status[1], in udc_ambiq_usb_isr()
478 am_hal_usb_interrupt_service(priv->usb_handle, int_status[0], int_status[1], int_status[2]); in udc_ambiq_usb_isr()
524 if (am_hal_usb_initialize(0, (void *)&priv->usb_handle) != AM_HAL_STATUS_SUCCESS) { in udc_ambiq_init()
531 am_hal_usb_power_control(priv->usb_handle, AM_HAL_SYSCTRL_WAKE, false); in udc_ambiq_init()
544 am_hal_usb_set_dev_speed(priv->usb_handle, priv->usb_speed); in udc_ambiq_init()
546 am_hal_usb_intr_usb_enable(priv->usb_handle, USB_INTRUSB_Reset_Msk); in udc_ambiq_init()
589 am_hal_usb_power_control(priv->usb_handle, AM_HAL_SYSCTRL_DEEPSLEEP, false); in udc_ambiq_shutdown()
591 am_hal_usb_deinitialize(priv->usb_handle); in udc_ambiq_shutdown()
592 priv->usb_handle = NULL; in udc_ambiq_shutdown()
922 am_hal_usb_register_dev_evt_callback(priv->usb_handle, \
924 am_hal_usb_register_ep0_setup_received_callback(priv->usb_handle, \
927 priv->usb_handle, udc_ambiq_ep_xfer_complete_callback_##n); \