ESPHome
2024.10.2
|
Class for I2CDevice used to communicate with the Humidity sensor on the chip. More...
#include <ms8607.h>
Public Member Functions | |
uint8_t | get_address () |
Public Member Functions inherited from esphome::i2c::I2CDevice | |
I2CDevice ()=default | |
we use the C++ default constructor More... | |
void | set_i2c_address (uint8_t address) |
We store the address of the device on the bus. More... | |
void | set_i2c_bus (I2CBus *bus) |
we store the pointer to the I2CBus to use More... | |
I2CRegister | reg (uint8_t a_register) |
calls the I2CRegister constructor More... | |
I2CRegister16 | reg16 (uint16_t a_register) |
calls the I2CRegister16 constructor More... | |
ErrorCode | read (uint8_t *data, size_t len) |
reads an array of bytes from the device using an I2CBus More... | |
ErrorCode | read_register (uint8_t a_register, uint8_t *data, size_t len, bool stop=true) |
reads an array of bytes from a specific register in the I²C device More... | |
ErrorCode | read_register16 (uint16_t a_register, uint8_t *data, size_t len, bool stop=true) |
reads an array of bytes from a specific register in the I²C device More... | |
ErrorCode | write (const uint8_t *data, size_t len, bool stop=true) |
writes an array of bytes to a device using an I2CBus More... | |
ErrorCode | write_register (uint8_t a_register, const uint8_t *data, size_t len, bool stop=true) |
writes an array of bytes to a specific register in the I²C device More... | |
ErrorCode | write_register16 (uint16_t a_register, const uint8_t *data, size_t len, bool stop=true) |
write an array of bytes to a specific register in the I²C device More... | |
bool | read_bytes (uint8_t a_register, uint8_t *data, uint8_t len) |
Compat APIs All methods below have been added for compatibility reasons. More... | |
bool | read_bytes_raw (uint8_t *data, uint8_t len) |
template<size_t N> | |
optional< std::array< uint8_t, N > > | read_bytes (uint8_t a_register) |
template<size_t N> | |
optional< std::array< uint8_t, N > > | read_bytes_raw () |
bool | read_bytes_16 (uint8_t a_register, uint16_t *data, uint8_t len) |
bool | read_byte (uint8_t a_register, uint8_t *data, bool stop=true) |
optional< uint8_t > | read_byte (uint8_t a_register) |
bool | read_byte_16 (uint8_t a_register, uint16_t *data) |
bool | write_bytes (uint8_t a_register, const uint8_t *data, uint8_t len, bool stop=true) |
bool | write_bytes (uint8_t a_register, const std::vector< uint8_t > &data) |
template<size_t N> | |
bool | write_bytes (uint8_t a_register, const std::array< uint8_t, N > &data) |
bool | write_bytes_16 (uint8_t a_register, const uint16_t *data, uint8_t len) |
bool | write_byte (uint8_t a_register, uint8_t data, bool stop=true) |
bool | write_byte_16 (uint8_t a_register, uint16_t data) |
Additional Inherited Members | |
Protected Attributes inherited from esphome::i2c::I2CDevice | |
uint8_t | address_ {0x00} |
store the address of the device on the bus More... | |
I2CBus * | bus_ {nullptr} |
pointer to I2CBus instance More... | |
Class for I2CDevice used to communicate with the Humidity sensor on the chip.
See MS8607Component instead
|
inline |