I.e. read from 0xFA and the next 6 bytes.
But i'm struggling to see how this can be done, this is what i've got but it does not work.
Code: Select all
static msg_t readMacAddress(void)
{
msg_t status = RDY_OK;
systime_t tmo = MS2ST(100);
i2cAcquireBus(&I2CD3);
i2c_state.txbuf[0] = 0xFA;
i2c_state.address = E2PROM_ADDR;
status = i2cMasterTransmitTimeout(&I2CD3,
i2c_state.address,
i2c_state.txbuf, 1,
i2c_state.rxbuf, 0,
tmo);
status = i2cMasterReceiveTimeout(&I2CD3,
i2c_state.address,
i2c_state.rxbuf, 6,
tmo);
i2cReleaseBus(&I2CD3);
return(status);
}