[Top][All Lists]

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

[avr-libc-dev] writing EEPROM

From: Artur Lipowski
Subject: [avr-libc-dev] writing EEPROM
Date: Fri, 23 May 2003 12:36:37 +0200

>From time to time people ask how to write word or data block to EEPROM.

After some experiments I found (maybe I reinvent wheel 8-) that there is no
real need for separate selfstanding functions like eeprom_write_block and
Using inline functions (based on eeprom_write_byte) desired funcionality can
be achieved without problems and code overhead associated with inlining is
not significant (if any).
Each "call" to inline version of eeprom_write_word takes extra 6 words and
to eeprom_write_block takes extra 12 words (comparing to call of "normal"
Assuming that eeprom_write_byte still is used in program, it looks that
inlines are quite sufficient and effective solution.

In this case there is no speed issues because most of the time is spent in
waiting loop(s) (checking for EEWE bit).

Is it worth to add such inlines to the eeprom.h?
Is it worth to add such kind of explanation to the FAQ?

Artur Lipowski

Attachment: eeprom_write.h
Description: Binary data

reply via email to

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