Lines Matching +full:interrupt +full:- +full:endpoint

2  * Copyright (c) 2021-2022 Nordic Semiconductor ASA
4 * SPDX-License-Identifier: Apache-2.0
22 * @brief Maximum packet size of control endpoint supported by the controller.
47 /** Maximum packet size for control endpoint */
66 * USB device controller endpoint capabilities
69 /** Maximum packet size of the endpoint buffer */
71 /** Control transfer capable endpoint (for completeness) */
73 /** Interrupt transfer capable endpoint */
74 uint32_t interrupt : 1; member
75 /** Bulk transfer capable endpoint */
77 /** ISO transfer capable endpoint */
79 /** High-Bandwidth (interrupt or iso) capable endpoint */
81 /** IN transfer capable endpoint */
83 /** OUT transfer capable endpoint */
88 * USB device controller endpoint status
91 /** Endpoint is enabled */
93 /** Endpoint is halted (returning STALL PID) */
99 /** Endpoint is busy */
104 * USB device controller endpoint configuration
111 /** Endpoint requests FIFO */
113 /** Endpoint capabilities */
115 /** Endpoint status */
117 /** Endpoint address */
119 /** Endpoint attributes */
144 /** Endpoint request result event */
147 * Non-correctable error event, requires attention from higher
177 * UDC endpoint buffer info
184 /** Endpoint to which request is associated */
273 * To be implemented as device's private data (device->data).
276 /** LUT for endpoint management */
314 struct udc_data *data = dev->data; in udc_is_initialized()
316 return atomic_test_bit(&data->status, UDC_STATUS_INITIALIZED); in udc_is_initialized()
328 struct udc_data *data = dev->data; in udc_is_enabled()
330 return atomic_test_bit(&data->status, UDC_STATUS_ENABLED); in udc_is_enabled()
342 struct udc_data *data = dev->data; in udc_is_suspended()
344 return atomic_test_bit(&data->status, UDC_STATUS_SUSPENDED); in udc_is_suspended()
350 * Initialize USB device controller and control IN/OUT endpoint.
359 * @retval -EINVAL on parameter error (no callback is passed)
360 * @retval -EALREADY already initialized
374 * @retval -EPERM controller is not initialized
375 * @retval -EALREADY already enabled
376 * @retval -ETIMEDOUT enable operation timed out
389 * @retval -EALREADY already disabled
402 * @retval -EALREADY controller is not initialized
418 struct udc_data *data = dev->data; in udc_caps()
420 return data->caps; in udc_caps()
444 * @retval -EPERM controller is not enabled (or not initialized)
448 const struct udc_api *api = dev->api; in udc_set_address()
452 return -EPERM; in udc_set_address()
455 api->lock(dev); in udc_set_address()
456 ret = api->set_address(dev, addr); in udc_set_address()
457 api->unlock(dev); in udc_set_address()
465 * For compliance testing, high-speed controllers must support test modes.
475 * @retval -ENOTSUP Test mode is not supported
480 const struct udc_api *api = dev->api; in udc_test_mode()
484 return -EPERM; in udc_test_mode()
487 if (api->test_mode != NULL) { in udc_test_mode()
488 api->lock(dev); in udc_test_mode()
489 ret = api->test_mode(dev, mode, dryrun); in udc_test_mode()
490 api->unlock(dev); in udc_test_mode()
492 ret = -ENOTSUP; in udc_test_mode()
506 * @retval -EPERM controller is not enabled (or not initialized)
510 const struct udc_api *api = dev->api; in udc_host_wakeup()
514 return -EPERM; in udc_host_wakeup()
517 api->lock(dev); in udc_host_wakeup()
518 ret = api->host_wakeup(dev); in udc_host_wakeup()
519 api->unlock(dev); in udc_host_wakeup()
525 * @brief Try an endpoint configuration.
527 * Try an endpoint configuration based on endpoint descriptor.
529 * of the endpoint. All properties of the descriptor,
532 * updated to maximum buffer size of the endpoint.
535 * @param[in] ep Endpoint address (same as bEndpointAddress)
536 * @param[in] attributes Endpoint attributes (same as bmAttributes)
541 * @retval -EINVAL on wrong parameter
542 * @retval -ENOTSUP endpoint configuration not supported
543 * @retval -ENODEV no endpoints available
552 * @brief Configure and enable endpoint.
554 * Configure and make an endpoint ready for use.
558 * @param[in] ep Endpoint address (same as bEndpointAddress)
559 * @param[in] attributes Endpoint attributes (same as bmAttributes)
564 * @retval -EINVAL on wrong parameter (control IN/OUT endpoint)
565 * @retval -EPERM controller is not initialized
566 * @retval -ENODEV endpoint configuration not found
567 * @retval -EALREADY endpoint is already enabled
576 * @brief Disable endpoint.
581 * @param[in] ep Endpoint address
584 * @retval -EINVAL on wrong parameter (control IN/OUT endpoint)
585 * @retval -ENODEV endpoint configuration not found
586 * @retval -EALREADY endpoint is already disabled
587 * @retval -EPERM controller is not initialized
592 * @brief Halt endpoint
597 * @param[in] ep Endpoint address
600 * @retval -ENODEV endpoint configuration not found
601 * @retval -ENOTSUP not supported (e.g. isochronous endpoint)
602 * @retval -EPERM controller is not enabled
607 * @brief Clear endpoint halt
612 * @param[in] ep Endpoint address
615 * @retval -ENODEV endpoint configuration not found
616 * @retval -ENOTSUP not supported (e.g. isochronous endpoint)
617 * @retval -EPERM controller is not enabled
631 * @retval -ENODEV endpoint configuration not found
632 * @retval -EACCES endpoint is not enabled (TBD)
633 * @retval -EBUSY request can not be queued
634 * @retval -EPERM controller is not initialized
639 * @brief Remove all USB device controller requests from endpoint queue
644 * the event variable buf. The endpoint queue is empty after that.
647 * @param[in] ep Endpoint address
650 * @retval -ENODEV endpoint configuration not found
651 * @retval -EACCES endpoint is not disabled
652 * @retval -EPERM controller is not initialized
662 * @param[in] ep Endpoint address
696 if (USB_EP_DIR_IS_IN(bi->ep)) { in udc_ep_buf_set_zlp()
697 bi->zlp = 1; in udc_ep_buf_set_zlp()
727 struct udc_data *data = dev->data; in udc_get_event_ctx()
729 return data->event_ctx; in udc_get_event_ctx()
733 * @brief Get endpoint size from UDC endpoint configuration
735 * @param[in] cfg Pointer to UDC endpoint configuration
737 * @return Endpoint size
741 return USB_MPS_EP_SIZE(cfg->mps); in udc_mps_ep_size()