ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_i2c_bus_ops.h
Go to the documentation of this file.
1
36
37#pragma once
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43#include <stdint.h>
44
45#include "ra8_err.h"
46
78typedef struct {
96 ra8_err_t (*write)(void* ctx, uint8_t addr, const uint8_t* data, uint32_t len, bool send_stop);
97
112 ra8_err_t (*read)(void* ctx, uint8_t addr, uint8_t* data, uint32_t len);
113
132 uint8_t addr,
133 const uint8_t* wr,
134 uint32_t wr_len,
135 uint8_t* rd,
136 uint32_t rd_len);
137
138 void* ctx;
140
141#ifdef __cplusplus
142}
143#endif
-proof
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
Caller-filled I2C controller-transfer seam (write / read / write-then-read).
ra8_err_t(* read)(void *ctx, uint8_t addr, uint8_t *data, uint32_t len)
Controller read of len bytes from 7-bit address addr.
void * ctx
Opaque cookie handed to every callback (binder-owned).
ra8_err_t(* transfer)(void *ctx, uint8_t addr, const uint8_t *wr, uint32_t wr_len, uint8_t *rd, uint32_t rd_len)
Combined write-then-RESTART-then-read in one transaction.