Commit graph

8468 commits

Author SHA1 Message Date
François Revol f63aada8b6 ctk-curses: make sure gcc finds ncurses headers on cygwin
They are located in /usr/include/ncurses
2013-03-30 18:11:17 +01:00
François Revol 45662ac1ef ctk-curses: add some comments for clarity 2013-03-30 17:57:01 +01:00
Oliver Schmidt f1f777e162 Merge pull request #185 from g-oikonomou/bug-fixes/cmd-handler-fix
Fix a mismatch between declaration and definition
2013-03-28 15:11:59 -07:00
Rémy Léone e6bd4f1dde Rename to md 2013-03-26 23:15:37 +01:00
Rémy Léone 7b40a568a6 Update to markdown
- Spellchecking
- Update plain text to github markdown
2013-03-26 16:55:19 +01:00
François Revol 9372a153dd win32: Prefix color names with CTK_
For consistency with ctk-curses, prefix CTK colors with CTK_.

Also introduce COLOR_BG to make it easier to change the widgets
background at once.
2013-03-26 11:51:58 +01:00
François Revol 5350f36d19 ctk-curses: Revert "ctk-curses: fix build"
This reverts commit 9ffaa96475.

Since we do not include curses.h anymore there shouldn't be any name clash.
2013-03-26 11:40:32 +01:00
François Revol ada305a3be ctk-curses: Introduce CTK-specific color names
Since ncurses also defines COLOR_BLACK and friends, and we want
to avoid including curses.h in contiki-conf.h, define CTK_COLOR_*
constants and map them to curses colors in ctk-curses.c.
2013-03-26 11:37:10 +01:00
François Revol 56f11e7524 ctk-curses: C89
At least Haiku still uses gcc2 by default.
2013-03-26 08:51:37 +01:00
François Revol 54199d7121 ctk-curses: add CURSES_LIB to TARGET_LIBFILES, not LDFLAGS
It seems TARGET_LIBFILES is used at the end of the link command,
unlike LDFLAGS, which should help when only a static curses lib is
available, like on Haiku.
2013-03-26 08:10:59 +01:00
Nicolas Tsiftes f8edbbb8d2 Merge pull request #178 from adamdunkels/feature-contiki-default-conf
A first stab at a default configuration system
2013-03-25 20:13:15 -07:00
François Revol 2bb9ced3d6 ctk-curses: Guard ncurses-specific mouse function calls
The mouse support is ncurses-specific so guard it with proper #ifdef.
2013-03-26 02:01:28 +01:00
François Revol 86cb1769f6 ctk-curses: Remove extra mouse events pumping loop
It was added to avoid getting garbage keyboard input in some cases,
however it seems not to happen very often and might be the cause
of hang in OSX. If garbage input happens again we can always try
to pump a single event each time instead of looping anyway.
2013-03-26 01:49:05 +01:00
François Revol 343a7643b7 ctk-curses: Introduce CURSES_LIB makefile variable
This should allow overriding it depending on $(HOST_OS).
2013-03-26 01:12:09 +01:00
George Oikonomou a82746e72a Fix a mismatch between declaration and definition 2013-03-23 15:07:47 +00:00
George Oikonomou db078cf7e8 Replace reads of rimestats with RIMESTATS_GET(x) 2013-03-20 21:14:35 +00:00
George Oikonomou 8c0cf50dca Rename RIMESTATS_CONF_ON to RIMESTATS_CONF_ENABLED 2013-03-20 21:14:34 +00:00
George Oikonomou 62366813b0 Provide a macro to read rimestats when enabled 2013-03-20 21:14:34 +00:00
George Oikonomou 12860ce5d4 Fix #183 (short term fix)
This is a temporary fix for #183, so that things can
build cleanly until the issue is fixed properly.

If RIMESTATS_CONF_ENABLED is 0, rimestats.foo will always
read as 0, since RIMESTATS_ADD(foo) doesn't do anything
2013-03-20 19:59:20 +00:00
Robert Quattlebaum ed2dd29eda core/lib/settings: Added SETTINGS_CONF_SKIP_CONVENIENCE_FUNCS.
Unfortunately, some platforms don't properly drop unreferenced functions,
so on these broken platforms we can save a significant amount
of space by skipping the definition of the convenience functions.
2013-03-20 11:57:13 -07: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
François Revol b7601c3acb ctk-curses: Cleanup 2013-03-20 17:16:37 +01:00
Oliver Schmidt 6ba28bf74f Merge pull request #180 from mmuman/cleanup-and-fixes
Cleanup and fixes
2013-03-20 02:37:24 -07:00
François Revol 1ce1232d0f ctk-curses: Add configuration for various apps 2013-03-20 02:01:05 +01:00
François Revol 06d3c14213 ctk-curses: Enable screensaver 2013-03-20 02:01:05 +01:00
François Revol 9ffaa96475 ctk-curses: fix build
Including curses.h in contiki-conf.h (required for COLOR_* defines)
induced a symbol name clash with neighbor-attr.c on "timeout".

Renamed timeout to neighbor_timeout.
2013-03-20 02:01:05 +01:00
François Revol 1c5d6a9db7 ctk-curses: Cleanup + fixes
* Cleanup
* Fix warnings
* Fix indentation
* Only wait 1ms for keyboard timeout
* Hide text cursor
* Pump mouse events just in case
* Add F9 as menu key since F10 is used as menu trigger by Gnome
2013-03-20 02:00:32 +01:00
François Revol db982f7b82 ctk-curses: Add mouse support to the ncurses CTK backend. 2013-03-20 01:35:42 +01:00
François Revol 25e3f828aa Ncurses-based CTK backend for the native platform. 2013-03-20 01:35:01 +01:00
Nicolas Tsiftes 8c25ed20d9 Merge pull request #175 from adamdunkels/feature-updated-stm32w
Cleanup and refactorization of the STM32w port
2013-03-19 15:30:31 -07:00
François Revol 3d33248eff native: Fix trailing whitespace 2013-03-19 20:00:26 +01:00
François Revol 22bcb07c61 tapdev: Log to stderr; add tracing
Use stderr for logging to avoid polluting stdout.
Add some DEBUG tracing.
2013-03-19 19:41:20 +01:00
François Revol 877b059bc7 native: Use stderr for logging
Since we will hopefully one day use stdout as a CTK display,
use stderr instead for log output, which can be redirected to a file.
2013-03-19 19:24:59 +01:00
François Revol ba541fd510 shell: Fix GUI build
* Fix shell_exit() signature, it's called without any argument.
2013-03-19 19:23:08 +01:00
Nicolas Tsiftes 199a89bac4 Merge pull request #173 from adamdunkels/feature-ipv6-not-in-makefile
Allow IPv6 to be compiled via #define
2013-03-19 08:17:52 -07:00
Nicolas Tsiftes 7f2a842b71 Merge pull request #174 from adamdunkels/feature-net-improvements
Improvements to the core/net/ code
2013-03-18 17:12:12 -07:00
Nicolas Tsiftes 6a07172662 Merge pull request #176 from adamdunkels/feature-net-bugfixes
Network system bugfixes
2013-03-18 13:38:44 -07:00
Nicolas Tsiftes adf401bbad Merge pull request #172 from adamdunkels/feature-split-collect-regression-test
Regression tests: split the collect test into two, moved armgcc download location
2013-03-18 09:22:07 -07:00
Adam Dunkels 7742b05d8c Major bugfix: when nullrdc is asked to send a list of packets, send the list of packets and not just the first packet - this is essential for retransmissions of fragmented IP packets to work 2013-03-18 13:35:29 +01:00
Adam Dunkels a5046e83c7 Cleanup and refactoring of the STM32w port
This is a general cleanup of things like code style issues and code structure of the STM32w port to make it more like the rest of Contiki is structured.
2013-03-18 13:31:26 +01:00
Adam Dunkels f81e4071f1 Merge pull request #135 from darconeous/pull-requests/core-net-bridge-mode
core/net: Added support for "bridge mode".
2013-03-18 04:43:15 -07:00
Adam Dunkels ad28f1b396 Merge pull request #75 from cmorty/mesh_ready
Add mesh_ready() to mesh
2013-03-18 04:42:43 -07:00
Adam Dunkels 2ba293a538 Bugfix: check the size of the outgoing packet to avoid overflowing the output buffer 2013-03-18 11:22:08 +01:00
Adam Dunkels 843d2361dc Include the rimestats variable only if rimestats are enabled by the configuration 2013-03-18 11:22:06 +01:00
Adam Dunkels 4efd570cf9 Minor bugfix: explicitly cast pointer argument in debug printf 2013-03-18 11:22:05 +01:00
Adam Dunkels f2fbb4b49d Defensive programming: make sure that we don't fail completely if we get a callback for a NULL pointer 2013-03-18 11:22:04 +01:00
Adam Dunkels 82b755c017 Bugfix: keep track of receiver being awake as a local variable rather than a global, as it may have changed between invokations 2013-03-18 11:22:02 +01:00
Adam Dunkels 0670a8e1e2 Minor code style fixes to the contikimac and nullrdc code 2013-03-18 11:22:01 +01:00
Adam Dunkels ef25cc6c58 Rimestats bugfix: only compile the rimestats printout if rimestats are enabled 2013-03-18 11:22:00 +01:00
Adam Dunkels 3efa84ecc8 New mechanism for computing the 6lowpan header length dynamically, depending on how large header the framer creates. Also check the incoming packet for buffer overflow. 2013-03-18 11:19:22 +01:00