@sterretje, it's not about copying the struct as a whole but being able to dump a 14 bytes array of raw data in and read it back as separate variables.
I think oqibidipo nailed it, forgot you could do that. And Whandall as well although I would have never thought the compiler would allow me to me an array with size 0
But now I think about it, you could also treat it as a uint8_t array. Skip the union (and make controller only the struct) and do ((uint8_t*)&controller)[8] = 33. But I think the solutions of oqibidipo and Whandall are far prettier
septillion: @sterretje, it's not about copying the struct as a whole but being able to dump a 14 bytes array of raw data in and read it back as separate variables.
I still don't get it. Make S1 an array of bytes and use memcpy. Or if this is e.g. a serial read, cast S2 to a byte pointer and read the data into the successive locations.