[Top][All Lists]

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

Re: [avr-chat] ?Optimized eeprom?

From: Bob Paddock
Subject: Re: [avr-chat] ?Optimized eeprom?
Date: Fri, 16 Jun 2006 09:56:15 -0400
User-agent: Opera M2/8.54 (Win32, build 7730)

The only reliable, repeatable and maintainable (i.e., without manually
specifying each address) way to get consistent addresses is to put all your eeprom data into a single struct. It's best to make sure that any padding involved is explicit (using the "-wpadded" warning).

Use offsetof() in stddef.h:

"Almost never used, the offsetof() macro can actually be a helpful addition to your bag of tricks. Here are a couple of places in embedded systems where the macro is indispensable?packing data
structures and describing how EEPROM data are stored."


"Learn a new trick with the offsetof() macro":


"Data formats change over time. To make upgrades easier,
track these changes with version numbers.":

reply via email to

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