|
ESPHome 2026.12.0-dev
|
Data Structures | |
| class | RS485FrameHub |
| Hub for a DLE-framed RS485 bus: RX framer, CRC engine, gated TX queue and on_frame callbacks. More... | |
Enumerations | |
| enum | CrcVariant : uint8_t { CRC_HEADER_INCLUSIVE , CRC_PAYLOAD_ONLY } |
| enum | CrcType : uint8_t { CRC_TYPE_NONE , CRC_TYPE_SUM8 , CRC_TYPE_SUM16_BIG_ENDIAN , CRC_TYPE_SUM16_LITTLE_ENDIAN , CRC_TYPE_XOR8 , CRC_TYPE_CRC16_MODBUS } |
| enum | QueuePolicy : uint8_t { QUEUE_REPLACE_LATEST , QUEUE_FIFO } |
| enum | TxGateMode : uint8_t { TX_GATE_FRAME_TRIGGER , TX_GATE_IDLE_GAP , TX_GATE_FIXED_DELAY } |
| enum | RxState : uint8_t { RX_STATE_IDLE , RX_STATE_IDLE_DLE , RX_STATE_FRAME , RX_STATE_FRAME_DLE } |
| The _DLE states mean the last byte was a DLE. More... | |
Functions | |
| ESPHOME_LOG_TAG (TAG, "rs485_frame") | |
| PROGMEM_STRING_TABLE (CrcTypeStrings, "none", "sum8", "sum16_big_endian", "sum16_little_endian", "xor8", "crc16_modbus") | |
| PROGMEM_STRING_TABLE (CrcVariantStrings, "header_inclusive", "payload_only") | |
| PROGMEM_STRING_TABLE (GateModeStrings, "frame_trigger", "idle_gap", "fixed_delay") | |
| PROGMEM_STRING_TABLE (QueuePolicyStrings, "replace_latest", "fifo") | |
| constexpr uint8_t | crc_length (CrcType type) |
| bool | 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. | |
| enum esphome::rs485_frame::CrcType : uint8_t |
| Enumerator | |
|---|---|
| CRC_TYPE_NONE | |
| CRC_TYPE_SUM8 | |
| CRC_TYPE_SUM16_BIG_ENDIAN | |
| CRC_TYPE_SUM16_LITTLE_ENDIAN | |
| CRC_TYPE_XOR8 | |
| CRC_TYPE_CRC16_MODBUS | |
Definition at line 19 of file rs485_frame.h.
| enum esphome::rs485_frame::CrcVariant : uint8_t |
| Enumerator | |
|---|---|
| CRC_HEADER_INCLUSIVE | |
| CRC_PAYLOAD_ONLY | |
Definition at line 18 of file rs485_frame.h.
| enum esphome::rs485_frame::QueuePolicy : uint8_t |
| Enumerator | |
|---|---|
| QUEUE_REPLACE_LATEST | |
| QUEUE_FIFO | |
Definition at line 30 of file rs485_frame.h.
| enum esphome::rs485_frame::RxState : uint8_t |
The _DLE states mean the last byte was a DLE.
| Enumerator | |
|---|---|
| RX_STATE_IDLE | |
| RX_STATE_IDLE_DLE | |
| RX_STATE_FRAME | |
| RX_STATE_FRAME_DLE | |
Definition at line 33 of file rs485_frame.h.
| enum esphome::rs485_frame::TxGateMode : uint8_t |
| Enumerator | |
|---|---|
| TX_GATE_FRAME_TRIGGER | |
| TX_GATE_IDLE_GAP | |
| TX_GATE_FIXED_DELAY | |
Definition at line 31 of file rs485_frame.h.
|
constexpr |
Definition at line 27 of file rs485_frame.h.
| esphome::rs485_frame::ESPHOME_LOG_TAG | ( | TAG | , |
| "rs485_frame" | ) |
|
inline |
True when payload starts with the len-byte prefix, which may live in PROGMEM.
Definition at line 36 of file rs485_frame.h.
| esphome::rs485_frame::PROGMEM_STRING_TABLE | ( | CrcTypeStrings | , |
| "none" | , | ||
| "sum8" | , | ||
| "sum16_big_endian" | , | ||
| "sum16_little_endian" | , | ||
| "xor8" | , | ||
| "crc16_modbus" | ) |
| esphome::rs485_frame::PROGMEM_STRING_TABLE | ( | CrcVariantStrings | , |
| "header_inclusive" | , | ||
| "payload_only" | ) |
| esphome::rs485_frame::PROGMEM_STRING_TABLE | ( | GateModeStrings | , |
| "frame_trigger" | , | ||
| "idle_gap" | , | ||
| "fixed_delay" | ) |
| esphome::rs485_frame::PROGMEM_STRING_TABLE | ( | QueuePolicyStrings | , |
| "replace_latest" | , | ||
| "fifo" | ) |