oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
led.h
1/*
2 * Copyright (C) 2026 Kamil Lulko <kamil.lulko@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 *
6 * This file is part of oveRTOS.
7 */
8
9#ifndef OVE_LED_H
10#define OVE_LED_H
11
25#include "ove/types.h"
26#include "ove_config.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32#ifdef CONFIG_OVE_LED
33
43void ove_led_set(unsigned int led, int on);
44
50void ove_led_toggle(unsigned int led);
51
57unsigned int ove_led_count(void);
58
59#else /* !CONFIG_OVE_LED */
60
61static inline void ove_led_set(unsigned int led, int on) { (void)led; (void)on; }
62static inline void ove_led_toggle(unsigned int led) { (void)led; }
63static inline unsigned int ove_led_count(void) { return 0; }
64
65#endif /* CONFIG_OVE_LED */
66
67#ifdef __cplusplus
68}
69#endif
70
73#endif /* OVE_LED_H */
void ove_led_toggle(unsigned int led)
Toggle the current state of a board LED.
void ove_led_set(unsigned int led, int on)
Turn a board LED on or off.
unsigned int ove_led_count(void)
Return the number of LEDs available on the current board.