led_get_actual — Get actual LED intensity and duty length
fix32 led_get_actual(<LED_IDENTIFIER>, uint32 *dutylength);
Retrieve the original intensity and duty length values of the LED identified by <LED_IDENTIFIER>.
led_get_actual() will always return the original values, even if led_set() is used to set an new intensity and duty length. |
LED_1
, LED_2
, LED_3
or LED_4
. Note: the LED identifier is passed as direct parameter of the led_get_actual()
opcode, therefore stack values can't be used.NULL
.The LED intensity in percentage, from 0.00 to 100.00 (%).
init { uint32 dutylength; if(led_get_actual(LED_1, &dutylength) < 85.0 || dutylength != 0) { led_set(LED_1, 90.0, 0); } }