oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
hal_uart.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
9#ifndef OVE_HAL_UART_H
10#define OVE_HAL_UART_H
11
26#include "ove/uart.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
42int ove_hal_uart_open(ove_uart_t uart, const struct ove_uart_cfg *cfg);
43
50
63int ove_hal_uart_tx(ove_uart_t uart, const void *data, size_t len,
64 uint32_t timeout_ms, size_t *bytes_written);
65
76
86
87#ifdef __cplusplus
88}
89#endif
90
93#endif /* OVE_HAL_UART_H */
int ove_hal_uart_open(ove_uart_t uart, const struct ove_uart_cfg *cfg)
Configure and enable the UART peripheral.
int ove_hal_uart_rx_enable(ove_uart_t uart)
Enable the RX interrupt / start RX reception.
void ove_hal_uart_close(ove_uart_t uart)
Disable and release the UART peripheral.
int ove_hal_uart_tx_flush(ove_uart_t uart)
Flush the TX hardware FIFO.
int ove_hal_uart_tx(ove_uart_t uart, const void *data, size_t len, uint32_t timeout_ms, size_t *bytes_written)
Blocking transmit of data.
struct ove_uart * ove_uart_t
Opaque handle for a UART peripheral.
Definition types.h:136
UART configuration descriptor.
Definition uart.h:66