16#include <hal/uart_types.h>
17#include <soc/soc_caps.h>
36#if SOC_UART_HP_NUM > 2
39#if SOC_UART_HP_NUM > 3
42#if SOC_UART_HP_NUM > 4
45#if SOC_UART_LP_NUM >= 1
62#if SOC_UART_HP_NUM > 2
63 case uart_port::uart2:
66#if SOC_UART_HP_NUM > 3
67 case uart_port::uart3:
70#if SOC_UART_HP_NUM > 4
71 case uart_port::uart4:
74#if SOC_UART_LP_NUM >= 1
75 case uart_port::lp_uart0:
79 return "unknown(" + std::to_string(
static_cast<int>(
p)) +
")";
88#ifdef CONFIG_IDFXX_STD_FORMAT
95 constexpr auto parse(format_parse_context& ctx) {
return ctx.begin(); }
97 template<
typename FormatContext>
100 return std::copy(s.begin(), s.end(), ctx.out());
std::string to_string(core_id c)
Returns a string representation of a CPU core identifier.
uart_port
Identifies a UART port.
std::expected< T, std::error_code > result
result type wrapping a value or error code.