7#include <zephyr/device.h>
8#include <zephyr/drivers/uart.h>
9#include <zephyr/usb/usb_device.h>
13static const char *
const TAG =
"logger";
16#ifdef USE_LOGGER_USB_CDC
20 static bool opened =
false;
22 uart_line_ctrl_get(this->
uart_dev_, UART_LINE_CTRL_DTR, &dtr);
39 static const struct device *uart_dev =
nullptr;
40 switch (this->
uart_) {
42 uart_dev = DEVICE_DT_GET_OR_NULL(DT_NODELABEL(uart0));
45 uart_dev = DEVICE_DT_GET_OR_NULL(DT_NODELABEL(uart1));
47#ifdef USE_LOGGER_USB_CDC
49 uart_dev = DEVICE_DT_GET_OR_NULL(DT_NODELABEL(cdc_acm_uart0));
50 if (device_is_ready(uart_dev)) {
56 if (!device_is_ready(uart_dev)) {
63 ESP_LOGI(TAG,
"Log initialized");
void schedule_dump_config()
const char * get_uart_selection_()
void pre_setup()
Set up this component.
void write_msg_(const char *msg)
const char *const UART_SELECTIONS[]
Application App
Global storage of Application pointer - only one Application can exist.