|
ESPHome 2026.11.0-dev
|
One CEC bus message: a header byte with the initiator and destination addresses, then up to 15 payload bytes of which the first is the opcode. More...
#include <hdmi_cec.h>
Public Member Functions | |
| Frame ()=default | |
| Frame (uint8_t initiator_addr, uint8_t destination_addr, std::span< const uint8_t > payload) | |
| The payload is at most MAX_PAYLOAD_LENGTH bytes; send() checks that. | |
| ESPHOME_ALWAYS_INLINE uint8_t | initiator_addr () const |
| ESPHOME_ALWAYS_INLINE uint8_t | destination_addr () const |
| ESPHOME_ALWAYS_INLINE bool | is_broadcast () const |
| ESPHOME_ALWAYS_INLINE size_t | size () const |
| std::span< const uint8_t > | bytes () const |
| std::span< const uint8_t > | payload () const |
| The bytes after the header, starting with the opcode. | |
| ESPHOME_ALWAYS_INLINE void | clear () |
| ESPHOME_ALWAYS_INLINE bool | push_back (uint8_t data) |
| False when the frame is full already; the bus allows no more. | |
Static Public Attributes | |
| static constexpr size_t | MAX_LENGTH = 16 |
| static constexpr size_t | MAX_PAYLOAD_LENGTH = MAX_LENGTH - 1 |
Protected Attributes | |
| std::array< uint8_t, MAX_LENGTH > | data_ {} |
| uint8_t | size_ {0} |
One CEC bus message: a header byte with the initiator and destination addresses, then up to 15 payload bytes of which the first is the opcode.
Fixed storage, so the receive interrupt never allocates.
Definition at line 35 of file hdmi_cec.h.
|
default |
| esphome::hdmi_cec::Frame::Frame | ( | uint8_t | initiator_addr, |
| uint8_t | destination_addr, | ||
| std::span< const uint8_t > | payload ) |
The payload is at most MAX_PAYLOAD_LENGTH bytes; send() checks that.
Definition at line 36 of file hdmi_cec.cpp.
|
inline |
Definition at line 48 of file hdmi_cec.h.
|
inline |
Definition at line 51 of file hdmi_cec.h.
|
inline |
Definition at line 45 of file hdmi_cec.h.
|
inline |
Definition at line 44 of file hdmi_cec.h.
|
inline |
Definition at line 46 of file hdmi_cec.h.
|
inline |
The bytes after the header, starting with the opcode.
Definition at line 50 of file hdmi_cec.h.
|
inline |
False when the frame is full already; the bus allows no more.
Definition at line 53 of file hdmi_cec.h.
|
inline |
Definition at line 47 of file hdmi_cec.h.
|
protected |
Definition at line 62 of file hdmi_cec.h.
|
staticconstexpr |
Definition at line 37 of file hdmi_cec.h.
|
staticconstexpr |
Definition at line 38 of file hdmi_cec.h.
|
protected |
Definition at line 63 of file hdmi_cec.h.