Home IO Control
ESPHome add-on for IO-Homecontrol devices
Loading...
Searching...
No Matches
radio_soft_phy.cpp File Reference

Software PHY implementation for radios without IoHomeOn hardware framing. More...

#include "radio_soft_phy.h"
#include "proto_constants.h"
#include <algorithm>
#include <cstring>
#include <utility>
Include dependency graph for radio_soft_phy.cpp:

Go to the source code of this file.

Namespaces

namespace  esphome
namespace  esphome::home_io_control

Functions

uint8_t esphome::home_io_control::decode_uart_probe (const uint8_t *raw, uint8_t raw_len, uint8_t bit_offset, uint8_t *decoded, uint8_t decoded_max_len)
 Decode a raw UART‑encoded bitstream into bytes.
static std::pair< uint8_t, uint8_t > esphome::home_io_control::find_crc_valid_frame (const uint8_t *decoded, uint8_t decoded_len)
 Try to find a CRC-valid IO-Homecontrol frame within a decoded UART byte stream.
UartProbeResult esphome::home_io_control::find_uart_probe (const uint8_t *raw, uint8_t raw_len)
 Search raw RX buffer for the best CRC-validated IO-Homecontrol frame.
uint8_t esphome::home_io_control::soft_phy_raw_bytes_for_frame (uint8_t frame_len)
 Raw on-air bytes needed to carry a whole frame: frame_len protocol bytes plus the two trailing CRC bytes, each UART-packed into a 10-bit cell.
uint8_t esphome::home_io_control::soft_phy_peek_frame_length (const uint8_t *raw, uint8_t raw_len)
 Recover a frame's total length from the very first UART cell of a reception.
uint8_t esphome::home_io_control::uart_encode_packet (const uint8_t *data, uint8_t len, uint8_t *encoded, uint8_t encoded_max_len)
 UART-encode a buffer of bytes (start bit 0, 8 data bits LSB-first, stop bit 1).

Variables

static const uint8_t esphome::home_io_control::UART_PROBE_MAX_BIT_OFFSET = 10
 Maximum bit offset to search for valid UART decode start position.

Detailed Description

Software PHY implementation for radios without IoHomeOn hardware framing.

Definition in file radio_soft_phy.cpp.