Lines Matching refs:constant

75     } constant;  member
99 } constant; member
154 dev_obj->constant.default_pipe = default_pipe_hdl; in device_alloc()
155 dev_obj->constant.port_hdl = port_hdl; in device_alloc()
157 dev_obj->constant.speed = speed; in device_alloc()
158 dev_obj->constant.desc = dev_desc; in device_alloc()
175 if (dev_obj->constant.config_desc) { in device_free()
176 heap_caps_free((usb_config_desc_t *)dev_obj->constant.config_desc); in device_free()
179 if (dev_obj->constant.str_desc_manu) { in device_free()
180 heap_caps_free((usb_str_desc_t *)dev_obj->constant.str_desc_manu); in device_free()
182 if (dev_obj->constant.str_desc_product) { in device_free()
183 heap_caps_free((usb_str_desc_t *)dev_obj->constant.str_desc_product); in device_free()
185 if (dev_obj->constant.str_desc_ser_num) { in device_free()
186 heap_caps_free((usb_str_desc_t *)dev_obj->constant.str_desc_ser_num); in device_free()
188 heap_caps_free((usb_device_desc_t *)dev_obj->constant.desc); in device_free()
189 ESP_ERROR_CHECK(hcd_pipe_free(dev_obj->constant.default_pipe)); in device_free()
232 ESP_EARLY_LOGE(USBH_TAG, "Dev %d EP 0 Error", dev_obj->constant.address); in default_pipe_callback()
234 ESP_LOGE(USBH_TAG, "Dev %d EP 0 Error", dev_obj->constant.address); in default_pipe_callback()
241 ESP_EARLY_LOGE(USBH_TAG, "Dev %d EP 0 STALL", dev_obj->constant.address); in default_pipe_callback()
243 ESP_LOGE(USBH_TAG, "Dev %d EP 0 STALL", dev_obj->constant.address); in default_pipe_callback()
257 …yield = p_usbh_obj->constant.notif_cb(USB_NOTIF_SOURCE_USBH, in_isr, p_usbh_obj->constant.notif_cb… in default_pipe_callback()
265 xSemaphoreTake(p_usbh_obj->constant.mux_lock, portMAX_DELAY); in handle_pipe_halt_and_flush()
277 xSemaphoreGive(p_usbh_obj->constant.mux_lock); in handle_pipe_halt_and_flush()
283 xSemaphoreTake(p_usbh_obj->constant.mux_lock, portMAX_DELAY); in handle_dev_free()
295 xSemaphoreGive(p_usbh_obj->constant.mux_lock); in handle_dev_free()
324 usbh_obj->constant.notif_cb = usbh_config->notif_cb; in usbh_install()
325 usbh_obj->constant.notif_cb_arg = usbh_config->notif_cb_arg; in usbh_install()
326 usbh_obj->constant.event_cb = usbh_config->event_cb; in usbh_install()
327 usbh_obj->constant.event_cb_arg = usbh_config->event_cb_arg; in usbh_install()
328 usbh_obj->constant.ctrl_xfer_cb = usbh_config->ctrl_xfer_cb; in usbh_install()
329 usbh_obj->constant.ctrl_xfer_cb_arg = usbh_config->ctrl_xfer_cb_arg; in usbh_install()
330 usbh_obj->constant.mux_lock = mux_lock; in usbh_install()
366 xSemaphoreTake(usbh_obj->constant.mux_lock, portMAX_DELAY); in usbh_uninstall()
377 xSemaphoreGive(usbh_obj->constant.mux_lock); in usbh_uninstall()
381 vSemaphoreDelete(usbh_obj->constant.mux_lock); in usbh_uninstall()
387 xSemaphoreGive(p_usbh_obj->constant.mux_lock); in usbh_uninstall()
418 ESP_ERROR_CHECK(hcd_pipe_command(dev_obj->constant.default_pipe, HCD_PIPE_CMD_HALT)); in usbh_process()
419 ESP_ERROR_CHECK(hcd_pipe_command(dev_obj->constant.default_pipe, HCD_PIPE_CMD_FLUSH)); in usbh_process()
423 ESP_LOGD(USBH_TAG, "Default pipe device %d", dev_obj->constant.address); in usbh_process()
425 urb_t *urb = hcd_urb_dequeue(dev_obj->constant.default_pipe); in usbh_process()
428 …p_usbh_obj->constant.ctrl_xfer_cb((usb_device_handle_t)dev_obj, urb, p_usbh_obj->constant.ctrl_xfe… in usbh_process()
429 urb = hcd_urb_dequeue(dev_obj->constant.default_pipe); in usbh_process()
437 hcd_pipe_command(dev_obj->constant.default_pipe, HCD_PIPE_CMD_CLEAR); in usbh_process()
441 ESP_LOGE(USBH_TAG, "Device %d gone", dev_obj->constant.address); in usbh_process()
442 …p_usbh_obj->constant.event_cb((usb_device_handle_t)dev_obj, USBH_EVENT_DEV_GONE, p_usbh_obj->const… in usbh_process()
453 hcd_port_handle_t port_hdl = dev_obj->constant.port_hdl; in usbh_process()
454 ESP_LOGD(USBH_TAG, "Freeing device %d", dev_obj->constant.address); in usbh_process()
457 …p_usbh_obj->constant.event_cb((usb_device_handle_t)NULL, USBH_EVENT_DEV_ALL_FREE, p_usbh_obj->cons… in usbh_process()
461 …p_usbh_obj->constant.hub_req_cb(port_hdl, USBH_HUB_REQ_PORT_RECOVER, p_usbh_obj->constant.hub_req_… in usbh_process()
465 ESP_LOGD(USBH_TAG, "Disable device port %d", dev_obj->constant.address); in usbh_process()
466 …p_usbh_obj->constant.hub_req_cb(dev_obj->constant.port_hdl, USBH_HUB_REQ_PORT_DISABLE, p_usbh_obj-… in usbh_process()
468 ESP_LOGD(USBH_TAG, "New device %d", dev_obj->constant.address); in usbh_process()
469 …p_usbh_obj->constant.event_cb((usb_device_handle_t)dev_obj, USBH_EVENT_DEV_NEW, p_usbh_obj->consta… in usbh_process()
484 xSemaphoreTake(p_usbh_obj->constant.mux_lock, portMAX_DELAY); in usbh_num_devs()
486 xSemaphoreGive(p_usbh_obj->constant.mux_lock); in usbh_num_devs()
503 dev_addr_list[num_filled] = dev_obj->constant.address; in usbh_dev_addr_list_fill()
512 dev_addr_list[num_filled] = dev_obj->constant.address; in usbh_dev_addr_list_fill()
534 if (dev_obj->constant.address == dev_addr) { in usbh_dev_open()
540 if (dev_obj->constant.address == dev_addr) { in usbh_dev_open()
589 … p_usbh_obj->constant.notif_cb(USB_NOTIF_SOURCE_USBH, false, p_usbh_obj->constant.notif_cb_arg); in usbh_dev_close()
632 … p_usbh_obj->constant.notif_cb(USB_NOTIF_SOURCE_USBH, false, p_usbh_obj->constant.notif_cb_arg); in usbh_dev_mark_all_free()
645 USBH_CHECK_FROM_CRIT(dev_obj->constant.address > 0, ESP_ERR_INVALID_STATE); in usbh_dev_get_addr()
646 *dev_addr = dev_obj->constant.address; in usbh_dev_get_addr()
666 dev_info->speed = dev_obj->constant.speed; in usbh_dev_get_info()
667 dev_info->dev_addr = dev_obj->constant.address; in usbh_dev_get_info()
668 dev_info->bMaxPacketSize0 = dev_obj->constant.desc->bMaxPacketSize0; in usbh_dev_get_info()
670 assert(dev_obj->constant.config_desc); in usbh_dev_get_info()
671 dev_info->bConfigurationValue = dev_obj->constant.config_desc->bConfigurationValue; in usbh_dev_get_info()
673 dev_info->str_desc_manufacturer = dev_obj->constant.str_desc_manu; in usbh_dev_get_info()
674 dev_info->str_desc_product = dev_obj->constant.str_desc_product; in usbh_dev_get_info()
675 dev_info->str_desc_serial_num = dev_obj->constant.str_desc_ser_num; in usbh_dev_get_info()
690 *dev_desc_ret = dev_obj->constant.desc; in usbh_dev_get_desc()
708 assert(dev_obj->constant.config_desc); in usbh_dev_get_config_desc()
709 *config_desc_ret = dev_obj->constant.config_desc; in usbh_dev_get_config_desc()
727 if (hcd_pipe_get_state(dev_obj->constant.default_pipe) != HCD_PIPE_STATE_ACTIVE) { in usbh_dev_submit_ctrl_urb()
731 ret = hcd_urb_enqueue(dev_obj->constant.default_pipe, urb); in usbh_dev_submit_ctrl_urb()
759 .dev_speed = dev_obj->constant.speed, in usbh_ep_alloc()
760 .dev_addr = dev_obj->constant.address, in usbh_ep_alloc()
763 ret = hcd_pipe_alloc(dev_obj->constant.port_hdl, &pipe_config, &pipe_hdl); in usbh_ep_alloc()
773 xSemaphoreTake(p_usbh_obj->constant.mux_lock, portMAX_DELAY); in usbh_ep_alloc()
790 xSemaphoreGive(p_usbh_obj->constant.mux_lock); in usbh_ep_alloc()
818 xSemaphoreTake(p_usbh_obj->constant.mux_lock, portMAX_DELAY); in usbh_ep_free()
838 xSemaphoreGive(p_usbh_obj->constant.mux_lock); in usbh_ep_free()
861 xSemaphoreTake(p_usbh_obj->constant.mux_lock, portMAX_DELAY); in usbh_ep_get_context()
878 xSemaphoreGive(p_usbh_obj->constant.mux_lock); in usbh_ep_get_context()
894 USBH_CHECK_FROM_CRIT(p_usbh_obj->constant.hub_req_cb == NULL, ESP_ERR_INVALID_STATE); in usbh_hub_is_installed()
895 p_usbh_obj->constant.hub_req_cb = hub_req_callback; in usbh_hub_is_installed()
896 p_usbh_obj->constant.hub_req_cb_arg = callback_arg; in usbh_hub_is_installed()
914 *default_pipe_hdl = dev_obj->constant.default_pipe; in usbh_hub_add_dev()
956 … p_usbh_obj->constant.notif_cb(USB_NOTIF_SOURCE_USBH, false, p_usbh_obj->constant.notif_cb_arg); in usbh_hub_pass_event()
973 dev_obj->constant.address = dev_addr; in usbh_hub_enum_fill_dev_addr()
982 memcpy((usb_device_desc_t *)dev_obj->constant.desc, device_desc, sizeof(usb_device_desc_t)); in usbh_hub_enum_fill_dev_desc()
998 assert(dev_obj->constant.config_desc == NULL); in usbh_hub_enum_fill_config_desc()
999 dev_obj->constant.config_desc = config_desc; in usbh_hub_enum_fill_config_desc()
1017 assert(dev_obj->constant.str_desc_manu == NULL); in usbh_hub_enum_fill_str_desc()
1018 dev_obj->constant.str_desc_manu = str_desc_fill; in usbh_hub_enum_fill_str_desc()
1021 assert(dev_obj->constant.str_desc_product == NULL); in usbh_hub_enum_fill_str_desc()
1022 dev_obj->constant.str_desc_product = str_desc_fill; in usbh_hub_enum_fill_str_desc()
1025 assert(dev_obj->constant.str_desc_ser_num == NULL); in usbh_hub_enum_fill_str_desc()
1026 dev_obj->constant.str_desc_ser_num = str_desc_fill; in usbh_hub_enum_fill_str_desc()
1038 xSemaphoreTake(p_usbh_obj->constant.mux_lock, portMAX_DELAY); in usbh_hub_enum_done()
1046 xSemaphoreGive(p_usbh_obj->constant.mux_lock); in usbh_hub_enum_done()
1049 …ESP_ERROR_CHECK(hcd_pipe_update_callback(dev_obj->constant.default_pipe, default_pipe_callback, (v… in usbh_hub_enum_done()
1052 … p_usbh_obj->constant.notif_cb(USB_NOTIF_SOURCE_USBH, false, p_usbh_obj->constant.notif_cb_arg); in usbh_hub_enum_done()