ESPHome  2021.11.3
Data Structures | Enumerations | Functions
esphome::i2c Namespace Reference

Data Structures

class  ArduinoI2CBus
 
class  I2CBus
 
class  I2CDevice
 
class  I2CRegister
 
class  IDFI2CBus
 
struct  ReadBuffer
 
struct  WriteBuffer
 

Enumerations

enum  ErrorCode {
  ERROR_OK = 0, ERROR_INVALID_ARGUMENT = 1, ERROR_NOT_ACKNOWLEDGED = 2, ERROR_TIMEOUT = 3,
  ERROR_NOT_INITIALIZED = 4, ERROR_TOO_LARGE = 5, ERROR_UNKNOWN = 6
}
 
enum  RecoveryCode {
  RECOVERY_FAILED_SCL_LOW, RECOVERY_FAILED_SDA_LOW, RECOVERY_COMPLETED, RECOVERY_FAILED_SCL_LOW,
  RECOVERY_FAILED_SDA_LOW, RECOVERY_COMPLETED
}
 
enum  RecoveryCode {
  RECOVERY_FAILED_SCL_LOW, RECOVERY_FAILED_SDA_LOW, RECOVERY_COMPLETED, RECOVERY_FAILED_SCL_LOW,
  RECOVERY_FAILED_SDA_LOW, RECOVERY_COMPLETED
}
 

Functions

uint16_t i2ctohs (uint16_t i2cshort)
 
uint16_t htoi2cs (uint16_t hostshort)
 

Enumeration Type Documentation

◆ ErrorCode

Enumerator
ERROR_OK 
ERROR_INVALID_ARGUMENT 
ERROR_NOT_ACKNOWLEDGED 
ERROR_TIMEOUT 
ERROR_NOT_INITIALIZED 
ERROR_TOO_LARGE 
ERROR_UNKNOWN 

Definition at line 8 of file i2c_bus.h.

◆ RecoveryCode [1/2]

Enumerator
RECOVERY_FAILED_SCL_LOW 
RECOVERY_FAILED_SDA_LOW 
RECOVERY_COMPLETED 
RECOVERY_FAILED_SCL_LOW 
RECOVERY_FAILED_SDA_LOW 
RECOVERY_COMPLETED 

Definition at line 12 of file i2c_bus_esp_idf.h.

◆ RecoveryCode [2/2]

Enumerator
RECOVERY_FAILED_SCL_LOW 
RECOVERY_FAILED_SDA_LOW 
RECOVERY_COMPLETED 
RECOVERY_FAILED_SCL_LOW 
RECOVERY_FAILED_SDA_LOW 
RECOVERY_COMPLETED 

Definition at line 12 of file i2c_bus_arduino.h.

Function Documentation

◆ htoi2cs()

uint16_t esphome::i2c::htoi2cs ( uint16_t  hostshort)
inline

Definition at line 37 of file i2c.h.

◆ i2ctohs()

uint16_t esphome::i2c::i2ctohs ( uint16_t  i2cshort)
inline

Definition at line 36 of file i2c.h.