Commit Graph

215 Commits

Author SHA1 Message Date
Enrico Joerns
85b494c16b [doc] Give files a common structure by placing license first (partial)
Followed by doxyen file and group tags.
This patch is only a first attempt to make provide a clean structure,
many more files require rework, too.
2014-11-10 23:54:49 +01:00
Mariano Alvira
e803a654b4 Merge pull request #684 from SmallLars/2nd-button
Enabled 2nd button on platform econotag
2014-10-08 14:05:24 -05:00
Adam Dunkels
def57199b9 Merge pull request #511 from ADVANSEE/leds
leds: Fixes and enhancements
2014-06-11 22:37:34 +02:00
Adam Dunkels
64f65b4e45 Merge pull request #617 from nfi/extended-radio-api
Extended radio API with support for setting channel, pan id, addressing modes, etc
2014-06-03 21:32:53 +02:00
Rémy Léone
25c8b0835d Closing doxygen groups 2014-05-30 11:01:20 +02:00
Lars Schmertmann
50481722a8 Enabled 2nd button on platform econotag 2014-05-23 11:50:12 +02:00
Brad Campbell
a96dc90250 [SPI] Make SPI_FLUSH() more versatile
Currently the SPI driver in core/ sets `SPI_FLUSH()` to be a single read
of the spi RX buffer. This is fine for many microcontrollers, but newer
platforms like the CC2538 have a multi-byte FIFO for the RX buffer. In
that case, a single read is not guaranteed to flush the RX. This commit
allows `SPI_FLUSH()` to be platform dependent if needed, but doesn't
change for platforms where it works.
2014-04-15 14:04:42 -04:00
Niclas Finne
8ea9cb7693 Split the radio parameter ADDRESS_HANDLER into RX_MODE and TX_MODE. 2014-04-09 21:25:40 +02:00
Nicolas Tsiftes
2284ef5ef2 Enhanced the documentation. 2014-04-08 16:42:16 +02:00
Niclas Finne
5f265ced2f Added stub for extended radio API for nullradio 2014-04-03 13:38:18 +02:00
Niclas Finne
5112082a48 Extended radio API definitions with support for setting channel, pan id, etc. 2014-04-03 13:38:06 +02:00
Adam Dunkels
45265249fc Changed the name of the rimeaddr module to linkaddr 2014-01-29 20:12:24 +01:00
Adam Dunkels
bddd96d5c8 Removed all module makefiles. Instead, all .c files in a module directory are compiled. 2014-01-26 23:20:46 +01:00
Adam Dunkels
25367fb08c Moved the ds2411 driver into a dev/ds2411 module 2014-01-26 23:20:31 +01:00
Adam Dunkels
c9efe3c3c4 Moved the cc2520 driver into its own dev/cc2520 module 2014-01-26 23:20:31 +01:00
Adam Dunkels
4cfe6c4a5e Moved the sht11 driver to its own module 2014-01-26 23:20:30 +01:00
Adam Dunkels
cc9c83448c Makefile for the core/dev module 2014-01-26 23:20:29 +01:00
Adam Dunkels
0b805e4763 Moved the cc2420 driver into a separate dev/cc2420 module 2014-01-26 23:20:27 +01:00
Adam Dunkels
5f3fe7f7c7 Updated include paths for the moved files under net/ 2014-01-26 23:20:23 +01:00
Benoît Thébaudeau
9846216358 leds: Add the leds_set() function
The leds_set() function is added on top of leds_arch_set() in order to have a
means of displaying a pattern on a set of LEDs, while keeping the ENERGEST
information up to date, which would be missing with a direct call to
leds_arch_set().

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2014-01-07 13:03:14 +01:00
Benoît Thébaudeau
7f48057b9e leds: Fix the API
The leds API did not work in some cases. E.g. with the following sequence:
  leds_off(LEDS_ALL);
  leds_toggle(LEDS_GREEN);
  leds_off(LEDS_ALL);
the green LED was remaining on after the last call.

This was caused by the toggle feature made synonymous with the invert feature,
although it is unrelated. leds_toggle() is indeed supposed to toggle an LED,
while leds_invert() is supposed to change the active level of an LED. However,
all users of leds_invert() actually meant leds_toggle(), and the invert feature
does not make sense in this module because it is not handy due to successive
calls to leds_invert() changing the intended behavior, and hardware active
levels should be managed in leds_arch_set() (e.g. by XORing the passed value
with a hardware-specific constant before setting the output levels of the pins).

Consequently, this change:
 - removes the leds_invert() function,
 - makes leds_toggle() behave as expected relatively to leds_off() / leds_on(),
 - sanitizes the code in the leds module.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2014-01-07 13:02:41 +01:00
Adam Dunkels
bb2dcaa057 A massive all-tree automated update of all double inclusion guard #defines that changes from using two underscores as a prefix, which are reserved, to not using two underscores as a prefix 2013-11-24 20:20:11 +01:00
Adam Dunkels
30c0c5eaf6 Removed old unused timetable code 2013-11-19 08:29:23 +01:00
Moritz 'Morty' Strübe
c67c048cac Clean up setting channel and CCA-threshold for CC2420 based motes.
The CCA-threshold now defaults to -46 which give better simulation
results and typically also better experimental results.
This adjustment is also needed due to commit 0a13f99 in mspsim. As
promised in https://github.com/mspsim/mspsim/pull/18 it broke the
regression tests.
2013-11-07 17:28:33 +01:00
Peter A. Bigot
8439c1bb81 core/dev/led: Allow platform to provide LED color map 2013-06-21 11:34:48 -05:00
Robert Quattlebaum
b8c0f2de6c cpu/native: Add file-backed simulated EEPROM to native cpu.
This patch removes a defunct EEPROM implementation from the native
platform and provides a new EEPROM implementation for the native cpu.
The previous implementation appears to be vestigal.

This is useful for testing code which uses the EEPROM without running
the code on the actual hardware.

By default the code will create a new temporary file as the EEPROM
backing, reinitializing each time. If you would like to preserve the
EEPROM contents or specify a specific EEPROM file to use, you can set the
`CONTIKI_EEPROM` environment variable to the name of the EEPROM file you
wish to use instead. If it already exists, its contents will be used.
If it does not already exist, it will be created and initialized by
filling it with `0xFF`---just like a real EEPROM.

A new example is also included, which was used to verify the correctness
of the implementation. It can easily be used to verify the EEPROM
implementations of other targets.
2013-05-18 10:29:41 -07:00
Adam Dunkels
944537fccf Removed all old RCS tags in the Contiki source tree. Those RCS tags are not used any more, as we are now using git to manage the Contiki source tree 2012-10-26 15:54:49 +02:00
Joakim Eriksson
621790f156 fixed read loop to be slightly less CPU speed dependent 2012-10-01 13:14:47 +02:00
Antonio Lignan
c5e9d688a5 Fixed sht11 driver, now ensures the i2c bus is disabled when initializing 2012-08-16 14:12:27 +02:00
Nicholas J Humfrey
372de7d08a Converted u8_t to uint8_t and u16_t to uint16_t in the rest of core (specifically ctk/vnc, slip and the loader code) 2012-02-21 08:33:24 -05:00
Niclas Finne
8e59df78e2 Autoenable RX after TX + removed exception check 2012-01-09 14:55:34 +01:00
Niclas Finne
f4f35973d1 Fixed some configuration problems and support for AUTOACK 2012-01-09 14:55:31 +01:00
Niclas Finne
b6fd166155 Removed obsolete CRC checksum handling and debug leds 2012-01-09 14:41:48 +01:00
Niclas Finne
05b10eb9ce Initial WiSMote port based on code from Arago Systems. 2012-01-09 12:25:06 +01:00
Joakim Eriksson
5b1d9617c4 moved io and signal and IAR-GCC checks from driver files into contiki include file 2011-09-26 10:38:41 +02:00
Joakim Eriksson
95dde73618 fixed Sky platform for IAR compiler 2011-09-11 17:18:02 +02:00
Nicolas Tsiftes
48e6e801c2 Removed redundant tokens at the end of preprocessor conditions 2011-06-10 17:44:48 +02:00
Joakim Eriksson
d980c0db16 added delays in CC2420 to avoid risk of configuring before CC2420 is powered on 2011-06-05 00:20:25 +02:00
Joakim Eriksson
e511c6a930 added debug to sht11 driver and made it more configurable 2011-06-05 00:15:53 +02:00
Joakim Eriksson
77ec0bfa0f fixed the z1 platform and generic code used by z1 to work with IAR compiler 2011-05-25 17:21:51 +02:00
Joakim Eriksson
d8e54ca585 fixed for compilation with IAR compiler 2011-04-06 20:14:30 +02:00
Niclas Finne
e348cf7fc6 removed unnecessary include 2011-03-07 20:20:29 +01:00
Fredrik Osterlind
dd7cec737d removed obsolete leds_[color]() functions, replaced by leds_{on,off}()
allow LEDS_[COLOR] to be configured by platform-conf
2011-03-03 17:48:32 +01:00
Mariano Alvira
a8f9119ace pass up a RADIO_NOACK to the MAC layer. 2011-02-23 15:19:43 -08:00
Lionel Debroux
5cb49e8b07 Several compiler warning fixes:
* msp430: fix "implicit declaration of function" warnings in clock.c, by including watchdog.h;
     * sky: fix a couple pointer target signedness warnings;
     * core: fix several signed/unsigned comparison warnings;
     * framer-802154: "const static" -> "static const" to fix compiler warnings;
     * core: comment or remove unused variables and function definitions.

Signed-off-by: Lionel Debroux <lionel_debroux@yahoo.fr>
Signed-off-by: Mariano Alvira <mar@devl.org>
2011-02-20 19:28:14 -05:00
Fredrik Osterlind
3bf99ca040 LEDS_ALL configurable 2011-02-09 15:29:41 +01:00
adamdunkels
cea299d79a Call upper layers even if packet reception failed - this allows the RDC layer to shut off the radio even if a malformed packet was received. 2011-01-09 21:09:28 +00:00
dak664
8b5577eca2 Patch from Roger Larsson to answer mac address request, for testing autoconfigure. 2010-12-23 22:38:47 +00:00
adamdunkels
d267b5ca94 Re-added timestamp support for outbound packets that was removed when switching to the new radio API 2010-12-16 22:40:52 +00:00
adamdunkels
417c7f8c70 Added parenthesis around addresses to allow expressions as arguments 2010-12-16 22:39:50 +00:00