ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::uart::ESP8266SoftwareSerial Class Reference

#include <uart_component_esp8266.h>

Public Member Functions

void setup (InternalGPIOPin *tx_pin, InternalGPIOPin *rx_pin, uint32_t baud_rate, uint8_t stop_bits, uint32_t data_bits, UARTParityOptions parity, size_t rx_buffer_size)
 
uint8_t read_byte ()
 
uint8_t peek_byte ()
 
void flush ()
 
void write_byte (uint8_t data)
 
size_t available ()
 

Protected Member Functions

void wait_ (uint32_t *wait, const uint32_t &start, uint32_t bit_time)
 
bool read_bit_ (uint32_t *wait, const uint32_t &start, uint32_t bit_time)
 
void write_bit_ (bool bit, uint32_t *wait, const uint32_t &start, uint32_t bit_time)
 
void rx_finalize_pending_ ()
 
void ESPHOME_ALWAYS_INLINE rx_sync_ ()
 

Static Protected Member Functions

static void gpio_intr (ESP8266SoftwareSerial *arg)
 Above SW_SERIAL_EDGE_MODE_MAX_BAUD; reads the whole byte in the ISR.
 
static void gpio_intr_edge (ESP8266SoftwareSerial *arg)
 

Protected Attributes

uint32_t bit_time_ {0}
 
InternalGPIOPin * gpio_tx_pin_ {nullptr}
 
ISRInternalGPIOPin tx_pin_
 
InternalGPIOPin * gpio_rx_pin_ {nullptr}
 
ISRInternalGPIOPin rx_pin_
 
SoftwareSerialRxDecoder rx_
 
UARTParityOptions parity_
 
uint8_t stop_bits_
 
uint8_t data_bits_
 

Detailed Description

Definition at line 15 of file uart_component_esp8266.h.

Member Function Documentation

◆ available()

size_t esphome::uart::ESP8266SoftwareSerial::available ( )

Definition at line 418 of file uart_component_esp8266.cpp.

◆ flush()

void esphome::uart::ESP8266SoftwareSerial::flush ( )

Definition at line 415 of file uart_component_esp8266.cpp.

◆ gpio_intr()

void IRAM_ATTR esphome::uart::ESP8266SoftwareSerial::gpio_intr ( ESP8266SoftwareSerial * arg)
staticprotected

Above SW_SERIAL_EDGE_MODE_MAX_BAUD; reads the whole byte in the ISR.

Definition at line 307 of file uart_component_esp8266.cpp.

◆ gpio_intr_edge()

void IRAM_ATTR esphome::uart::ESP8266SoftwareSerial::gpio_intr_edge ( ESP8266SoftwareSerial * arg)
staticprotected

Definition at line 336 of file uart_component_esp8266.cpp.

◆ peek_byte()

uint8_t esphome::uart::ESP8266SoftwareSerial::peek_byte ( )

Definition at line 411 of file uart_component_esp8266.cpp.

◆ read_bit_()

bool IRAM_ATTR esphome::uart::ESP8266SoftwareSerial::read_bit_ ( uint32_t * wait,
const uint32_t & start,
uint32_t bit_time )
protected

Definition at line 399 of file uart_component_esp8266.cpp.

◆ read_byte()

uint8_t esphome::uart::ESP8266SoftwareSerial::read_byte ( )

Definition at line 407 of file uart_component_esp8266.cpp.

◆ rx_finalize_pending_()

void esphome::uart::ESP8266SoftwareSerial::rx_finalize_pending_ ( )
protected

Definition at line 345 of file uart_component_esp8266.cpp.

◆ rx_sync_()

void ESPHOME_ALWAYS_INLINE esphome::uart::ESP8266SoftwareSerial::rx_sync_ ( )
inlineprotected

Definition at line 39 of file uart_component_esp8266.h.

◆ setup()

void esphome::uart::ESP8266SoftwareSerial::setup ( InternalGPIOPin * tx_pin,
InternalGPIOPin * rx_pin,
uint32_t baud_rate,
uint8_t stop_bits,
uint32_t data_bits,
UARTParityOptions parity,
size_t rx_buffer_size )

Definition at line 258 of file uart_component_esp8266.cpp.

◆ wait_()

void IRAM_ATTR esphome::uart::ESP8266SoftwareSerial::wait_ ( uint32_t * wait,
const uint32_t & start,
uint32_t bit_time )
protected

Definition at line 394 of file uart_component_esp8266.cpp.

◆ write_bit_()

void IRAM_ATTR esphome::uart::ESP8266SoftwareSerial::write_bit_ ( bool bit,
uint32_t * wait,
const uint32_t & start,
uint32_t bit_time )
protected

Definition at line 403 of file uart_component_esp8266.cpp.

◆ write_byte()

void IRAM_ATTR HOT esphome::uart::ESP8266SoftwareSerial::write_byte ( uint8_t data)

Definition at line 357 of file uart_component_esp8266.cpp.

Field Documentation

◆ bit_time_

uint32_t esphome::uart::ESP8266SoftwareSerial::bit_time_ {0}
protected

Definition at line 45 of file uart_component_esp8266.h.

◆ data_bits_

uint8_t esphome::uart::ESP8266SoftwareSerial::data_bits_
protected

Definition at line 53 of file uart_component_esp8266.h.

◆ gpio_rx_pin_

InternalGPIOPin* esphome::uart::ESP8266SoftwareSerial::gpio_rx_pin_ {nullptr}
protected

Definition at line 48 of file uart_component_esp8266.h.

◆ gpio_tx_pin_

InternalGPIOPin* esphome::uart::ESP8266SoftwareSerial::gpio_tx_pin_ {nullptr}
protected

Definition at line 46 of file uart_component_esp8266.h.

◆ parity_

UARTParityOptions esphome::uart::ESP8266SoftwareSerial::parity_
protected

Definition at line 51 of file uart_component_esp8266.h.

◆ rx_

SoftwareSerialRxDecoder esphome::uart::ESP8266SoftwareSerial::rx_
protected

Definition at line 50 of file uart_component_esp8266.h.

◆ rx_pin_

ISRInternalGPIOPin esphome::uart::ESP8266SoftwareSerial::rx_pin_
protected

Definition at line 49 of file uart_component_esp8266.h.

◆ stop_bits_

uint8_t esphome::uart::ESP8266SoftwareSerial::stop_bits_
protected

Definition at line 52 of file uart_component_esp8266.h.

◆ tx_pin_

ISRInternalGPIOPin esphome::uart::ESP8266SoftwareSerial::tx_pin_
protected

Definition at line 47 of file uart_component_esp8266.h.


The documentation for this class was generated from the following files: