Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PMICDRV-184: Change what data is sent to pFnPmicCommIo{Rx,Wr}
The prior implementation of `Pmic_io{Tx,Rx\}Byte()` passed the entire I2C buffer that is used to calculate the I2C CRC into the user provided functions `pFnPmicCommIo{Rd,Wr}()`; Generally I2C driver functions are either designed so that they expect to receive register subaddress and then data as two separate parameters, or designed so that they don't have knowledge of subaddresses and the user embeds those in the single 'data' parameter. I'm not aware of any I2C APIs which expect to receive the device address as part of the data packet to be transmitted. The updated implementation provides all necessary components as separate arguments: - I2C device address -> handle->slaveAddress - Register subaddress -> uint16_t regAddr parameter - Data packet -> uint8_t *{rx,tx}Data parameter Signed-off-by: Michael Leonard <[email protected]>
- Loading branch information