ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::uart Namespace Reference

Data Structures

class  ESP8266SoftwareSerial
 
class  ESP8266UartComponent
 
class  HostUartComponent
 
class  IDFUARTComponent
 ESP-IDF UART driver wrapper. More...
 
class  LibreTinyUARTComponent
 
class  RP2UartComponent
 
class  SoftwareSerialRxDecoder
 Software serial RX decoder: on_edge() counts bits from the time between edges; finalize() completes a byte whose idle high tail has no closing edge. More...
 
class  UARTBinarySensorHub
 
class  UARTButton
 
class  UARTComponent
 
class  UARTDebug
 This class contains some static methods, that can be used to easily create a logging action for the debugger. More...
 
class  UARTDebugger
 The UARTDebugger class adds debugging support to a UART bus. More...
 
class  UARTDevice
 
class  UARTDummyReceiver
 This UARTDevice is used by the serial debugger to read data from a serial interface when the 'dummy_receiver' option is enabled. More...
 
class  UARTEvent
 
class  UartPacketInterface
 A packet interface for sending and receiving framed packets over a UART connection. More...
 
class  UARTSwitch
 
class  UARTTransport
 A transport protocol for sending and receiving packets over a UART connection. More...
 

Enumerations

enum  UARTParityOptions {
  UART_CONFIG_PARITY_NONE , UART_CONFIG_PARITY_EVEN , UART_CONFIG_PARITY_ODD , UART_CONFIG_PARITY_MARK ,
  UART_CONFIG_PARITY_SPACE
}
 
enum  UARTFlowControl : uint8_t { UART_FLOW_CONTROL_NONE , UART_FLOW_CONTROL_RTS_CTS , UART_FLOW_CONTROL_XON_XOFF }
 
enum  UARTDirection { UART_DIRECTION_RX , UART_DIRECTION_TX , UART_DIRECTION_BOTH }
 
enum class  UARTFlushResult { UART_FLUSH_RESULT_SUCCESS , UART_FLUSH_RESULT_TIMEOUT , UART_FLUSH_RESULT_FAILED , UART_FLUSH_RESULT_ASSUMED_SUCCESS }
 Result of a flush() call. More...
 

Functions

 ESPHOME_LOG_TAG (TAG, "uart.binary_sensor")
 
 ESPHOME_LOG_TAG (TAG, "uart.button")
 
 ESPHOME_LOG_TAG (TAG, "uart.event")
 
 ESPHOME_LOG_TAG (TAG, "uart.packet_interface")
 
 ESPHOME_LOG_TAG (TAG, "uart_transport")
 
 ESPHOME_LOG_TAG (TAG, "uart.switch")
 
 ESPHOME_LOG_TAG (TAG, "uart")
 
 PROGMEM_STRING_TABLE (UARTParityStrings, "NONE", "EVEN", "ODD", "MARK", "SPACE", "UNKNOWN")
 
const LogString * parity_to_str (UARTParityOptions parity)
 
 __attribute__ ((always_inline)) static inline uint32_t rx_now()
 
 ESPHOME_LOG_TAG (TAG, "uart_debug")
 

Enumeration Type Documentation

◆ UARTDirection

Enumerator
UART_DIRECTION_RX 
UART_DIRECTION_TX 
UART_DIRECTION_BOTH 

Definition at line 35 of file uart_component.h.

◆ UARTFlowControl

Enumerator
UART_FLOW_CONTROL_NONE 
UART_FLOW_CONTROL_RTS_CTS 
UART_FLOW_CONTROL_XON_XOFF 

Definition at line 28 of file uart_component.h.

◆ UARTFlushResult

enum class esphome::uart::UARTFlushResult
strong

Result of a flush() call.

Enumerator
UART_FLUSH_RESULT_SUCCESS 

Confirmed: all bytes left the TX FIFO.

UART_FLUSH_RESULT_TIMEOUT 

Confirmed: timed out before TX completed.

UART_FLUSH_RESULT_FAILED 

Confirmed: driver or hardware error.

UART_FLUSH_RESULT_ASSUMED_SUCCESS 

Platform cannot report result; success is assumed.

Definition at line 45 of file uart_component.h.

◆ UARTParityOptions

Enumerator
UART_CONFIG_PARITY_NONE 
UART_CONFIG_PARITY_EVEN 
UART_CONFIG_PARITY_ODD 
UART_CONFIG_PARITY_MARK 
UART_CONFIG_PARITY_SPACE 

Definition at line 17 of file uart_component.h.

Function Documentation

◆ __attribute__()

esphome::uart::__attribute__ ( (always_inline) )

Definition at line 24 of file uart_component_esp8266.cpp.

◆ ESPHOME_LOG_TAG() [1/8]

esphome::uart::ESPHOME_LOG_TAG ( TAG ,
"uart"  )

◆ ESPHOME_LOG_TAG() [2/8]

esphome::uart::ESPHOME_LOG_TAG ( TAG ,
"uart.binary_sensor"  )

◆ ESPHOME_LOG_TAG() [3/8]

esphome::uart::ESPHOME_LOG_TAG ( TAG ,
"uart.button"  )

◆ ESPHOME_LOG_TAG() [4/8]

esphome::uart::ESPHOME_LOG_TAG ( TAG ,
"uart.event"  )

◆ ESPHOME_LOG_TAG() [5/8]

esphome::uart::ESPHOME_LOG_TAG ( TAG ,
"uart.packet_interface"  )

◆ ESPHOME_LOG_TAG() [6/8]

esphome::uart::ESPHOME_LOG_TAG ( TAG ,
"uart.switch"  )

◆ ESPHOME_LOG_TAG() [7/8]

esphome::uart::ESPHOME_LOG_TAG ( TAG ,
"uart_debug"  )

◆ ESPHOME_LOG_TAG() [8/8]

esphome::uart::ESPHOME_LOG_TAG ( TAG ,
"uart_transport"  )

◆ parity_to_str()

const LogString * esphome::uart::parity_to_str ( UARTParityOptions parity)

Definition at line 43 of file uart.cpp.

◆ PROGMEM_STRING_TABLE()

esphome::uart::PROGMEM_STRING_TABLE ( UARTParityStrings ,
"NONE" ,
"EVEN" ,
"ODD" ,
"MARK" ,
"SPACE" ,
"UNKNOWN"  )