oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
led.h
Go to the documentation of this file.
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
26#include "ove/types.h"
27#include "ove_config.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#ifdef CONFIG_OVE_LED
34
44void ove_led_set(unsigned int led, int on);
45
51void ove_led_toggle(unsigned int led);
52
58unsigned int ove_led_count(void);
59
60#else /* !CONFIG_OVE_LED */
61
62static inline void ove_led_set(unsigned int led, int on)
63{
64 (void)led;
65 (void)on;
66}
67static inline void ove_led_toggle(unsigned int led)
68{
69 (void)led;
70}
71static inline unsigned int ove_led_count(void)
72{
73 return 0;
74}
75
76#endif /* CONFIG_OVE_LED */
77
78#ifdef __cplusplus
79}
80#endif
81
84#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.