oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
console.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
25#ifndef OVE_CONSOLE_H
26#define OVE_CONSOLE_H
27
28#include "ove/types.h"
29#include "ove_config.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35#ifdef CONFIG_OVE_CONSOLE
36
49
62
73
85void ove_console_write(const char *buf, unsigned int len);
86
87#else /* !CONFIG_OVE_CONSOLE */
88
89static inline int ove_console_init(void) { return OVE_ERR_NOT_SUPPORTED; }
90static inline int ove_console_getchar(void) { return -1; }
91static inline void ove_console_putchar(int c) { (void)c; }
92static inline void ove_console_write(const char *buf, unsigned int len) { (void)buf; (void)len; }
93
94#endif /* CONFIG_OVE_CONSOLE */
95
96#ifdef __cplusplus
97}
98#endif
99
/* end of ove_console group */
101
102#endif /* OVE_CONSOLE_H */
int ove_console_init(void)
Initialise the system console hardware.
int ove_console_getchar(void)
Read one character from the console.
void ove_console_write(const char *buf, unsigned int len)
Write a raw byte buffer to the console.
void ove_console_putchar(int c)
Write one character to the console.
#define OVE_ERR_NOT_SUPPORTED
The requested feature is not supported by the active backend.
Definition types.h:38