oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
hal_spi.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_SPI_H
10#define OVE_HAL_SPI_H
11
22#include "ove/spi.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
35int ove_hal_spi_open(ove_spi_t spi, const struct ove_spi_cfg *cfg);
36
43
57int ove_hal_spi_transfer(ove_spi_t spi, const void *tx, void *rx,
58 size_t len, uint32_t timeout_ms);
59
60#ifdef __cplusplus
61}
62#endif
63
66#endif /* OVE_HAL_SPI_H */
void ove_hal_spi_close(ove_spi_t spi)
Disable and release the SPI peripheral.
int ove_hal_spi_transfer(ove_spi_t spi, const void *tx, void *rx, size_t len, uint32_t timeout_ms)
Full-duplex SPI data transfer.
int ove_hal_spi_open(ove_spi_t spi, const struct ove_spi_cfg *cfg)
Configure and enable the SPI peripheral.
struct ove_spi * ove_spi_t
Opaque handle for an SPI bus controller.
Definition types.h:139
SPI bus configuration descriptor.
Definition spi.h:60