Hi all,
This question is slightly off topic but is still flat c but used on microcontrollers.
Im just trying to write a structure to eeprom and im unsure of the c syntax. I can write data to a single address fine, but i now want to write a structure but am getting lost. Please could you offer me some advice. In the instance below the varibles already have the data added and now i need to write and read from eeprom. Below is my example:
Thanks for your input in advance.
Regards,
Rocketman
Code:
/******************************
Function: EEPROM structure
*******************************/
struct
{
char one;
char two;
char three;
}Memory_Block
/******************************
Function: EEPROM write
*******************************/
Write_EEPROM(&Memory_Block, sizeof(Memory_Block)); // (address, data)
/******************************
Function: EEPROM read
*******************************/
void EEPROM_Startup_Routine(void)
{
Read_EEPROM(&Memory_Block); // (address)
}