|
ESPHome 2026.12.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, in RAM or flash, 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 |
| ESPHOME_ALWAYS_INLINE uint8_t | opcode () 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 |
| static constexpr uint8_t | BROADCAST_ADDRESS = 0xF |
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 51 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, in RAM or flash, is at most MAX_PAYLOAD_LENGTH bytes; send() checks that.
Definition at line 98 of file hdmi_cec.cpp.
|
inline |
Definition at line 67 of file hdmi_cec.h.
|
inline |
Definition at line 70 of file hdmi_cec.h.
|
inline |
Definition at line 62 of file hdmi_cec.h.
|
inline |
Definition at line 61 of file hdmi_cec.h.
|
inline |
Definition at line 63 of file hdmi_cec.h.
|
inline |
Definition at line 66 of file hdmi_cec.h.
|
inline |
The bytes after the header, starting with the opcode.
Definition at line 69 of file hdmi_cec.h.
|
inline |
False when the frame is full already; the bus allows no more.
Definition at line 72 of file hdmi_cec.h.
|
inline |
Definition at line 64 of file hdmi_cec.h.
|
staticconstexpr |
Definition at line 55 of file hdmi_cec.h.
|
protected |
Definition at line 81 of file hdmi_cec.h.
|
staticconstexpr |
Definition at line 53 of file hdmi_cec.h.
|
staticconstexpr |
Definition at line 54 of file hdmi_cec.h.
|
protected |
Definition at line 82 of file hdmi_cec.h.