Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
cdc_acm.h File Reference

Public APIs for the CDC ACM class driver. More...

#include <errno.h>
#include <zephyr/device.h>

Go to the source code of this file.

Typedefs

typedef void(* cdc_dte_rate_callback_t) (const struct device *dev, uint32_t rate)
 A function that is called when the USB host changes the baud rate.
 

Functions

int cdc_acm_dte_rate_callback_set (const struct device *dev, cdc_dte_rate_callback_t callback)
 Set the callback for dwDTERate SetLineCoding requests.
 

Detailed Description

Public APIs for the CDC ACM class driver.

Typedef Documentation

◆ cdc_dte_rate_callback_t

typedef void(* cdc_dte_rate_callback_t) (const struct device *dev, uint32_t rate)

A function that is called when the USB host changes the baud rate.

Parameters
devDevice struct for the CDC ACM device.
rateNew USB baud rate

Function Documentation

◆ cdc_acm_dte_rate_callback_set()

int cdc_acm_dte_rate_callback_set ( const struct device * dev,
cdc_dte_rate_callback_t callback )

Set the callback for dwDTERate SetLineCoding requests.

The callback is invoked when the USB host changes the baud rate.

Note
This function is available only when CONFIG_CDC_ACM_DTE_RATE_CALLBACK_SUPPORT is enabled.
Parameters
devCDC ACM device structure.
callbackEvent handler.
Returns
0 on success.