TIDUF20B December 2022 – July 2025
Read the register address of the I2C peripheral device.
void I2C_ReadReg(uint8_t reg_addr, uint8_t *reg_data, uint8_t count);
| reg_addr | I2C peripheral register address of the device |
| *reg_data | pointer to the data to be read from I2C |
| count | Length of reg_data |
Void.
This API start a I2C write first to send the I2C peripheral device register address to be read then start a I2C read operation.
The user can change the I2C peripheral device address by modifying the global variable I2C_TARGET_ADDRESS.