The official git repository for OSD-Contiki, the open source OS for the Internet of Things
Find a file
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
apps Bumped the version number from 2.6 to 3.x, which is to be used in the development branch 2013-12-12 17:33:18 +01:00
core leds: Fix the API 2014-01-07 13:02:41 +01:00
cpu leds: Fix the API 2014-01-07 13:02:41 +01:00
doc Bumped the version number from 2.6 to 3.x, which is to be used in the development branch 2013-12-12 17:33:18 +01:00
examples Now that all supported targets echo the Return key on gets() there's no more need to print \n's. 2013-12-26 16:12:39 +01:00
platform Merge remote-tracking branch 'upstream/master' 2013-12-12 20:46:43 +01:00
regression-tests Travis test for slip-radio 2013-12-09 21:06:37 +01:00
tools leds: Fix the API 2014-01-07 13:02:41 +01:00
.gitignore Adjustments for the switch from 'atari' to 'atarixl'. 2013-10-03 23:54:33 +02:00
.gitmodules Added mspsim as a submodule instead of as a binary mspsim.jar file 2013-11-07 17:28:50 +01:00
.travis.yml Travis test for slip-radio 2013-12-09 21:06:37 +01:00
LICENSE Removed the explicit year 2012 to make it more generic 2012-10-25 23:08:54 +02:00
Makefile.include Merge pull request #474 from adamdunkels/push/cleanup-vnc 2013-11-29 05:07:53 -08:00
README-BUILDING.md Rename to md 2013-03-26 23:15:37 +01:00
README-EXAMPLES.md Several minor consistency improvements. 2013-07-31 00:55:31 +02:00
README.md Rename to md 2013-03-26 23:15:37 +01:00

The Contiki Operating System

Build Status

Contiki is an open source operating system that runs on tiny low-power microcontrollers and makes it possible to develop applications that make efficient use of the hardware while providing standardized low-power wireless communication for a range of hardware platforms.

Contiki is used in numerous commercial and non-commercial systems, such as city sound monitoring, street lights, networked electrical power meters, industrial monitoring, radiation monitoring, construction site monitoring, alarm systems, remote house monitoring, and so on.

For more information, see the Contiki website:

http://contiki-os.org