Question
I2C - Adding a registry & value.
Hi, I want to try sending data to a slave consisting of several registries and have seen code example:-
uint8_t buf[2];
buf[0] = register_addr;
buf[1] = data;
HAL_I2C_Mem_Write(ftHandle, slaveAddr, buf, 2, timeout);
Would this work in practice? As it is merging 2x8 bit integers together in 1 packet? I like the idea of creating a data array to send via serial makes things so much simpler!