Lines Matching refs:urb
188 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()
1764 … urb->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()
1769 …urb->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
2187 assert(pipe->num_urb_pending > 0 && urb != NULL); in _buffer_fill()
2188 TAILQ_REMOVE(&pipe->pending_urb_tailq, urb, tailq_entry); in _buffer_fill()
2195 assert(buffer_to_fill->urb == NULL); in _buffer_fill()
2198 usb_transfer_t *transfer = &urb->transfer; in _buffer_fill()
2243 buffer_to_fill->urb = urb; in _buffer_fill()
2244 urb->hcd_var = URB_HCD_STATE_INFLIGHT; in _buffer_fill()
2255 assert(buffer_to_exec->urb != NULL); in _buffer_exec()
2329 usb_transfer_t *transfer = &buffer->urb->transfer; in _buffer_parse_ctrl()
2351 usb_transfer_t *transfer = &buffer->urb->transfer; in _buffer_parse_bulk()
2367 usb_transfer_t *transfer = &buffer->urb->transfer; in _buffer_parse_intr()
2417 usb_transfer_t *transfer = &buffer->urb->transfer; in _buffer_parse_isoc()
2448 usb_transfer_t *transfer = &buffer->urb->transfer; in _buffer_parse_error()
2475 assert(buffer_to_parse->urb != NULL); in _buffer_parse()
2508 urb_t *urb = buffer_to_parse->urb; in _buffer_parse() local
2509 urb->hcd_var = URB_HCD_STATE_DONE; in _buffer_parse()
2510 buffer_to_parse->urb = NULL; in _buffer_parse()
2513 TAILQ_INSERT_TAIL(&pipe->done_urb_tailq, urb, tailq_entry); in _buffer_parse()
2540 esp_err_t hcd_urb_enqueue(hcd_pipe_handle_t pipe_hdl, urb_t *urb) in hcd_urb_enqueue() argument
2543 HCD_CHECK(urb->hcd_ptr == NULL && urb->hcd_var == URB_HCD_STATE_IDLE, ESP_ERR_INVALID_STATE); in hcd_urb_enqueue()
2554 urb->hcd_ptr = (void *)pipe; in hcd_urb_enqueue()
2556 urb->hcd_var = URB_HCD_STATE_PENDING; in hcd_urb_enqueue()
2557 TAILQ_INSERT_TAIL(&pipe->pending_urb_tailq, urb, tailq_entry); in hcd_urb_enqueue()
2581 urb_t *urb; in hcd_urb_dequeue() local
2585 urb = TAILQ_FIRST(&pipe->done_urb_tailq); in hcd_urb_dequeue()
2586 TAILQ_REMOVE(&pipe->done_urb_tailq, urb, tailq_entry); in hcd_urb_dequeue()
2589 …assert(urb->hcd_ptr == (void *)pipe && urb->hcd_var == URB_HCD_STATE_DONE); //The URB's reserved … in hcd_urb_dequeue()
2590 urb->hcd_ptr = NULL; in hcd_urb_dequeue()
2591 urb->hcd_var = URB_HCD_STATE_IDLE; in hcd_urb_dequeue()
2604 urb = NULL; in hcd_urb_dequeue()
2607 return urb; in hcd_urb_dequeue()
2610 esp_err_t hcd_urb_abort(urb_t *urb) in hcd_urb_abort() argument
2614 …HCD_CHECK_FROM_CRIT(urb->hcd_ptr != NULL && urb->hcd_var != URB_HCD_STATE_IDLE, ESP_ERR_INVALID_ST… in hcd_urb_abort()
2615 if (urb->hcd_var == URB_HCD_STATE_PENDING) { in hcd_urb_abort()
2617 pipe_t *pipe = (pipe_t *)urb->hcd_ptr; in hcd_urb_abort()
2619 TAILQ_REMOVE(&pipe->pending_urb_tailq, urb, tailq_entry); in hcd_urb_abort()
2622 TAILQ_INSERT_TAIL(&pipe->done_urb_tailq, urb, tailq_entry); in hcd_urb_abort()
2625 urb->hcd_var = URB_HCD_STATE_DONE; in hcd_urb_abort()
2626 if (urb->transfer.num_isoc_packets == 0) { in hcd_urb_abort()
2627 urb->transfer.actual_num_bytes = 0; in hcd_urb_abort()
2628 urb->transfer.status = USB_TRANSFER_STATUS_CANCELED; in hcd_urb_abort()
2631 for (int i = 0; i < urb->transfer.num_isoc_packets; i++) { in hcd_urb_abort()
2632 urb->transfer.isoc_packet_desc[i].actual_num_bytes = 0; in hcd_urb_abort()
2633 urb->transfer.isoc_packet_desc[i].status = USB_TRANSFER_STATUS_CANCELED; in hcd_urb_abort()