ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_io_spi_bus_internal.h
Go to the documentation of this file.
1
23
24#pragma once
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#include <stdint.h>
31
32#include "ra8_err.h"
33#include "ra8_io_spi_bus.h"
34#include "ra8_spi.h"
35
52 ra8_err_t (*xfer8)(void* ctx, uint8_t tx, uint8_t* rx);
53
56 *write_read)(void* ctx, const void* tx, void* rx, uint32_t len, ra8_spi_bit_width_t width);
57
59 ra8_err_t (*set_clock)(void* ctx, uint32_t baud_hz, uint32_t pclk_hz);
60};
61
62#ifdef __cplusplus
63}
64#endif
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
ra8_io SPI-bus facade – one controller-transfer vtable over thechip's two SPI implementations.
SPI_B controller driver (RA8D2 Type-B SPI peripheral).
ra8_spi_bit_width_t
Per-frame bit width for multi-byte transfers.
Definition ra8_spi.h:84
Opaque to applications – backends implement this internally and export a binding helper through their...
ra8_err_t(* set_clock)(void *ctx, uint32_t baud_hz, uint32_t pclk_hz)
Re-program the bit-rate divider from baud_hz / pclk_hz.
ra8_err_t(* xfer8)(void *ctx, uint8_t tx, uint8_t *rx)
Full-duplex single-byte exchange (rx may be NULL).
ra8_err_t(* write_read)(void *ctx, const void *tx, void *rx, uint32_t len, ra8_spi_bit_width_t width)
Full-duplex multi-frame transfer (either buffer may be NULL).