ESPHome  2022.6.3
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::i2c::I2CBus Class Referenceabstract

#include <i2c_bus.h>

Inheritance diagram for esphome::i2c::I2CBus:
esphome::i2c::ArduinoI2CBus esphome::i2c::IDFI2CBus esphome::tca9548a::TCA9548AChannel

Public Member Functions

virtual ErrorCode read (uint8_t address, uint8_t *buffer, size_t len)
 
virtual ErrorCode readv (uint8_t address, ReadBuffer *buffers, size_t cnt)=0
 
virtual ErrorCode write (uint8_t address, const uint8_t *buffer, size_t len)
 
virtual ErrorCode write (uint8_t address, const uint8_t *buffer, size_t len, bool stop)
 
virtual ErrorCode writev (uint8_t address, WriteBuffer *buffers, size_t cnt)
 
virtual ErrorCode writev (uint8_t address, WriteBuffer *buffers, size_t cnt, bool stop)=0
 

Protected Member Functions

void i2c_scan_ ()
 

Protected Attributes

std::vector< std::pair< uint8_t, bool > > scan_results_
 
bool scan_ {false}
 

Detailed Description

Definition at line 30 of file i2c_bus.h.

Member Function Documentation

◆ i2c_scan_()

void esphome::i2c::I2CBus::i2c_scan_ ( )
inlineprotected

Definition at line 54 of file i2c_bus.h.

◆ read()

virtual ErrorCode esphome::i2c::I2CBus::read ( uint8_t  address,
uint8_t *  buffer,
size_t  len 
)
inlinevirtual

Definition at line 32 of file i2c_bus.h.

◆ readv()

virtual ErrorCode esphome::i2c::I2CBus::readv ( uint8_t  address,
ReadBuffer buffers,
size_t  cnt 
)
pure virtual

◆ write() [1/2]

virtual ErrorCode esphome::i2c::I2CBus::write ( uint8_t  address,
const uint8_t *  buffer,
size_t  len 
)
inlinevirtual

Definition at line 39 of file i2c_bus.h.

◆ write() [2/2]

virtual ErrorCode esphome::i2c::I2CBus::write ( uint8_t  address,
const uint8_t *  buffer,
size_t  len,
bool  stop 
)
inlinevirtual

Definition at line 42 of file i2c_bus.h.

◆ writev() [1/2]

virtual ErrorCode esphome::i2c::I2CBus::writev ( uint8_t  address,
WriteBuffer buffers,
size_t  cnt 
)
inlinevirtual

Definition at line 48 of file i2c_bus.h.

◆ writev() [2/2]

virtual ErrorCode esphome::i2c::I2CBus::writev ( uint8_t  address,
WriteBuffer buffers,
size_t  cnt,
bool  stop 
)
pure virtual

Field Documentation

◆ scan_

bool esphome::i2c::I2CBus::scan_ {false}
protected

Definition at line 65 of file i2c_bus.h.

◆ scan_results_

std::vector<std::pair<uint8_t, bool> > esphome::i2c::I2CBus::scan_results_
protected

Definition at line 64 of file i2c_bus.h.


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