ESPHome 2026.12.0-dev
Loading...
Searching...
No Matches
rs485_frame.h File Reference

Go to the source code of this file.

Data Structures

class  esphome::rs485_frame::RS485FrameHub
 Hub for a DLE-framed RS485 bus: RX framer, CRC engine, gated TX queue and on_frame callbacks. More...
 
struct  esphome::rs485_frame::RS485FrameHub::Flags
 

Namespaces

namespace  esphome
 
namespace  esphome::rs485_frame
 

Enumerations

enum  esphome::rs485_frame::CrcVariant : uint8_t { esphome::rs485_frame::CRC_HEADER_INCLUSIVE , esphome::rs485_frame::CRC_PAYLOAD_ONLY }
 
enum  esphome::rs485_frame::CrcType : uint8_t {
  esphome::rs485_frame::CRC_TYPE_NONE , esphome::rs485_frame::CRC_TYPE_SUM8 , esphome::rs485_frame::CRC_TYPE_SUM16_BIG_ENDIAN , esphome::rs485_frame::CRC_TYPE_SUM16_LITTLE_ENDIAN ,
  esphome::rs485_frame::CRC_TYPE_XOR8 , esphome::rs485_frame::CRC_TYPE_CRC16_MODBUS
}
 
enum  esphome::rs485_frame::QueuePolicy : uint8_t { esphome::rs485_frame::QUEUE_REPLACE_LATEST , esphome::rs485_frame::QUEUE_FIFO }
 
enum  esphome::rs485_frame::TxGateMode : uint8_t { esphome::rs485_frame::TX_GATE_FRAME_TRIGGER , esphome::rs485_frame::TX_GATE_IDLE_GAP , esphome::rs485_frame::TX_GATE_FIXED_DELAY }
 
enum  esphome::rs485_frame::RxState : uint8_t { esphome::rs485_frame::RX_STATE_IDLE , esphome::rs485_frame::RX_STATE_IDLE_DLE , esphome::rs485_frame::RX_STATE_FRAME , esphome::rs485_frame::RX_STATE_FRAME_DLE }
 The _DLE states mean the last byte was a DLE. More...
 

Functions

constexpr uint8_t esphome::rs485_frame::crc_length (CrcType type)
 
bool esphome::rs485_frame::frame_has_prefix (std::span< const uint8_t > payload, const uint8_t *prefix, size_t len)
 True when payload starts with the len-byte prefix, which may live in PROGMEM.