[En-Nut-Discussion] Problem with write eeprom

gpenzo gpenzo at wanadoo.nl
Sun Jan 1 20:44:38 CET 2006


Stoffel Armin wrote:

> 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;
> }
>
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>
>
>
Hello armin, check the manual there it says how many bytes is used for 
config data like mac, ip number ect.
after that you can use the whole eeprom




More information about the En-Nut-Discussion mailing list