STC3115I2CCore::STC3115I2CCore |
( |
uint8_t |
address = 0x70 | ) |
|
Initialize STC3115 I2C driver and assign the address.
- Parameters
-
bool STC3115I2CCore::beginI2C |
( |
| ) |
|
Initialize I2C and check whether the address is available or not.
- Returns
- true
-
false
bool STC3115I2CCore::readRegister |
( |
uint8_t * |
output, |
|
|
uint8_t |
reg |
|
) |
| |
Read an unsigned byte from a register and return the read status.
- Parameters
-
output | pointer to the variable that will hold the result |
reg | register address |
- Returns
- true
-
false
bool STC3115I2CCore::readRegisterInt |
( |
int * |
output, |
|
|
uint8_t |
reg |
|
) |
| |
Read signed integer value from a register.
- Parameters
-
output | pointer to a variable that will hold the result |
reg | register address |
- Returns
- true
-
false
bool STC3115I2CCore::readRegisterInt16 |
( |
int16_t * |
output, |
|
|
uint8_t |
reg |
|
) |
| |
Read 2 bytes of data and convert it to a signed integer.
- Parameters
-
output | pointer to the variable that will hold the result |
reg | register address |
- Returns
- true
-
false
bool STC3115I2CCore::readRegisterRegion |
( |
uint8_t * |
output, |
|
|
uint8_t |
reg, |
|
|
uint8_t |
length |
|
) |
| |
Read unsigned bytes from register range.
- Parameters
-
output | array that will hold the read result |
reg | register to start reading |
length | length of the bytes |
- Returns
- true
-
false
bool STC3115I2CCore::writeRegister |
( |
uint8_t |
reg, |
|
|
uint8_t |
data |
|
) |
| |
Write unsigned byte data to a register.
- Parameters
-
reg | register address |
data | data to be written |
- Returns
- true
-
false
bool STC3115I2CCore::writeRegister |
( |
uint8_t |
reg, |
|
|
uint8_t * |
data, |
|
|
size_t |
length |
|
) |
| |
Write array of unsigned bytes to a register.
- Parameters
-
reg | register address |
data | array of unsigned bytes |
length | length of the array |
- Returns
- true
-
false
bool STC3115I2CCore::writeRegisterInt |
( |
uint8_t |
reg, |
|
|
int |
data |
|
) |
| |
Write signed integer data to a register.
- Parameters
-
reg | register address |
data | data to be written |
- Returns
- true
-
false
The documentation for this class was generated from the following files: