[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] eeprom_rb strangeness??
From: |
Theodore A. Roth |
Subject: |
Re: [avr-libc-dev] eeprom_rb strangeness?? |
Date: |
Fri, 1 Nov 2002 14:26:06 -0800 (PST) |
On Fri, 1 Nov 2002, Joerg Wunsch wrote:
:) > void eeprom_ww (uint16_t *addr, uint16_t val);
:) > void eeprom_write_block (void *to_addr, void *from_buf, size_t n);
:)
:) I guess the reason why they are not implemented is that it can
:) cost you a lot of time you end up in waiting for the EEPROM cell
:) to become ready. I agree that they should be implemented anyway,
:) but the documentation should stress that issue a bit so people
:) aren't caught in surprise when they discover that writing a block
:) might take several milliseconds (which is close to an infinite
:) wait given the good processing speed of the AVR ;-).
Ok. I'll add a note about that.
Another potential gotcha is corruption of eeprom data if the write is
interrupted (power glitch, etc.). I'll be sure to re-read the eeprom
datasheet again before I implement.
:)
:) Anyone who wants to have it better needs to implement an
:) interrupt-driven API, but that's beyond what avr-libc can do for
:) them.
True.
:)
:) Eric wrote:
:)
:) > For readability it would be nice to have
:) >
:) > eeprom_read_byte
:) > eeprom_write_byte
:) > eeprom_read_word
:) > eeprom_write_word
:) > eeprom_read_block
:) > eeprom_write_block
:)
:) I have to agree.
My reply to this hasn't made it to the list. I agree too. Will reimplement
the old interfaces in terms of the new and deprecate the old.
Ted Roth