The bitfield contains one bit for each LED. A set bit enables and a cleared bit disables the corresponding LED.
Parameters:
setting
8-bit bitfield describing the desired LED states
int8_t sb_led_show_level
(
uint8_t
level,
uint8_t
max
)
Uses the LED array as a level indicator.
Allows the array of LEDs to be used as a (fill) level, progress or similar indicator. The 8 LEDs are used to display a ratio of a max-value<=255 in 9 steps.
Parameters:
level
level value
max
maximum possible value
Returns:
the number of LEDs turned on on success, negative value on error