oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
Loading...
Searching...
No Matches
board.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/board.h>
17#include <ove/types.hpp>
18#include <ove/error.hpp>
19
20#ifdef CONFIG_OVE_BOARD
21
22namespace ove::board
23{
24
37[[nodiscard]] inline Result<void> init() noexcept
38{
39 return from_rc(ove_board_init());
40}
41
46inline const char *name()
47{
48 return ove_board_name();
49}
50
55inline const struct ove_board_desc *desc()
56{
57 return ove_board_desc();
58}
59
60} /* namespace ove::board */
61
62#endif /* CONFIG_OVE_BOARD */
Strong ove::Error type, Result<T> alias, and std::error_code interop for the oveRTOS C++ binding.
Thin C++ wrappers around the oveRTOS board description API.
Definition board.hpp:23
Result< void > init() noexcept
Initialises the board hardware (clocks, pin-mux, etc.).
Definition board.hpp:37
const char * name()
Returns the human-readable board name.
Definition board.hpp:46
const struct ove_board_desc * desc()
Returns a pointer to the board descriptor structure.
Definition board.hpp:55
Result< void > from_rc(int rc) noexcept
Lifts a substrate rc-code into a Result<void>.
Definition error.hpp:254
std::expected< T, Error > Result
std::expected-based result alias.
Definition error.hpp:139
Common type definitions and concepts for the C++ wrapper layer.