Lines Matching refs:ep_obj
338 endpoint_t *ep_obj = (endpoint_t *)user_arg; in pipe_callback() local
339 client_t *client_obj = (client_t *)ep_obj->constant.intf_obj->constant.client_obj; in pipe_callback()
343 ep_obj->dynamic.last_event = pipe_event; in pipe_callback()
345 if (!ep_obj->dynamic.flags.pending) { in pipe_callback()
346 ep_obj->dynamic.flags.pending = 1; in pipe_callback()
347 TAILQ_REMOVE(&client_obj->dynamic.idle_ep_tailq, ep_obj, dynamic.tailq_entry); in pipe_callback()
348 TAILQ_INSERT_TAIL(&client_obj->dynamic.pending_ep_tailq, ep_obj, dynamic.tailq_entry); in pipe_callback()
571 endpoint_t *ep_obj = TAILQ_FIRST(&client_obj->dynamic.pending_ep_tailq); in _handle_pending_ep() local
572 TAILQ_REMOVE(&client_obj->dynamic.pending_ep_tailq, ep_obj, dynamic.tailq_entry); in _handle_pending_ep()
573 TAILQ_INSERT_TAIL(&client_obj->dynamic.idle_ep_tailq, ep_obj, dynamic.tailq_entry); in _handle_pending_ep()
574 ep_obj->dynamic.flags.pending = 0; in _handle_pending_ep()
575 hcd_pipe_event_t last_event = ep_obj->dynamic.last_event; in _handle_pending_ep()
586 ESP_ERROR_CHECK(hcd_pipe_command(ep_obj->constant.pipe_hdl, HCD_PIPE_CMD_FLUSH)); in _handle_pending_ep()
591 urb_t *urb = hcd_urb_dequeue(ep_obj->constant.pipe_hdl); in _handle_pending_ep()
595 urb = hcd_urb_dequeue(ep_obj->constant.pipe_hdl); in _handle_pending_ep()
606 assert(num_urb_dequeued <= ep_obj->dynamic.num_urb_inflight); in _handle_pending_ep()
607 ep_obj->dynamic.num_urb_inflight -= num_urb_dequeued; in _handle_pending_ep()
920 endpoint_t *ep_obj = heap_caps_calloc(1, sizeof(endpoint_t), MALLOC_CAP_DEFAULT); in endpoint_alloc() local
921 if (ep_obj == NULL) { in endpoint_alloc()
928 .pipe_cb_arg = (void *)ep_obj, in endpoint_alloc()
929 .context = (void *)ep_obj, in endpoint_alloc()
937 ep_obj->constant.pipe_hdl = pipe_hdl; in endpoint_alloc()
938 ep_obj->constant.ep_desc = ep_desc; in endpoint_alloc()
939 ep_obj->constant.intf_obj = intf_obj; in endpoint_alloc()
941 *ep_obj_ret = ep_obj; in endpoint_alloc()
946 heap_caps_free(ep_obj); in endpoint_alloc()
950 static void endpoint_free(usb_device_handle_t dev_hdl, endpoint_t *ep_obj) in endpoint_free() argument
952 if (ep_obj == NULL) { in endpoint_free()
956 ESP_ERROR_CHECK(usbh_ep_free(dev_hdl, ep_obj->constant.ep_desc->bEndpointAddress)); in endpoint_free()
958 heap_caps_free(ep_obj); in endpoint_free()
1010 endpoint_t *ep_obj; in interface_claim() local
1011 ret = endpoint_alloc(dev_hdl, ep_desc, intf_obj, &ep_obj); in interface_claim()
1016 intf_obj->constant.endpoints[i] = ep_obj; in interface_claim()
1062 endpoint_t *ep_obj = intf_obj->constant.endpoints[i]; in interface_release() local
1064 if (ep_obj->dynamic.num_urb_inflight != 0 || ep_obj->dynamic.flags.pending) { in interface_release()
1165 endpoint_t *ep_obj = NULL; in usb_host_endpoint_halt() local
1166 ret = usbh_ep_get_context(dev_hdl, bEndpointAddress, (void **)&ep_obj); in usb_host_endpoint_halt()
1170 assert(ep_obj != NULL); in usb_host_endpoint_halt()
1171 ret = hcd_pipe_command(ep_obj->constant.pipe_hdl, HCD_PIPE_CMD_HALT); in usb_host_endpoint_halt()
1179 endpoint_t *ep_obj = NULL; in usb_host_endpoint_flush() local
1180 ret = usbh_ep_get_context(dev_hdl, bEndpointAddress, (void **)&ep_obj); in usb_host_endpoint_flush()
1184 assert(ep_obj != NULL); in usb_host_endpoint_flush()
1185 ret = hcd_pipe_command(ep_obj->constant.pipe_hdl, HCD_PIPE_CMD_FLUSH); in usb_host_endpoint_flush()
1193 endpoint_t *ep_obj = NULL; in usb_host_endpoint_clear() local
1194 ret = usbh_ep_get_context(dev_hdl, bEndpointAddress, (void **)&ep_obj); in usb_host_endpoint_clear()
1198 assert(ep_obj != NULL); in usb_host_endpoint_clear()
1199 ret = hcd_pipe_command(ep_obj->constant.pipe_hdl, HCD_PIPE_CMD_CLEAR); in usb_host_endpoint_clear()
1288 endpoint_t *ep_obj = NULL; in usb_host_transfer_submit() local
1291 … ret = usbh_ep_get_context(transfer->device_handle, transfer->bEndpointAddress, (void **)&ep_obj); in usb_host_transfer_submit()
1295 assert(ep_obj != NULL); in usb_host_transfer_submit()
1297 USB_EP_DESC_GET_XFERTYPE(ep_obj->constant.ep_desc), in usb_host_transfer_submit()
1298 USB_EP_DESC_GET_MPS(ep_obj->constant.ep_desc), in usb_host_transfer_submit()
1301 ep_obj->dynamic.num_urb_inflight++; in usb_host_transfer_submit()
1304 if (hcd_pipe_get_state(ep_obj->constant.pipe_hdl) != HCD_PIPE_STATE_ACTIVE) { in usb_host_transfer_submit()
1308 ret = hcd_urb_enqueue(ep_obj->constant.pipe_hdl, urb_obj); in usb_host_transfer_submit()
1317 ep_obj->dynamic.num_urb_inflight--; in usb_host_transfer_submit()