oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
Functions
LED

Board LED control. More...

Functions

void ove_led_set (unsigned int led, int on)
 Turn a board LED on or off.
 
void ove_led_toggle (unsigned int led)
 Toggle the current state of a board LED.
 
unsigned int ove_led_count (void)
 Return the number of LEDs available on the current board.
 

Detailed Description

Board LED control.

Simple on/off and toggle control for the LEDs described by the active board descriptor. LED indices are 0-based and must be less than the value returned by ove_led_count().

Note
Requires CONFIG_OVE_LED. When the option is disabled every function is replaced by a no-op stub.

Function Documentation

◆ ove_led_set()

void ove_led_set ( unsigned int  led,
int  on 
)

Turn a board LED on or off.

Active-low polarity is handled transparently by the backend; callers always pass a logical level.

Parameters
[in]ledZero-based LED index (must be < ove_led_count()).
[in]onNon-zero to turn the LED on, zero to turn it off.

◆ ove_led_toggle()

void ove_led_toggle ( unsigned int  led)

Toggle the current state of a board LED.

Parameters
[in]ledZero-based LED index (must be < ove_led_count()).

◆ ove_led_count()

unsigned int ove_led_count ( void  )

Return the number of LEDs available on the current board.

Returns
Number of LEDs, or 0 if none are defined.