Zephyr API Documentation 4.4.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
usbd_context Struct Reference

USB device support runtime context. More...

#include <zephyr/usb/usbd.h>

Data Fields

const char * name
 Name of the USB device.
struct k_mutex mutex
 Access mutex.
const struct devicedev
 Pointer to UDC device.
usbd_msg_cb_t msg_cb
 Notification message recipient callback.
sys_slist_t ep_events
 slist to keep endpoint events
struct k_spinlock ep_event_lock
 Endpoint event list spinlock.
struct usbd_ch9_data ch9_data
 Middle layer runtime data.
sys_dlist_t descriptors
 slist to manage descriptors like string, BOS
sys_slist_t fs_configs
 slist to manage Full-Speed device configurations
sys_slist_t hs_configs
 slist to manage High-Speed device configurations
sys_dlist_t vreqs
 dlist to manage vendor requests with recipient device
struct usbd_status status
 Status of the USB device support.
void * fs_desc
 Pointer to Full-Speed device descriptor.
void * hs_desc
 Pointer to High-Speed device descriptor.
struct net_bufsetup_buf
 Pre-allocated buffer for control transfer SETUP stage.

Detailed Description

USB device support runtime context.

Main structure that organizes all descriptors, configuration, and interfaces. An UDC device must be assigned to this structure.

Field Documentation

◆ ch9_data

struct usbd_ch9_data usbd_context::ch9_data

Middle layer runtime data.

◆ descriptors

sys_dlist_t usbd_context::descriptors

slist to manage descriptors like string, BOS

◆ dev

const struct device* usbd_context::dev

Pointer to UDC device.

◆ ep_event_lock

struct k_spinlock usbd_context::ep_event_lock

Endpoint event list spinlock.

◆ ep_events

sys_slist_t usbd_context::ep_events

slist to keep endpoint events

◆ fs_configs

sys_slist_t usbd_context::fs_configs

slist to manage Full-Speed device configurations

◆ fs_desc

void* usbd_context::fs_desc

Pointer to Full-Speed device descriptor.

◆ hs_configs

sys_slist_t usbd_context::hs_configs

slist to manage High-Speed device configurations

◆ hs_desc

void* usbd_context::hs_desc

Pointer to High-Speed device descriptor.

◆ msg_cb

usbd_msg_cb_t usbd_context::msg_cb

Notification message recipient callback.

◆ mutex

struct k_mutex usbd_context::mutex

Access mutex.

◆ name

const char* usbd_context::name

Name of the USB device.

◆ setup_buf

struct net_buf* usbd_context::setup_buf

Pre-allocated buffer for control transfer SETUP stage.

◆ status

struct usbd_status usbd_context::status

Status of the USB device support.

◆ vreqs

sys_dlist_t usbd_context::vreqs

dlist to manage vendor requests with recipient device


The documentation for this struct was generated from the following file: