|
cryptnox-sdk-esp32 1.0.0
ESP32 SDK for Cryptnox Hardware Wallet
|
Implementation of ESP32Logger — ESP32 UART0 logging backend. More...
#include "ESP32Logger.h"#include <stdint.h>#include <stddef.h>#include <stdio.h>#include <string.h>#include "driver/uart.h"Go to the source code of this file.
Functions | |
| static uint32_t | clamp_base (int base) |
| static void | uart_write_str (const char *str) |
| static void | write_uint_to_uart (uint32_t value, uint32_t base) |
Variables | |
| static const uart_port_t | UART_LOG_PORT = UART_NUM_0 |
| static const uint8_t | UART_RX_FLOW_THRESH_NONE = static_cast<uint8_t>(0U) |
| static const uint32_t | NUM_BUF_SIZE = 33U |
| static const uint32_t | NUM_BASE_MIN = 2U |
| static const uint32_t | NUM_BASE_MAX = 16U |
| static const size_t | ELEMENT_SIZE = 1U |
| static const char | LOGGER_NEWLINE [] = "\r\n" |
| static const char | HEX_CHARS [] = "0123456789ABCDEF" |
Implementation of ESP32Logger — ESP32 UART0 logging backend.
Routes all CW_Logger output through the ESP-IDF UART driver on UART0. Full API documentation lives on the declarations in ESP32Logger.h.
Definition in file ESP32Logger.cpp.
|
static |
Clamp base to the valid [NUM_BASE_MIN, NUM_BASE_MAX] range; returns DEC on out-of-range input.
Definition at line 50 of file ESP32Logger.cpp.
References NUM_BASE_MAX, and NUM_BASE_MIN.
Referenced by ESP32Logger::print(), ESP32Logger::print(), ESP32Logger::print(), and ESP32Logger::print().
|
static |
Transmit a NUL-terminated string to stdout via fwrite.
Definition at line 62 of file ESP32Logger.cpp.
References ELEMENT_SIZE.
Referenced by ESP32Logger::print(), ESP32Logger::print(), and ESP32Logger::println().
|
static |
Convert value to ASCII digits in the given base and write the result to stdout.
Definition at line 69 of file ESP32Logger.cpp.
References HEX_CHARS, and NUM_BUF_SIZE.
Referenced by ESP32Logger::print(), ESP32Logger::print(), ESP32Logger::print(), and ESP32Logger::print().
|
static |
Definition at line 40 of file ESP32Logger.cpp.
Referenced by uart_write_str().
|
static |
Definition at line 43 of file ESP32Logger.cpp.
Referenced by write_uint_to_uart().
|
static |
Definition at line 42 of file ESP32Logger.cpp.
Referenced by ESP32Logger::println().
|
static |
Definition at line 39 of file ESP32Logger.cpp.
Referenced by clamp_base().
|
static |
Definition at line 38 of file ESP32Logger.cpp.
Referenced by clamp_base().
|
static |
Definition at line 37 of file ESP32Logger.cpp.
Referenced by write_uint_to_uart().
|
static |
Definition at line 33 of file ESP32Logger.cpp.
Referenced by ESP32Logger::begin().
|
static |
Definition at line 34 of file ESP32Logger.cpp.
Referenced by ESP32Logger::begin().