What I am trying to do is initialize the struct with a large about of hex data stored in a separate part of the device's memory, eventually this data will be written to memory through other means but for now I want to manually initialize the struct to use in my project.
The project I am working on has the following lines of code (that compile in Atmel studio).
typedef struct configData_t
{
uint8_t version[4]; // ASCII
uint8_t numIn;
uint8_t numOut;
uint8_t numKey;
uint8_t numTest;
uint8_t numAuto;
controlModuleConfig_t homeConfig;
inputModuleConfig_t inConfig [MAX_IN];
outputModuleConfig_t outConfig [MAX_OUTPUT];
keypadModuleConfig_t keyConfig [MAX_KEY];
notificationConfig_t testConfig [MAX_TEST];
autoFunctionConfig_t autoConfig [MAX_AUTO];
precheckConfig_t precheckConfig;
sleepConfig_t sleepConfig;
uint16_t audioCrc16;
uint16_t configCrc16;
}
configData_t;
const __attribute__((__section__(".application_footer_data")))
configData_t theConfigData = { { '?', '?', '?', '?' } };
__attribute__ ((section(".application_footer_data")))
const unsigned char configBuffer[28672] = { /* Lots of data e.g. 0x31, 0x30, 0x33,...*/}
I have not seen a struct initialized this way before, how is theConfigData struct being initialized with the { { '?', '?', '?', '?' } }
statement?