ESPHome  2024.11.1
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::weikai_i2c::WeikaiRegisterI2C Class Reference

WeikaiRegisterI2C objects acts as proxies to access remote register through an I2C Bus. More...

#include <weikai_i2c.h>

Inheritance diagram for esphome::weikai_i2c::WeikaiRegisterI2C:
esphome::weikai::WeikaiRegister

Public Member Functions

uint8_t read_reg () const override
 
void write_reg (uint8_t value) override
 
void read_fifo (uint8_t *data, size_t length) const override
 
void write_fifo (uint8_t *data, size_t length) override
 
- Public Member Functions inherited from esphome::weikai::WeikaiRegister
 WeikaiRegister (WeikaiComponent *const comp, uint8_t reg, uint8_t channel)
 WeikaiRegister constructor. More...
 
virtual ~WeikaiRegister ()
 
WeikaiRegisteroperator= (uint8_t value)
 overloads the = operator. More...
 
WeikaiRegisteroperator &= (uint8_t value)
 overloads the compound &= operator. More...
 
WeikaiRegisteroperator|= (uint8_t value)
 overloads the compound |= operator. More...
 
 operator uint8_t () const
 cast operator that returns the content of the weikai register More...
 

Protected Member Functions

 WeikaiRegisterI2C (weikai::WeikaiComponent *const comp, uint8_t reg, uint8_t channel)
 

Protected Attributes

friend WeikaiComponentI2C
 

Additional Inherited Members

- Data Fields inherited from esphome::weikai::WeikaiRegister
WeikaiComponent *const comp_
 pointer to our parent (aggregation) More...
 
uint8_t register_
 address of the register More...
 
uint8_t channel_
 channel for this register More...
 

Detailed Description

WeikaiRegisterI2C objects acts as proxies to access remote register through an I2C Bus.

Definition at line 25 of file weikai_i2c.h.

Constructor & Destructor Documentation

◆ WeikaiRegisterI2C()

esphome::weikai_i2c::WeikaiRegisterI2C::WeikaiRegisterI2C ( weikai::WeikaiComponent *const  comp,
uint8_t  reg,
uint8_t  channel 
)
inlineprotected

Definition at line 34 of file weikai_i2c.h.

Member Function Documentation

◆ read_fifo()

void esphome::weikai_i2c::WeikaiRegisterI2C::read_fifo ( uint8_t *  data,
size_t  length 
) const
overridevirtual

Implements esphome::weikai::WeikaiRegister.

Definition at line 85 of file weikai_i2c.cpp.

◆ read_reg()

uint8_t esphome::weikai_i2c::WeikaiRegisterI2C::read_reg ( ) const
overridevirtual

Implements esphome::weikai::WeikaiRegister.

Definition at line 67 of file weikai_i2c.cpp.

◆ write_fifo()

void esphome::weikai_i2c::WeikaiRegisterI2C::write_fifo ( uint8_t *  data,
size_t  length 
)
overridevirtual

Implements esphome::weikai::WeikaiRegister.

Definition at line 120 of file weikai_i2c.cpp.

◆ write_reg()

void esphome::weikai_i2c::WeikaiRegisterI2C::write_reg ( uint8_t  value)
overridevirtual

Implements esphome::weikai::WeikaiRegister.

Definition at line 104 of file weikai_i2c.cpp.

Field Documentation

◆ WeikaiComponentI2C

friend esphome::weikai_i2c::WeikaiRegisterI2C::WeikaiComponentI2C
protected

Definition at line 33 of file weikai_i2c.h.


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