Lines Matching +full:chain +full:- +full:transfer

2  * Copyright (c) 2021-2022 Nordic Semiconductor ASA
4 * SPDX-License-Identifier: Apache-2.0
35 struct udc_data *data = dev->data; in udc_get_private()
37 return data->priv; in udc_get_private()
85 * Use it when transfer is finished and request should
99 * Get all UDC request from endpoint FIFO as single-linked list.
115 * Use it when request buffer is required for a transfer.
145 * @retval -EPERM controller is not initialized
162 * @retval -EPERM controller is not initialized
179 * @retval -ENODEV endpoint is not assigned or no configuration found
180 * @retval -EALREADY endpoint is already enabled
197 * @retval -ENODEV endpoint is not assigned or no configuration found
198 * @retval -EALREADY endpoint is already enabled
213 * @retval -EACCES controller is initialized or enabled
221 * A control transfer can be either setup or data OUT,
229 * @brief Checks whether the driver must finish transfer with a ZLP
255 struct udc_data *data = dev->data; in udc_lock_internal()
257 return k_mutex_lock(&data->mutex, timeout); in udc_lock_internal()
269 struct udc_data *data = dev->data; in udc_unlock_internal()
271 return k_mutex_unlock(&data->mutex); in udc_unlock_internal()
275 * @brief Allocate UDC control transfer buffer
277 * Allocate a new buffer from common control transfer buffer pool.
291 struct usb_setup_packet *setup = (void *)buf->data; in udc_data_stage_length()
293 return sys_le16_to_cpu(setup->wLength); in udc_data_stage_length()
297 * @brief Checks whether the current control transfer stage is Data Stage OUT
306 * @brief Checks whether the current control transfer stage is Data Stage IN
315 * @brief Checks whether the current control transfer stage is Status IN
324 * @brief Checks whether the current control transfer stage is Status OUT
333 * @brief Checks whether the current control transfer stage is Status no-data
337 * @return true if stage is Status no-data
342 * @brief Submit Control Write (s-out-status) transfer
368 * @brief Prepare control (no-data) status stage
397 * - when a setup packet is received
398 * - when a data stage is completed (all data stage transactions)
399 * - when a status stage transaction is finished
406 * - Upper layer may not allocate buffers but remove or release buffers
407 * from the chain that are no longer needed. Only control IN transfers may
410 * - For "Control Write" (s-out-status), the driver should allocate the buffer,
413 * setup buffer, and then pass setup packet with the chain of s-out-status to
418 * ->driver_foo_setup_rcvd(dev)
419 * ->udc_ctrl_update_stage(dev, buf)
420 * ->udc_ctrl_alloc(dev, USB_CONTROL_EP_OUT, wLength)
421 * ->driver_foo_xfer_start(dev, USB_CONTROL_EP_OUT)
423 * ->driver_foo_dout_rcvd(dev)
424 * -...
425 * ->driver_foo_feed_next_dout(dev, ....)
426 * -...
427 * ->udc_ctrl_update_stage(dev, dout_buf)
428 * -...
429 * ->udc_ctrl_submit_s_out_status(dev, dout_buf);
431 * ->driver_foo_din_rcvd(dev)
432 * -...
433 * ->udc_ctrl_submit_status(dev, status_buf);
434 * -...
435 * ->udc_ctrl_update_stage(dev, status_buf)
437 * - For "Control Read" (s-in-status), depending on the controller,
441 * the chain of s-in to upper layer. Upper layer should either halt control
445 * ->driver_foo_setup_rcvd(dev)
446 * ->udc_ctrl_update_stage(dev, buf)
447 * ->driver_foo_feed_next_dout(dev, ....)
448 * -...
449 * ->udc_ctrl_submit_s_in_status(dev);
451 * ->driver_foo_din_rcvd(dev)
452 * -...
453 * ->udc_ctrl_update_stage(dev, dout_buf)
454 * -...
456 * ->driver_foo_dout_rcvd(dev)
457 * -...
458 * ->udc_ctrl_submit_status(dev, status_buf);
459 * -...
460 * ->udc_ctrl_update_stage(dev, dout_buf)
462 * - For "No-data Control" (s-status), the driver should allocate the buffer
464 * and then pass setup packet with the chain of s-status to
469 * ->driver_foo_setup_rcvd(dev)
470 * ->udc_ctrl_update_stage(dev, buf)
471 * ->driver_foo_feed_next_dout(dev, ....)
472 * -...
473 * ->udc_ctrl_submit_s_status(dev);
475 * ->driver_foo_din_rcvd(dev)
476 * -...
477 * ->udc_ctrl_submit_status(dev, status_buf);
478 * -...
479 * ->udc_ctrl_update_stage(dev, status_buf)