ESPHome  2024.10.2
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
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)
 
int available ()
 

Protected Member Functions

void wait_ (uint32_t *wait, const uint32_t &start)
 
bool read_bit_ (uint32_t *wait, const uint32_t &start)
 
void write_bit_ (bool bit, uint32_t *wait, const uint32_t &start)
 

Static Protected Member Functions

static void gpio_intr (ESP8266SoftwareSerial *arg)
 

Protected Attributes

uint32_t bit_time_ {0}
 
uint8_t * rx_buffer_ {nullptr}
 
size_t rx_buffer_size_
 
volatile size_t rx_in_pos_ {0}
 
size_t rx_out_pos_ {0}
 
uint8_t stop_bits_
 
uint8_t data_bits_
 
UARTParityOptions parity_
 
InternalGPIOPingpio_tx_pin_ {nullptr}
 
ISRInternalGPIOPin tx_pin_
 
InternalGPIOPingpio_rx_pin_ {nullptr}
 
ISRInternalGPIOPin rx_pin_
 

Detailed Description

Definition at line 15 of file uart_component_esp8266.h.

Member Function Documentation

◆ available()

int esphome::uart::ESP8266SoftwareSerial::available ( )

Definition at line 311 of file uart_component_esp8266.cpp.

◆ flush()

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

Definition at line 308 of file uart_component_esp8266.cpp.

◆ gpio_intr()

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

Definition at line 225 of file uart_component_esp8266.cpp.

◆ peek_byte()

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

Definition at line 303 of file uart_component_esp8266.cpp.

◆ read_bit_()

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

Definition at line 288 of file uart_component_esp8266.cpp.

◆ read_byte()

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

Definition at line 296 of file uart_component_esp8266.cpp.

◆ 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 203 of file uart_component_esp8266.cpp.

◆ wait_()

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

Definition at line 283 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 
)
protected

Definition at line 292 of file uart_component_esp8266.cpp.

◆ write_byte()

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

Definition at line 248 of file uart_component_esp8266.cpp.

Field Documentation

◆ bit_time_

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

Definition at line 36 of file uart_component_esp8266.h.

◆ data_bits_

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

Definition at line 42 of file uart_component_esp8266.h.

◆ gpio_rx_pin_

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

Definition at line 46 of file uart_component_esp8266.h.

◆ gpio_tx_pin_

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

Definition at line 44 of file uart_component_esp8266.h.

◆ parity_

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

Definition at line 43 of file uart_component_esp8266.h.

◆ rx_buffer_

uint8_t* esphome::uart::ESP8266SoftwareSerial::rx_buffer_ {nullptr}
protected

Definition at line 37 of file uart_component_esp8266.h.

◆ rx_buffer_size_

size_t esphome::uart::ESP8266SoftwareSerial::rx_buffer_size_
protected

Definition at line 38 of file uart_component_esp8266.h.

◆ rx_in_pos_

volatile size_t esphome::uart::ESP8266SoftwareSerial::rx_in_pos_ {0}
protected

Definition at line 39 of file uart_component_esp8266.h.

◆ rx_out_pos_

size_t esphome::uart::ESP8266SoftwareSerial::rx_out_pos_ {0}
protected

Definition at line 40 of file uart_component_esp8266.h.

◆ rx_pin_

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

Definition at line 47 of file uart_component_esp8266.h.

◆ stop_bits_

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

Definition at line 41 of file uart_component_esp8266.h.

◆ tx_pin_

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

Definition at line 45 of file uart_component_esp8266.h.


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