Home
last modified time | relevance | path

Searched refs:urb (Results 1 – 15 of 15) sorted by relevance

/hal_espressif-3.6.0/components/usb/test/hcd/
Dtest_hcd_ctrl.c73 urb_t *urb = hcd_urb_dequeue(default_pipe);
74 TEST_ASSERT_EQUAL(urb_list[i], urb);
75 TEST_ASSERT_EQUAL(USB_TRANSFER_STATUS_COMPLETED, urb->transfer.status);
76 TEST_ASSERT_EQUAL(URB_CONTEXT_VAL, urb->transfer.context);
78 TEST_ASSERT_GREATER_OR_EQUAL(sizeof(usb_setup_packet_t), urb->transfer.actual_num_bytes);
79 TEST_ASSERT_LESS_OR_EQUAL(urb->transfer.num_bytes, urb->transfer.actual_num_bytes);
80 …usb_config_desc_t *config_desc = (usb_config_desc_t *)(urb->transfer.data_buffer + sizeof(usb_setu…
97 urb_t *urb = hcd_urb_dequeue(default_pipe);
99 …TEST_ASSERT(urb->transfer.status == USB_TRANSFER_STATUS_COMPLETED || urb->transfer.status == USB_T…
100 if (urb->transfer.status == USB_TRANSFER_STATUS_COMPLETED) {
[all …]
Dtest_hcd_common.c258 …urb_t *urb = heap_caps_calloc(1, sizeof(urb_t) + (num_isoc_packets * sizeof(usb_isoc_packet_desc_t… in test_hcd_alloc_urb() local
260 TEST_ASSERT_NOT_EQUAL(NULL, urb); in test_hcd_alloc_urb()
263 usb_transfer_dummy_t *transfer_dummy = (usb_transfer_dummy_t *)&urb->transfer; in test_hcd_alloc_urb()
266 return urb; in test_hcd_alloc_urb()
269 void test_hcd_free_urb(urb_t *urb) in test_hcd_free_urb() argument
272 heap_caps_free(urb->transfer.data_buffer); in test_hcd_free_urb()
274 heap_caps_free(urb); in test_hcd_free_urb()
280 urb_t *urb = test_hcd_alloc_urb(0, sizeof(usb_setup_packet_t) + 256); in test_hcd_enum_device() local
281 usb_setup_packet_t *setup_pkt = (usb_setup_packet_t *)urb->transfer.data_buffer; in test_hcd_enum_device()
285 urb->transfer.num_bytes = sizeof(usb_setup_packet_t) + sizeof(usb_device_desc_t); in test_hcd_enum_device()
[all …]
Dtest_hcd_port.c87 urb_t *urb = hcd_urb_dequeue(default_pipe);
88 TEST_ASSERT_EQUAL(urb_list[i], urb);
89 …TEST_ASSERT(urb->transfer.status == USB_TRANSFER_STATUS_COMPLETED || urb->transfer.status == USB_T…
90 if (urb->transfer.status == USB_TRANSFER_STATUS_COMPLETED) {
92 … TEST_ASSERT_GREATER_OR_EQUAL(sizeof(usb_setup_packet_t), urb->transfer.actual_num_bytes);
93 TEST_ASSERT_LESS_OR_EQUAL(urb->transfer.num_bytes, urb->transfer.actual_num_bytes);
96 TEST_ASSERT_EQUAL(0, urb->transfer.actual_num_bytes);
98 TEST_ASSERT_EQUAL(0xDEADBEEF, urb->transfer.context);
231 urb_t *urb = hcd_urb_dequeue(default_pipe);
232 TEST_ASSERT_EQUAL(urb_list[i], urb);
[all …]
Dtest_hcd_isoc.c80 urb_t *urb = hcd_urb_dequeue(isoc_out_pipe);
81 TEST_ASSERT_EQUAL(urb_list[urb_idx], urb);
82 TEST_ASSERT_EQUAL(URB_CONTEXT_VAL, urb->transfer.context);
84 TEST_ASSERT_EQUAL(URB_DATA_BUFF_SIZE, urb->transfer.actual_num_bytes);
85 TEST_ASSERT_EQUAL(USB_TRANSFER_STATUS_COMPLETED, urb->transfer.status);
87 … TEST_ASSERT_EQUAL(USB_TRANSFER_STATUS_COMPLETED, urb->transfer.isoc_packet_desc[pkt_idx].status);
179 urb_t *urb = hcd_urb_dequeue(isoc_out_pipe);
180 TEST_ASSERT_EQUAL(urb_list[urb_idx], urb);
181 TEST_ASSERT_EQUAL(URB_CONTEXT_VAL, urb->transfer.context);
183 …TEST_ASSERT(urb->transfer.status == USB_TRANSFER_STATUS_COMPLETED || urb->transfer.status == USB_T…
Dtest_hcd_bulk.c21 urb_t *urb = test_hcd_alloc_urb(0, sizeof(usb_setup_packet_t)); in mock_msc_reset_req() local
22 usb_setup_packet_t *setup_pkt = (usb_setup_packet_t *)urb->transfer.data_buffer; in mock_msc_reset_req()
24 urb->transfer.num_bytes = sizeof(usb_setup_packet_t); in mock_msc_reset_req()
26 TEST_ASSERT_EQUAL(ESP_OK, hcd_urb_enqueue(default_pipe, urb)); in mock_msc_reset_req()
28 TEST_ASSERT_EQUAL(urb, hcd_urb_dequeue(default_pipe)); in mock_msc_reset_req()
29 TEST_ASSERT_EQUAL(USB_TRANSFER_STATUS_COMPLETED, urb->transfer.status); in mock_msc_reset_req()
31 test_hcd_free_urb(urb); in mock_msc_reset_req()
Dtest_hcd_intr.c70 urb_t *urb = hcd_urb_dequeue(intr_pipe);
71 TEST_ASSERT_EQUAL(USB_TRANSFER_STATUS_COMPLETED, urb->transfer.status);
72 TEST_ASSERT_EQUAL(URB_CONTEXT_VAL, urb->transfer.context);
73 mock_hid_process_report((mock_hid_mouse_report_t *)urb->transfer.data_buffer, iter_count);
76 TEST_ASSERT_EQUAL(ESP_OK, hcd_urb_enqueue(intr_pipe, urb));
Dtest_hcd_common.h119 void test_hcd_free_urb(urb_t *urb);
/hal_espressif-3.6.0/components/usb/
Dusb_private.c13 …urb_t *urb = heap_caps_calloc(1, sizeof(urb_t) + (sizeof(usb_isoc_packet_desc_t) * num_isoc_packet… in urb_alloc() local
15 if (urb == NULL || data_buffer == NULL) { in urb_alloc()
18urb->usb_host_header_size = header_size; //Indicate that this URB's data_buffer has a header in… in urb_alloc()
20 usb_transfer_dummy_t *dummy_transfer = (usb_transfer_dummy_t *)&urb->transfer; in urb_alloc()
24 return urb; in urb_alloc()
26 heap_caps_free(urb); in urb_alloc()
31 void urb_free(urb_t *urb) in urb_free() argument
33 if (urb == NULL) { in urb_free()
36 heap_caps_free((uint8_t *)(urb->transfer.data_buffer - urb->usb_host_header_size)); in urb_free()
37 heap_caps_free(urb); in urb_free()
Dhcd.c188 urb_t *urb; member
1758 urb_t *urb; in _pipe_cmd_flush() local
1759 TAILQ_FOREACH(urb, &pipe->pending_urb_tailq, tailq_entry) { in _pipe_cmd_flush()
1761 urb->hcd_var = URB_HCD_STATE_DONE; in _pipe_cmd_flush()
1763 urb->transfer.actual_num_bytes = 0; in _pipe_cmd_flush()
1764urb->transfer.status = (canceled) ? USB_TRANSFER_STATUS_CANCELED : USB_TRANSFER_STATUS_NO_DEVICE; in _pipe_cmd_flush()
1767 for (int pkt_idx = 0; pkt_idx < urb->transfer.num_isoc_packets; pkt_idx++) { in _pipe_cmd_flush()
1768 urb->transfer.isoc_packet_desc[pkt_idx].actual_num_bytes = 0; in _pipe_cmd_flush()
1769urb->transfer.isoc_packet_desc[pkt_idx].status = (canceled) ? USB_TRANSFER_STATUS_CANCELED : USB_T… in _pipe_cmd_flush()
2186 urb_t *urb = TAILQ_FIRST(&pipe->pending_urb_tailq); in _buffer_fill() local
[all …]
Dusb_host.c281 static void ctrl_xfer_callback(usb_device_handle_t dev_hdl, urb_t *urb, void *arg) in ctrl_xfer_callback() argument
283 assert(urb->usb_host_client != NULL); in ctrl_xfer_callback()
285 client_t *client_obj = (client_t *)urb->usb_host_client; in ctrl_xfer_callback()
288 TAILQ_INSERT_TAIL(&client_obj->dynamic.done_ctrl_xfer_tailq, urb, tailq_entry); in ctrl_xfer_callback()
591 urb_t *urb = hcd_urb_dequeue(ep_obj->constant.pipe_hdl); in _handle_pending_ep() local
592 while (urb != NULL) { in _handle_pending_ep()
593 urb->transfer.callback(&urb->transfer); in _handle_pending_ep()
595 urb = hcd_urb_dequeue(ep_obj->constant.pipe_hdl); in _handle_pending_ep()
746 urb_t *urb = TAILQ_FIRST(&client_obj->dynamic.done_ctrl_xfer_tailq); in usb_host_client_handle_events() local
747 TAILQ_REMOVE(&client_obj->dynamic.done_ctrl_xfer_tailq, urb, tailq_entry); in usb_host_client_handle_events()
[all …]
Dhub.c150 …urb_t *urb; /**< URB used for enumeration control transfers. Max data length o… member
322 usb_transfer_t *transfer = &enum_ctrl->urb->transfer; in enum_stage_transfer()
402 if (hcd_urb_enqueue(enum_ctrl->pipe, enum_ctrl->urb) != ESP_OK) { in enum_stage_transfer()
413 assert(dequeued_enum_urb == enum_ctrl->urb); in enum_stage_transfer_check()
897 hub_driver_obj->single_thread.enum_ctrl.urb = enum_urb; in hub_install()
933 urb_free(hub_driver_obj->single_thread.enum_ctrl.urb); in hub_uninstall()
Dusbh.c425 urb_t *urb = hcd_urb_dequeue(dev_obj->constant.default_pipe); in usbh_process() local
426 while (urb != NULL) { 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()
715 esp_err_t usbh_dev_submit_ctrl_urb(usb_device_handle_t dev_hdl, urb_t *urb) in usbh_dev_submit_ctrl_urb() argument
717 USBH_CHECK(dev_hdl != NULL && urb != NULL, ESP_ERR_INVALID_ARG); in usbh_dev_submit_ctrl_urb()
731 ret = hcd_urb_enqueue(dev_obj->constant.default_pipe, urb); in usbh_dev_submit_ctrl_urb()
/hal_espressif-3.6.0/components/usb/private_include/
Dhcd.h499 esp_err_t hcd_urb_enqueue(hcd_pipe_handle_t pipe_hdl, urb_t *urb);
524 esp_err_t hcd_urb_abort(urb_t *urb);
Dusbh.h72 typedef void (*usbh_ctrl_xfer_cb_t)(usb_device_handle_t dev_hdl, urb_t *urb, void *arg);
267 esp_err_t usbh_dev_submit_ctrl_urb(usb_device_handle_t dev_hdl, urb_t *urb);
Dusb_private.h81 void urb_free(urb_t *urb);