Software serial RX decoder: on_edge() counts bits from the time between edges; finalize() completes a byte whose idle high tail has no closing edge.
More...
#include <software_serial_rx_decoder.h>
|
| static constexpr uint8_t | RX_IDLE = 0xFF |
| |
Software serial RX decoder: on_edge() counts bits from the time between edges; finalize() completes a byte whose idle high tail has no closing edge.
Times are in any steady tick unit.
Definition at line 13 of file software_serial_rx_decoder.h.
◆ available()
| size_t esphome::uart::SoftwareSerialRxDecoder::available |
( |
| ) |
const |
|
inline |
◆ buffer()
| uint8_t * esphome::uart::SoftwareSerialRxDecoder::buffer |
( |
| ) |
const |
|
inline |
◆ buffer_size()
| size_t esphome::uart::SoftwareSerialRxDecoder::buffer_size |
( |
| ) |
const |
|
inline |
◆ consume_run_()
| bool ESPHOME_ALWAYS_INLINE esphome::uart::SoftwareSerialRxDecoder::consume_run_ |
( |
uint32_t | bits, |
|
|
bool | level ) |
|
inlineprotected |
◆ finalize()
| void esphome::uart::SoftwareSerialRxDecoder::finalize |
( |
uint32_t | now | ) |
|
|
inline |
◆ finalize_due()
| bool esphome::uart::SoftwareSerialRxDecoder::finalize_due |
( |
uint32_t | now | ) |
const |
|
inline |
◆ on_edge()
| bool ESPHOME_ALWAYS_INLINE esphome::uart::SoftwareSerialRxDecoder::on_edge |
( |
uint32_t | now, |
|
|
bool | level ) |
|
inline |
ISR.
True to wake the loop: a byte was pushed, or the line went high in an open frame (a data 1 and the idle tail look alike) so finalize() may be needed.
Definition at line 41 of file software_serial_rx_decoder.h.
◆ peek_byte()
| uint8_t esphome::uart::SoftwareSerialRxDecoder::peek_byte |
( |
| ) |
const |
|
inline |
◆ pending()
| bool esphome::uart::SoftwareSerialRxDecoder::pending |
( |
| ) |
const |
|
inline |
◆ push_byte()
| bool ESPHOME_ALWAYS_INLINE esphome::uart::SoftwareSerialRxDecoder::push_byte |
( |
uint8_t | data | ) |
|
|
inline |
◆ read_byte()
| uint8_t esphome::uart::SoftwareSerialRxDecoder::read_byte |
( |
| ) |
|
|
inline |
◆ reset()
| void esphome::uart::SoftwareSerialRxDecoder::reset |
( |
uint32_t | now, |
|
|
bool | level ) |
|
inline |
◆ setup()
| void esphome::uart::SoftwareSerialRxDecoder::setup |
( |
uint32_t | bit_ticks, |
|
|
uint8_t | data_bits, |
|
|
bool | parity, |
|
|
uint8_t | stop_bits, |
|
|
uint8_t * | buffer, |
|
|
size_t | buffer_size ) |
|
inline |
◆ tail_ticks_()
| uint32_t esphome::uart::SoftwareSerialRxDecoder::tail_ticks_ |
( |
uint8_t | bit | ) |
const |
|
inlineprotected |
◆ bit_
| volatile uint8_t esphome::uart::SoftwareSerialRxDecoder::bit_ {RX_IDLE} |
|
protected |
◆ bit_ticks_
| uint32_t esphome::uart::SoftwareSerialRxDecoder::bit_ticks_ {0} |
|
protected |
◆ buffer_
| uint8_t* esphome::uart::SoftwareSerialRxDecoder::buffer_ {nullptr} |
|
protected |
◆ buffer_size_
| size_t esphome::uart::SoftwareSerialRxDecoder::buffer_size_ {0} |
|
protected |
◆ cur_byte_
| volatile uint8_t esphome::uart::SoftwareSerialRxDecoder::cur_byte_ {0} |
|
protected |
◆ data_bits_
| uint8_t esphome::uart::SoftwareSerialRxDecoder::data_bits_ {8} |
|
protected |
◆ in_pos_
| volatile size_t esphome::uart::SoftwareSerialRxDecoder::in_pos_ {0} |
|
protected |
◆ last_edge_
| volatile uint32_t esphome::uart::SoftwareSerialRxDecoder::last_edge_ {0} |
|
protected |
◆ last_level_
| volatile bool esphome::uart::SoftwareSerialRxDecoder::last_level_ {true} |
|
protected |
◆ max_run_ticks_
| uint32_t esphome::uart::SoftwareSerialRxDecoder::max_run_ticks_ {0} |
|
protected |
◆ out_pos_
| size_t esphome::uart::SoftwareSerialRxDecoder::out_pos_ {0} |
|
protected |
◆ RX_IDLE
| uint8_t esphome::uart::SoftwareSerialRxDecoder::RX_IDLE = 0xFF |
|
staticconstexpr |
◆ stop_bit_
| uint8_t esphome::uart::SoftwareSerialRxDecoder::stop_bit_ {8} |
|
protected |
The documentation for this class was generated from the following file: