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::led
22{
23
37inline void set(unsigned int led, int on)
38{
39 ove_led_set(led, on);
40}
41
46inline void toggle(unsigned int led)
47{
48 ove_led_toggle(led);
49}
50
55inline unsigned int count()
56{
57 return ove_led_count();
58}
59
60} /* namespace ove::led */
61
62#endif /* CONFIG_OVE_LED */
Thin C++ wrappers around the oveRTOS LED control API.
Definition led.hpp:22
void toggle(unsigned int led)
Toggles the state of a LED.
Definition led.hpp:46
unsigned int count()
Returns the total number of LEDs available on this board.
Definition led.hpp:55
void set(unsigned int led, int on)
Turns a LED on or off.
Definition led.hpp:37
Common type definitions and concepts for the C++ wrapper layer.