I have variable uint16 value, I want to copy it to uint8_t buffer[3]. Is it possible to do (Little endian):
*buffer=*(uint8_t *)&value;
Instead of:
buffer[0] = highByte(value);
buffer[1] = lowByte(value);
Since this replacement cause stm32f7 I2C to not working correctly. Is there any correct casting?