ESPHome
2024.12.2
|
Data Structures | |
class | WeikaiComponentI2C |
The WeikaiComponentI2C class stores the information to the WeiKai component connected through an I2C bus. More... | |
class | WeikaiRegisterI2C |
WeikaiRegisterI2C objects acts as proxies to access remote register through an I2C Bus. More... | |
Enumerations | |
enum | RegType { REG = 0, FIFO = 1 } |
Functions | |
void | print_buffer (const uint8_t *data, size_t length) |
Display a buffer in hexadecimal format (32 hex values / line). More... | |
const char * | reg_to_str (int reg, bool page1) |
uint8_t | i2c_address (uint8_t base_address, uint8_t channel, RegType fifo) |
Computes the I²C bus's address used to access the component. More... | |
Enumerator | |
---|---|
REG | |
FIFO |
Definition at line 44 of file weikai_i2c.cpp.
|
inline |
Computes the I²C bus's address used to access the component.
base_address | the base address of the component - set by the A1 A0 pins |
channel | (0-3) the UART channel |
fifo | (0-1) 0 = access to internal register, 1 = direct access to fifo |
Definition at line 51 of file weikai_i2c.cpp.
void esphome::weikai_i2c::print_buffer | ( | const uint8_t * | data, |
size_t | length | ||
) |
Display a buffer in hexadecimal format (32 hex values / line).
Definition at line 13 of file weikai_i2c.cpp.
const char* esphome::weikai_i2c::reg_to_str | ( | int | reg, |
bool | page1 | ||
) |
Definition at line 35 of file weikai_i2c.cpp.