mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
7f48057b9e
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> |
||
---|---|---|
.. | ||
6502 | ||
apple2enh | ||
atarixl | ||
c64 | ||
c128 | ||
code-style | ||
coffee-manager | ||
collect-view | ||
cooja | ||
csc | ||
cygwin | ||
mspsim@58f187351f | ||
powertrace | ||
release-tools | ||
sensinode | ||
sky | ||
stm32w | ||
wpcapslip | ||
z1 | ||
z80 | ||
avr-make-symbols | ||
avr-makecoffeedata | ||
avr-makefsdata | ||
base64-encode | ||
codeprop.c | ||
empty-symbols.c | ||
empty-symbols.h | ||
freebsd-6-setup-slip | ||
make-symbols-nm | ||
Makefile | ||
makefsdata | ||
makestrings | ||
mknmlist | ||
mknmlist-ansi | ||
msp430-make-symbols | ||
scat.c | ||
serial-log.pl | ||
setup-nat-ubuntu | ||
tapslip6.c | ||
timestamp | ||
tunslip6.c | ||
tunslip.c |