Lines Matching refs:uds_ctx

25 static int handle_ep_op(struct usbd_context *const uds_ctx,  in handle_ep_op()  argument
38 ret = usbd_ep_enable(uds_ctx->dev, ed, ep_bm); in handle_ep_op()
41 ret = usbd_ep_disable(uds_ctx->dev, ep, ep_bm); in handle_ep_op()
53 static int usbd_interface_modify(struct usbd_context *const uds_ctx, in usbd_interface_modify() argument
63 dhp = usbd_class_get_desc(c_nd->c_data, usbd_bus_speed(uds_ctx)); in usbd_interface_modify()
92 ret = handle_ep_op(uds_ctx, op, ed, &c_nd->ep_active); in usbd_interface_modify()
110 int usbd_interface_shutdown(struct usbd_context *const uds_ctx, in usbd_interface_shutdown() argument
124 ret = usbd_ep_disable(uds_ctx->dev, ep_in, ep_bm); in usbd_interface_shutdown()
131 ret = usbd_ep_disable(uds_ctx->dev, ep_out, ep_bm); in usbd_interface_shutdown()
142 int usbd_interface_default(struct usbd_context *const uds_ctx, in usbd_interface_default() argument
154 class = usbd_class_get_by_config(uds_ctx, speed, new_cfg, i); in usbd_interface_default()
159 ret = usbd_interface_modify(uds_ctx, class, EP_OP_UP, i, 0); in usbd_interface_default()
168 int usbd_interface_set(struct usbd_context *const uds_ctx, in usbd_interface_set() argument
176 class = usbd_class_get_by_iface(uds_ctx, iface); in usbd_interface_set()
181 ret = usbd_get_alt_value(uds_ctx, iface, &cur_alt); in usbd_interface_set()
192 ret = usbd_interface_modify(uds_ctx, class, EP_OP_TEST, iface, alt); in usbd_interface_set()
198 ret = usbd_interface_modify(uds_ctx, class, EP_OP_DOWN, iface, cur_alt); in usbd_interface_set()
204 ret = usbd_interface_modify(uds_ctx, class, EP_OP_UP, iface, alt); in usbd_interface_set()
211 usbd_set_alt_value(uds_ctx, iface, alt); in usbd_interface_set()