SLUUBD4A April 2016 – November 2022 BQ27220
The read and compare command is formatted identically to the write command. The data presented with this command matches the data read exactly, or the operation should cease with an error indication to the user. The ot.fs file contains no information about program flow or decision making. If a read and compare command results in data which does not match the expected values then the interpreting program needs to handle the next step itself. It should not continue with further commands, but would typically go back to the beginning of the ot.fs file and try again several times before giving up.
The format of this sequence is:
"C: i2cAddr RegAddr Byte0 Byte1 Byte2"
An example of this command is as follows:
C: AA 55 AB CD EF 00
This example expects the master to read back 4 bytes from the register address 0x55 of the device addressed at 0xAA and then compare the data to the values given on the line command in this same order as 0xAB, 0xCD, 0xEF, and 0x00.