Lines Matching refs:uds_ctx

47 usbd_class_get_by_config(struct usbd_context *const uds_ctx,  in usbd_class_get_by_config()  argument
55 cfg_nd = usbd_config_get(uds_ctx, speed, cnum); in usbd_class_get_by_config()
70 usbd_class_get_by_iface(struct usbd_context *const uds_ctx, in usbd_class_get_by_iface() argument
76 cfg_nd = usbd_config_get_current(uds_ctx); in usbd_class_get_by_iface()
90 static bool xfer_owner_exist(struct usbd_context *const uds_ctx, in xfer_owner_exist() argument
117 int usbd_class_handle_xfer(struct usbd_context *const uds_ctx, in usbd_class_handle_xfer() argument
126 if (usbd_state_is_configured(uds_ctx)) { in usbd_class_handle_xfer()
127 cfg_nd = usbd_config_get_current(uds_ctx); in usbd_class_handle_xfer()
128 if (!xfer_owner_exist(uds_ctx, cfg_nd, buf)) { in usbd_class_handle_xfer()
140 usbd_class_get_by_ep(struct usbd_context *const uds_ctx, in usbd_class_get_by_ep() argument
156 if (!usbd_state_is_configured(uds_ctx)) { in usbd_class_get_by_ep()
161 cfg = usbd_get_config_value(uds_ctx); in usbd_class_get_by_ep()
162 speed = usbd_bus_speed(uds_ctx); in usbd_class_get_by_ep()
163 cfg_nd = usbd_config_get(uds_ctx, speed, cfg); in usbd_class_get_by_ep()
178 usbd_class_get_by_req(struct usbd_context *const uds_ctx, in usbd_class_get_by_req() argument
184 cfg_nd = usbd_config_get_current(uds_ctx); in usbd_class_get_by_req()
232 static int usbd_class_append(struct usbd_context *const uds_ctx, in usbd_class_append() argument
239 cfg_nd = usbd_config_get(uds_ctx, speed, cfg); in usbd_class_append()
249 static int usbd_class_remove(struct usbd_context *const uds_ctx, in usbd_class_remove() argument
256 cfg_nd = usbd_config_get(uds_ctx, speed, cfg); in usbd_class_remove()
268 int usbd_class_remove_all(struct usbd_context *const uds_ctx, in usbd_class_remove_all() argument
276 cfg_nd = usbd_config_get(uds_ctx, speed, cfg); in usbd_class_remove_all()
295 int usbd_register_class(struct usbd_context *const uds_ctx, in usbd_register_class() argument
308 usbd_device_lock(uds_ctx); in usbd_register_class()
310 if (usbd_is_initialized(uds_ctx)) { in usbd_register_class()
325 if ((c_data->uds_ctx != NULL) && (c_data->uds_ctx != uds_ctx)) { in usbd_register_class()
331 ret = usbd_class_append(uds_ctx, c_nd, speed, cfg); in usbd_register_class()
335 c_data->uds_ctx = uds_ctx; in usbd_register_class()
339 usbd_device_unlock(uds_ctx); in usbd_register_class()
343 int usbd_register_all_classes(struct usbd_context *const uds_ctx, in usbd_register_all_classes() argument
350 ret = usbd_register_class(uds_ctx, c_nd->c_data->name, in usbd_register_all_classes()
364 ret = usbd_register_class(uds_ctx, c_nd->c_data->name, in usbd_register_all_classes()
379 int usbd_unregister_class(struct usbd_context *const uds_ctx, in usbd_unregister_class() argument
393 usbd_device_lock(uds_ctx); in usbd_unregister_class()
395 if (usbd_is_initialized(uds_ctx)) { in usbd_unregister_class()
432 ret = usbd_class_remove(uds_ctx, c_nd, speed, cfg); in usbd_unregister_class()
438 c_data->uds_ctx = NULL; in usbd_unregister_class()
443 usbd_device_unlock(uds_ctx); in usbd_unregister_class()
447 int usbd_unregister_all_classes(struct usbd_context *const uds_ctx, in usbd_unregister_all_classes() argument
454 ret = usbd_unregister_class(uds_ctx, c_nd->c_data->name, in usbd_unregister_all_classes()
468 ret = usbd_unregister_class(uds_ctx, c_nd->c_data->name, in usbd_unregister_all_classes()