Download CM7000 Series - Digi International

Transcript
Library Routines
The following library routines can be used to read and write the EEPROM:
int ee_rd( int address );
int ee_wr( int address, byte data );
The function ee_rd returns a data value or, if a hardware failure occurred,
–1. The function ee_wr returns –1 if a hardware failure occurred, –2 if an
attempt was made to write to the upper 256 bytes with the write-protect
trace cut (enabled), or 0 to indicate a successful write. A write-protection
violation does not wear out the EEPROM. These routines each require
about 2 ms to execute. They are not re-entrant, that is, only one routine at a
time will run.
!
CM7000
The EEPROM has a rated lifetime of only 10,000 writes
(unlimited reads). Do not write the EEPROM from within a
loop. The EEPROM should be written to only in response to a
human request for each write.
EEPROM s 103