led_set_brightness

Function led_set_brightness 

Source
pub unsafe extern "C" fn led_set_brightness(
    dev: *const device,
    led: u32,
    value: u8,
) -> i32
Expand description

@brief Set LED brightness

This optional routine sets the brightness of a LED to the given value. Calling this function after led_blink() won’t affect blinking.

LEDs which can only be turned on or off do not need to provide this function. These should simply turn the LED on if @p value is nonzero, and off if @p value is zero using the on/off APIs automatically.

@param dev LED device @param led LED number @param value Brightness value to set in percent @return 0 on success, negative on error