Posted by t on 1/3/2002, 9:05 am struct eeprom_layout { Then declare the variable as const and giving values The data will be created in the C section as is normal for const data. If you declare the variable as a local within a function also add static before const. If this is not done a copy of the data will be created on the stack each time the function runs.
First you define the struct type
unsigned char uc1;
unsigned char uc2;
unsigned short checksum;
};
const struct eeprom_layout gEEPROMDefaults = {
0,
80,
0xFFFF /* checksum */
};
Message Thread:
![]()
« Back to thread