Lines Matching +full:in +full:-

2  * Copyright (c) 2021-2022 Nordic Semiconductor ASA
4 * SPDX-License-Identifier: Apache-2.0
29 * @param[in] dev Pointer to device struct of the driver instance
35 struct udc_data *data = dev->data; in udc_get_private()
37 return data->priv; in udc_get_private()
45 * @param[in] dev Pointer to device struct of the driver instance
46 * @param[in] values True to set suspended status
53 * @param[in] dev Pointer to device struct of the driver instance
54 * @param[in] ep Endpoint address
64 * @param[in] dev Pointer to device struct of the driver instance
65 * @param[in] ep Endpoint address
74 * @param[in] dev Pointer to device struct of the driver instance
75 * @param[in] ep Endpoint address
76 * @param[in] busy Busy state
88 * @param[in] dev Pointer to device struct of the driver instance
89 * @param[in] ep Endpoint address
99 * Get all UDC request from endpoint FIFO as single-linked list.
103 * @param[in] dev Pointer to device struct of the driver instance
104 * @param[in] ep Endpoint address
117 * @param[in] dev Pointer to device struct of the driver instance
118 * @param[in] ep Endpoint address
128 * @param[in] ep_cfg Pointer to endpoint configuration
129 * @param[in] buf Pointer to UDC request buffer
140 * @param[in] dev Pointer to device struct of the driver instance
141 * @param[in] type Event type
142 * @param[in] status Event status
145 * @retval -EPERM controller is not initialized
157 * @param[in] dev Pointer to device struct of the driver instance
158 * @param[in] buf Pointer to UDC request buffer
159 * @param[in] err Request result
162 * @retval -EPERM controller is not initialized
170 * This function can be used by the driver to enable control IN/OUT endpoint.
172 * @param[in] dev Pointer to device struct of the driver instance
173 * @param[in] ep Endpoint address (same as bEndpointAddress)
174 * @param[in] attributes Endpoint attributes (same as bmAttributes)
175 * @param[in] mps Maximum packet size (same as wMaxPacketSize)
176 * @param[in] interval Polling interval (same as bInterval)
179 * @retval -ENODEV endpoint is not assigned or no configuration found
180 * @retval -EALREADY endpoint is already enabled
191 * This function can be used by the driver to disable control IN/OUT endpoint.
193 * @param[in] dev Pointer to device struct of the driver instance
194 * @param[in] ep Endpoint address
197 * @retval -ENODEV endpoint is not assigned or no configuration found
198 * @retval -EALREADY endpoint is already enabled
209 * @param[in] dev Pointer to device struct of the driver instance
210 * @param[in] cfg Pointer to endpoint configuration structure
213 * @retval -EACCES controller is initialized or enabled
219 * @brief Set setup flag in requests metadata.
224 * @param[in] buf Pointer to UDC request buffer
231 * @param[in] buf Pointer to UDC request buffer
240 * @param[in] buf Pointer to UDC request buffer
247 * @param[in] dev Pointer to device struct of the driver instance
248 * @param[in] timeout Timeout
255 struct udc_data *data = dev->data; in udc_lock_internal()
257 return k_mutex_lock(&data->mutex, timeout); in udc_lock_internal()
263 * @param[in] dev Pointer to device struct of the driver instance
269 struct udc_data *data = dev->data; in udc_unlock_internal()
271 return k_mutex_unlock(&data->mutex); in udc_unlock_internal()
279 * @param[in] dev Pointer to device struct of the driver instance
280 * @param[in] ep Endpoint address
281 * @param[in] size Size of the request buffer
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()
299 * @param[in] dev Pointer to device struct of the driver instance
306 * @brief Checks whether the current control transfer stage is Data Stage IN
308 * @param[in] dev Pointer to device struct of the driver instance
310 * @return true if stage is Data Stage IN
315 * @brief Checks whether the current control transfer stage is Status IN
317 * @param[in] dev Pointer to device struct of the driver instance
319 * @return true if stage is Data Stage IN
326 * @param[in] dev Pointer to device struct of the driver instance
333 * @brief Checks whether the current control transfer stage is Status no-data
335 * @param[in] dev Pointer to device struct of the driver instance
337 * @return true if stage is Status no-data
342 * @brief Submit Control Write (s-out-status) transfer
344 * Allocate buffer for data stage IN,
347 * @param[in] dev Pointer to device struct of the driver instance
348 * @param[in] dout Pointer to UDC buffer containing data transaction
356 * @brief Prepare control data IN stage
358 * Allocate buffer for data stage IN,
361 * @param[in] dev Pointer to device struct of the driver instance
368 * @brief Prepare control (no-data) status stage
370 * Allocate buffer for status stage IN,
373 * @param[in] dev Pointer to device struct of the driver instance
384 * @param[in] dev Pointer to device struct of the driver instance
385 * @param[in] dout Pointer to UDC buffer containing data transaction
395 * Use it in the driver to update the stage, typically there are
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,
412 * transaction. Allocate and insert a fragment for the status (IN) stage to
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,
440 * for IN transaction insert it as a fragment to setup buffer, and pass
441 * the chain of s-in to upper layer. Upper layer should either halt control
442 * endpoint or enqueue (in) buffer. There should be second
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
463 * for the status (IN) stage, insert it as a fragment to setup 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)
483 * @param[in] dev Pointer to device struct of the driver instance
484 * @param[in] buf Buffer containing setup packet