2#if defined(USE_ZEPHYR_CDC_ACM_RATE_CALLBACK)
5#include <zephyr/drivers/uart.h>
6#ifndef CONFIG_USB_DEVICE_STACK_NEXT
7#include <zephyr/drivers/uart/cdc_acm.h>
10#define DEVICE_AND_COMMA(node_id) DEVICE_DT_GET(node_id),
15constexpr std::array<
const device *, DT_NUM_INST_STATUS_OKAY(zephyr_cdc_acm_uart)> CDC_DEVICES{
16 DT_FOREACH_STATUS_OKAY(zephyr_cdc_acm_uart, DEVICE_AND_COMMA)};
29 for (
const device *dev : CDC_DEVICES) {
30#ifndef CONFIG_USB_DEVICE_STACK_NEXT
46 if (uart_line_ctrl_get(dev, UART_LINE_CTRL_BAUD_RATE, &rate) != 0)
Helper class that wraps a mutex with a RAII-style API.
Mutex implementation, with API based on the unavailable std::mutex.
static CallbackManager< void(const device *, uint32_t)> rate_callbacks
static void post_rate(const device *dev)
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.
Application App
Global storage of Application pointer - only one Application can exist.