How to set up a command-based communication using I2C

Thanks for the hints, I will implement them.

Disagree. If I call sizeof(myStruct) then it returns 4. If I define the struct without bit field (with a uint8_t and uint32_t inside), then it returns 8 (because it is a 32-bit CPU I guess?).

But rethinking about it, It would have been better to define the payload as byte[3] array; that would be less confusing that bit fields I guess. And since it is binary data anyway, it does not matter.