[En-Nut-Discussion] Problem with write eeprom

Stoffel Armin armin at townux.ch
Sun Jan 1 18:18:36 CET 2006


I must store 200byte into the EEPROM. (need the data also after a power 
failure)
I programmed a function ConfigSaveString.
Where is the address range which I can use?
Is my Function ConfigSaveString correct?


Programm:

ConfigSaveString(???,"255.255.255.224");

int ConfigSaveString(int addr, u_char * str)
{
    int rc = 0;
    do {
        if (eeprom_read_byte((void *) (addr + rc)) != *str)
            eeprom_write_byte((void *) (addr + rc), *str);
        rc++;
    } while (*str++);

    return rc;
}




More information about the En-Nut-Discussion mailing list