This makes life easier when calling e.g. `saul_reg_write()` with data
stored in flash.
As now the signatures for reading and writing differ (in that `const`
qualifier only), `saul_notsup()` is split into `saul_write_notsup()`
and `saul_read_notsup()`. However, one is implemented as a symbol alias
of the other, so that ROM consumption remains unchanged.
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>
In analogy to the existing GPIO mappings, this provides (write-only)
SAUL entries for PWM'd LEDs in a single-LED (as SAUL_ACT_DIMMER) and an
RGB (as SAUL_ACT_RGB_LED) mode.
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>