osd-contiki/platform/avr-raven
Robert Quattlebaum 28a1e40ebd core/lib/settings: Generalized Settings Manager to work on any platform
This commit moves the Settings Manager from the AVR codebase
into the Contiki core library. Any platform that implements
the Contiki EEPROM API can now use the Settings Manager's
key-value store for storing their persistent configuration info.

The Settings Manager is a EEPROM-based key-value store. Keys
are 16-bit integers and values may be up to 16,383 bytes long.
It is intended to be used to store configuration-related information,
like network settings, radio channels, etc.

 * Robust data format which requires no initialization.
 * Supports multiple values with the same key.
 * Data can be appended without erasing EEPROM.
 * Max size of settings data can be easily increased in the future,
   as long as it doesn't overlap with application data.

The format was inspired by the [OLPC manufacturing data format][].

Since the beginning of EEPROM often contains application-specific
information, the best place to store settings is at the end of EEPROM
(the "top"). Because we are starting at the end of EEPROM, it makes
sense to grow the list of key-value pairs downward, toward the start of
EEPROM.

Each key-value pair is stored in memory in the following format:

Order    | Size     | Name         | Description
--------:|---------:|--------------|-------------------------------
       0 |        2 | `key`        | 16-bit key
      -2 |        1 | `size_check` | One's-complement of next byte
      -3 |   1 or 2 | `size`       | The size of `value`, in bytes
-4 or -5 | variable | `value`      | Value associated with `key`

The end of the key-value pairs is denoted by the first invalid entry.
An invalid entry has any of the following attributes:

 * The `size_check` byte doesn't match the one's compliment of the
   `size` byte (or `size_low` byte).
 * The key has a value of 0x0000.

[OLPC manufacturing data format]: http://wiki.laptop.org/go/Manufacturing_data
2013-03-20 11:57:13 -07:00
..
apps Updated to the latest uip-ds6-route API 2012-11-27 23:04:34 +01:00
button-sensor.c Add files needed for slip rpl-border-router build. 2011-03-11 14:16:27 -05:00
cfs-coffee-arch.c Fix unused variable warning 2011-03-10 10:37:15 -05:00
cfs-coffee-arch.h avrdude and makefile changes suggested by Georg von Zengen 2011-03-08 13:07:00 -05:00
contiki-conf.h core/lib/settings: Generalized Settings Manager to work on any platform 2013-03-20 11:57:13 -07:00
contiki-raven-default-init-lowlevel.c example\webserver-ipv6-raven works! 2008-10-14 21:29:23 +00:00
contiki-raven-default-init-net.c example\webserver-ipv6-raven works! 2008-10-14 21:29:23 +00:00
contiki-raven-main.c Updated to the latest uip-ds6-route API 2012-11-27 23:04:34 +01:00
contiki-raven.h Renamed serial module to serial-line 2009-03-17 20:19:11 +00:00
loadable_prg.c Contiki port for the Atmel AVR Raven board 2008-10-14 09:40:30 +00:00
Makefile.avr-raven Add params.c to Raven and sync with 128rfa1 contiki-conf.h 2011-11-14 11:56:34 -05:00
params.c PROGMEM changes needed for newer avr-gcc compiler 2012-02-21 11:10:57 -05:00
params.h Add F_CPU=0x800000 option with phase lock to external 32768 Hz crystal 2012-01-10 12:42:27 -05:00
raven-lcd.h Implement SLEEP and DOZE commands from the 3290p menu. 2010-12-18 20:40:45 +00:00
slip_uart0.c Add files needed for slip rpl-border-router build. 2011-03-11 14:16:27 -05:00