Unions and flash access
I am wishing to write two floating point values to flash memory at time. I understand it is best to write 64 bits at a time, hence my writing two floats at once.
This question is about using a union to structure the data. This code won't compile for the STM32L412KB. Could someone please show me where I am going wrong? error on line 17. Thanks.
struct dual {
float v1;
float v2;
};
struct dual two_readings = {1.23, 4.56};
union gemini
{
struct dual left;
uint64_t right;
};
union gemini value;
value.right=0;
