|
Hi Doug McClean,
In your previous post, you had used the API as follows:
status = I2C_MasterReadBuf(slaveAddress, &result, sizeof(uint16), I2C_MODE_REPEAT_START | I2C_MODE_COMPLETE_XFER);
The macro definition for
1) I2C_MODE_REPEAT_START = 0x01
2) I2C_MODE_COMPLETE_XFER = 0x00
3) I2C_MODE_NO_STOP = 0x02.
Hence, it is the 2 least significant bits which determine whether STOP is generated and REPEAT START is issued.
When LSB is set (1), REPEAT START is sent, else START is sent.
When last but one LSB is set (1), STOP is not generated. Else, STOP is generated.
Hence, ORing with I2C_MODE_COMPLETE_XFER is not really necessary as it is equivalent to ORing with 0x00.
|