I am creating a message structure for serial communication with another MCU.
I want to create a structure with the fields packed so that I can use an union that will allow me both field access and stream access.
this can work only if I can pack the structure without padding bytes. How does one do this with CHERTS MinGW setup?
typedef struct
{
byte fld1;
byte fld2;
} field_type;
typedef union
{
field_type fld;
byte arr[2];
} packet_type;