Commit graph

47 commits

Author SHA1 Message Date
Robert Quattlebaum 0308d3fcf0 settings: Correct a problem where sometimes CC_INLINE is not defined properly. 2013-07-02 08:46:03 -07:00
Mariano Alvira 5df586e09d Merge pull request #184 from g-oikonomou/bug-fixes/rimestats
Rimestats Fix (#183)
2013-05-19 07:45:22 -07:00
Robert Quattlebaum 535e90343c Merge pull request #144 from darconeous/pull-requests/settings-for-all-targets
core/lib/settings: Generalized settings manager to work on any platform
2013-05-18 12:03:09 -07:00
George Oikonomou 8c0cf50dca Rename RIMESTATS_CONF_ON to RIMESTATS_CONF_ENABLED 2013-03-20 21:14:34 +00:00
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
Adam Dunkels 277a348f60 Changed the name of the IPv6 number of route entries configuration from UIP_CONF_DS6_ROUTE_NBU to UIP_CONF_MAX_ROUTES. 2013-03-18 11:12:44 +01:00
Ivan Delamer b43dad00b0 Cleaned up RF230BB, and refactored FRAME_RETRIES and CSMA_RETRIES
#defines.
2012-09-04 11:12:18 -06:00
David Kopf cac4e9a222 Add clock_delay_us and clock_set_seconds to clock.h. Modify clock_wait to use clock_time_t.
Remove the troublesome avr/dev/delay.* files.
Add PLATFORM_NAME and combine the confusing *_REVISION defines into a single PLATFORM_TYPE
2012-04-09 15:49:53 -04:00
Nicholas J Humfrey 680225e99d Converted u8_t to uint8_t and u16_t to uint16_t in the platforms directory.
Added "These names are deprecated, use C99 names" warnings the contiki-conf.h files that were missing it.
2012-02-21 08:33:25 -05:00
David Kopf 58298f59db Add F_CPU=0x800000 option with phase lock to external 32768 Hz crystal
Add MCU_CONF_LOW_WEAR option to avoid eeprom writes during development.
2012-01-10 12:42:27 -05:00
David Kopf 3612fdff5b Add params.c to Raven and sync with 128rfa1 contiki-conf.h
Contikimac works with mcu sleep on both platforms.
2011-11-14 11:56:34 -05:00
David Kopf d2aece89ef Add settings manager with program flash defaults, random routine, periodic prints with ENERGEST, node-id. 2011-08-28 16:22:39 -04:00
David Kopf 83e3b99d54 Let RPL examples enable platform RPL 2011-08-15 14:45:44 -04:00
David Kopf 50d1086553 Add changes needed for contikimac 2011-08-13 11:38:38 -04:00
David Kopf c9b19ce655 Change timer setups for arbitrary CLOCK_CONF_SECOND
Change raven to 128 ticks and enable 32KHz crystal as default.
2011-08-05 15:14:35 -04:00
David Kopf 0774fef827 Add explicit RADIOSTATS to platform contiki-conf.h 2011-07-25 15:12:12 -04:00
dak664 d6db9e4e86 Add project-conf.h to platform contiki-conf.h files.
Fix jackdaw comments.
2011-06-08 09:12:57 -04:00
dak664 519cce0019 Add comments, bugfixes, merge avr-atmega128rfa1 platform changes to avr-raven 2011-02-07 14:06:53 -05:00
David Kopf ceea35f7a8 Test TortoiseGit commit from Vista laptop 2011-02-04 10:41:18 -05:00
David Kopf 16df31b143 Merge branch 'master' of https://github.com/adamdunkels/contiki-2.x 2011-02-04 10:39:34 -05:00
dak664 0b23116c30 Test TortoiseGit commit from windows 7 2011-02-04 09:03:03 -05:00
David Kopf c18d12e8a4 Test git commit 2011-02-03 18:29:17 -05:00
dak664 d378d891c8 Add working cx-mac configuration values. 2010-12-18 20:46:14 +00:00
dak664 d8fe44645c Refactor, tune, add SICSLOWPAN_CONF_ACK_ALL defines for testing radio acks 2010-12-14 22:39:38 +00:00
dak664 a9dedfee4f Refactor contiki-conf files, remove obsolete defines. 2010-12-13 23:31:13 +00:00
dak664 58b7a19803 Hardware/software radio HAL patch from Roger Larsson.
Use CHANNEL_802_15_4 define for RF channel on all AVR platforms, default 26.
Remove hopefully unnecessary interrupt disable wrapper on eeprom reads and writes.
2010-12-03 20:42:01 +00:00
dak664 3d3ad9e2c2 Fixes to allow ipv4 (hello world) builds 2010-12-01 16:23:55 +00:00
dak664 880233a451 RSSI read fix (use ED register in AACK mode), add reduced power configuration for miniature mesh testing. 2010-11-24 18:46:57 +00:00
dak664 9e94ba9803 Allow non-ipv6 build, e.g. Hello World 2010-11-12 17:15:00 +00:00
dak664 abf4791db4 Add Raven RPL build option 2010-11-03 16:51:55 +00:00
dak664 f2f7c169ea Reduce RIME max time to fit in 16 bit timer 2010-08-03 20:01:21 +00:00
dak664 d3697344ec Update for NETSTACK_CONF_FRAMER 2010-03-02 16:25:47 +00:00
dak664 feb6aa0ed2 Change back to SICSLOWPAN_COMPRESSION_HC06 from SICSLOWPAN_COMPRESSION_HC01 2010-02-28 21:39:40 +00:00
dak664 39e6f6a830 Clean up, functional webserver for further testing of low power protocols 2010-02-28 21:29:19 +00:00
dak664 844b3a34f7 Platform 0 was matching by default 2010-02-26 21:15:28 +00:00
c_oflynn b5b77ac47a Use new HC06 2010-02-26 10:55:00 +00:00
dak664 e695e4860d Allow build with original radio driver using $make RF230BB=0 2010-02-23 17:43:20 +00:00
dak664 cbb8621e30 update to new driver format 2010-02-22 22:23:18 +00:00
dak664 38c5922294 experimental cxmac code 2010-02-18 17:23:19 +00:00
dak664 1da06eff83 Specify mac driver in contiki-conf.h 2010-02-16 22:22:13 +00:00
dak664 fe8417bd8a Clarify defines for RF230 and effect on program size 2010-02-09 17:03:55 +00:00
dak664 282ffaf343 Add conditional boot messages and file logging 2010-02-09 14:43:16 +00:00
dak664 1911dc4956 Defines for fragmentation handling 2010-02-08 22:09:25 +00:00
dak664 49989dbe45 Add rf230bb radio driver with conditional make on RF230BB=1 2009-07-08 15:26:17 +00:00
adamdunkels 65eb5fd4e8 Renamed the rimebuf module to packetbuf to signal that the module is used outside of a pure Rime context (e.g., the sicslowpan code uses it). 2009-03-12 21:58:20 +00:00
c_oflynn 6e42bd3496 example\webserver-ipv6-raven works! 2008-10-14 21:29:23 +00:00
adamdunkels 0a961b2ada Contiki port for the Atmel AVR Raven board 2008-10-14 09:40:30 +00:00