1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00
RIOT/drivers/saul
chrysn 4687504936 drivers/saul/auto_init: Support bool and percent for dimmers
Booleans make sense for dimmers when accessed from a Sith application
that deals in absolutes.

Percent values are also a widespread interpretation of brightness
levels, and are thus supported as well.

The bit arithmetic makes sure that the arithmetic operation value / 100
* saul_pwm_resolution is done efficiently (by expression as a
multiplication followed by shifting) and accurately (by maximizing the
number of usable bits) while still being flexible both with respect to
integer sizes and to changes of saul_pwm_resolution.

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2020-10-17 11:20:30 +02:00
..
init_devs drivers/saul/auto_init: Add PWM for LEDs 2020-10-17 11:20:17 +02:00
adc_saul.c saul: Ignore extra dimensions in read functions 2019-12-03 15:17:25 +01:00
gpio_saul.c saul: Ignore extra dimensions in read functions 2019-12-03 15:17:25 +01:00
Makefile drivers/saul/auto_init: Add PWM for LEDs 2020-10-17 11:20:17 +02:00
pwm_saul.c drivers/saul/auto_init: Support bool and percent for dimmers 2020-10-17 11:20:30 +02:00
saul_str.c drivers/saul: add common gas class 2020-03-12 08:42:59 +01:00
saul.c saul: use const for device parameter 2017-06-26 20:25:37 +02:00