oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
Loading...
Searching...
No Matches
led.hpp
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
14#pragma once
15
16#include <ove/led.h>
17#include <ove/types.hpp>
18
19#ifdef CONFIG_OVE_LED
20
21namespace ove {
22
30namespace led {
31
37inline void set(unsigned int led, int on) {
38 ove_led_set(led, on);
39}
40
45inline void toggle(unsigned int led) {
46 ove_led_toggle(led);
47}
48
53inline unsigned int count() {
54 return ove_led_count();
55}
56
57} /* namespace led */
58
59} // namespace ove
60
61#endif /* CONFIG_OVE_LED */
void toggle(unsigned int led)
Toggles the state of a LED.
Definition led.hpp:45
unsigned int count()
Returns the total number of LEDs available on this board.
Definition led.hpp:53
void set(unsigned int led, int on)
Turns a LED on or off.
Definition led.hpp:37
Top-level namespace for all oveRTOS C++ abstractions.
Definition app.hpp:19
Common type definitions and concepts for the C++ wrapper layer.