led_get — Get LED intensity and duty length
fix32 led_get(<LED_IDENTIFIER>, uint32 *dutylength);
Retrieve the intensity and duty length values of the LED identified by <LED_IDENTIFIER>.
If the intensity and duty length were programmatically set by led_set() , led_get() will return the values programmatically set. |
LED_1
, LED_2
, LED_3
or LED_4
. Note: the LED identifier is passed as direct parameter of the led_get()
opcode, therefore stack values can't be used.NULL
.The LED intensity in percentage, from 0.00 to 100.00 (%).
main { if(led_get(LED_1, NULL) < 50.0) { led_set(LED_1, 50.0, 0); } }