Passes the bit rate a USB host sets on a CDC ACM port from the USB driver's thread to the main loop.
More...
#include <cdc_acm.h>
|
| template<typename F > |
| static void | add_on_rate_callback (F &&callback) |
| | Call from setup().
|
| |
| static void | rate_changed (const device *dev) |
| | Called by the USB driver, from its own thread, after the host set the bit rate of dev.
|
| |
Passes the bit rate a USB host sets on a CDC ACM port from the USB driver's thread to the main loop.
Definition at line 11 of file cdc_acm.h.
◆ add_on_rate_callback()
template<typename F >
| static void esphome::zephyr::CdcAcm::add_on_rate_callback |
( |
F && | callback | ) |
|
|
inlinestatic |
Call from setup().
Callbacks get each port's current rate, then every rate the host sets, on the main loop. Rates reach the callbacks on a scheduler tick, which normally comes after every subscriber's setup(); a component that holds setup back with can_proceed() runs the scheduler earlier, and a subscriber registered after that tick misses the boot-time rate.
Definition at line 17 of file cdc_acm.h.
◆ post_rate()
| void esphome::zephyr::CdcAcm::post_rate |
( |
const device * | dev | ) |
|
|
staticprotected |
◆ rate_changed()
| void esphome::zephyr::CdcAcm::rate_changed |
( |
const device * | dev | ) |
|
|
static |
Called by the USB driver, from its own thread, after the host set the bit rate of dev.
Definition at line 38 of file cdc_acm.cpp.
◆ start()
| void esphome::zephyr::CdcAcm::start |
( |
| ) |
|
|
staticprotected |
◆ rate_callbacks
The documentation for this class was generated from the following files: