avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] EEprom variable ordering


From: Björn Haase
Subject: [avr-gcc-list] EEprom variable ordering
Date: Tue, 6 Sep 2005 19:18:21 +0200
User-agent: KMail/1.7.1

The best solution for your problem is IMO:

1.) define a struct
typedef struct { int my_var1 ... other variables ... } my_struct_t;
2.) declare it for all files
extern my_struct_t my_eeprom_vars EEMEM; 
// EEMEM define available starting with recent 2.1.15
3.) define it in one file
my_struct_t my_eeprom_vars;
// EEMEM define available starting with recent 2.1.15

get the individual eeprom adresses by using, e.g., &my_eeprom_vars.my_var1;
I'd like to recommend you to use avr-libc 1.2.15 .

HTH,

Bjoern




reply via email to

[Prev in Thread] Current Thread [Next in Thread]