ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
unarch_io.h
Go to the documentation of this file.
1
31#pragma once
32
33#include <stddef.h>
34#include <stdint.h>
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
55typedef size_t (*unarch_read_fn)(void* ctx, uint64_t offset, void* buf, size_t len);
56
79typedef struct {
80 const uint8_t* base;
81 size_t len;
83
109[[nodiscard]] size_t unarch_mem_read(void* ctx, uint64_t offset, void* buf, size_t len);
110
111#ifdef __cplusplus
112}
113#endif
Bounded flat-memory backing for unarch_read_fn.
Definition unarch_io.h:79
const uint8_t * base
First readable byte of the flat view.
Definition unarch_io.h:80
size_t len
Readable length in bytes.
Definition unarch_io.h:81
size_t(* unarch_read_fn)(void *ctx, uint64_t offset, void *buf, size_t len)
Seek+read backing over an archive's bytes.
Definition unarch_io.h:55
size_t unarch_mem_read(void *ctx, uint64_t offset, void *buf, size_t len)
unarch_read_fn over a flat unarch_mem_t view.
Definition unarch_io.c:24