Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
usbd_class_api Struct Reference

USB device support class instance API. More...

#include <usbd.h>

Data Fields

void(* feature_halt )(struct usbd_class_data *const c_data, uint8_t ep, bool halted)
 Feature halt state update handler.
 
void(* update )(struct usbd_class_data *const c_data, uint8_t iface, uint8_t alternate)
 Configuration update handler.
 
int(* control_to_dev )(struct usbd_class_data *const c_data, const struct usb_setup_packet *const setup, const struct net_buf *const buf)
 USB control request handler to device.
 
int(* control_to_host )(struct usbd_class_data *const c_data, const struct usb_setup_packet *const setup, struct net_buf *const buf)
 USB control request handler to host.
 
int(* request )(struct usbd_class_data *const c_data, struct net_buf *buf, int err)
 Endpoint request completion event handler.
 
void(* suspended )(struct usbd_class_data *const c_data)
 USB power management handler suspended.
 
void(* resumed )(struct usbd_class_data *const c_data)
 USB power management handler resumed.
 
void(* sof )(struct usbd_class_data *const c_data)
 Start of Frame.
 
void(* enable )(struct usbd_class_data *const c_data)
 Class associated configuration is selected.
 
void(* disable )(struct usbd_class_data *const c_data)
 Class associated configuration is disabled.
 
int(* init )(struct usbd_class_data *const c_data)
 Initialization of the class implementation.
 
void(* shutdown )(struct usbd_class_data *const c_data)
 Shutdown of the class implementation.
 
void *(* get_desc )(struct usbd_class_data *const c_data, const enum usbd_speed speed)
 Get function descriptor based on speed parameter.
 

Detailed Description

USB device support class instance API.

Field Documentation

◆ control_to_dev

int(* usbd_class_api::control_to_dev) (struct usbd_class_data *const c_data, const struct usb_setup_packet *const setup, const struct net_buf *const buf)

USB control request handler to device.

◆ control_to_host

int(* usbd_class_api::control_to_host) (struct usbd_class_data *const c_data, const struct usb_setup_packet *const setup, struct net_buf *const buf)

USB control request handler to host.

◆ disable

void(* usbd_class_api::disable) (struct usbd_class_data *const c_data)

Class associated configuration is disabled.

◆ enable

void(* usbd_class_api::enable) (struct usbd_class_data *const c_data)

Class associated configuration is selected.

◆ feature_halt

void(* usbd_class_api::feature_halt) (struct usbd_class_data *const c_data, uint8_t ep, bool halted)

Feature halt state update handler.

◆ get_desc

void *(* usbd_class_api::get_desc) (struct usbd_class_data *const c_data, const enum usbd_speed speed)

Get function descriptor based on speed parameter.

◆ init

int(* usbd_class_api::init) (struct usbd_class_data *const c_data)

Initialization of the class implementation.

◆ request

int(* usbd_class_api::request) (struct usbd_class_data *const c_data, struct net_buf *buf, int err)

Endpoint request completion event handler.

◆ resumed

void(* usbd_class_api::resumed) (struct usbd_class_data *const c_data)

USB power management handler resumed.

◆ shutdown

void(* usbd_class_api::shutdown) (struct usbd_class_data *const c_data)

Shutdown of the class implementation.

◆ sof

void(* usbd_class_api::sof) (struct usbd_class_data *const c_data)

Start of Frame.

◆ suspended

void(* usbd_class_api::suspended) (struct usbd_class_data *const c_data)

USB power management handler suspended.

◆ update

void(* usbd_class_api::update) (struct usbd_class_data *const c_data, uint8_t iface, uint8_t alternate)

Configuration update handler.


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