ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
rabook_import_compiler.h
Go to the documentation of this file.
1
32#pragma once
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38#include <stddef.h>
39#include <stdint.h>
40
41#include "epub.h"
42#include "ra8_dual_core_job.h"
43#include "ra8_err.h"
44#include "ra8_fs.h"
45#include "ra8_rabook_pipeline.h"
46#include "ra8_vmem.h"
47
84
113[[nodiscard]] ra8_err_t rabook_import_compile_adapter(void* compile_ctx,
114 ra8_fs_mount_t* mount,
115 const char* epub_path,
116 const char* out_path);
117
157
196[[nodiscard]] ra8_err_t rabook_import_compile_adapter_m33(void* compile_ctx,
197 ra8_fs_mount_t* mount,
198 const char* epub_path,
199 const char* out_path);
200
201#ifdef __cplusplus
202}
203#endif
EPUB (.epub) reader and chapter iterator for ra8-firmware.
Cross-core compile-job dispatch seam + status contract (#149).
ra8_err_t(* ra8_dual_core_compile_dispatch_fn)(void *ctx, const uint8_t *epub, uint32_t epub_len, uint8_t *out_buf, uint32_t out_cap, uint32_t *out_len)
DI seam: dispatch one EPUB compile to the secondary core, return the blob.
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
Minimal FAT12/FAT16/FAT32 filesystem adapter (read + write).
End-to-end EPUB -> RABOOK1 compile pipeline (#149).
Byte-range page cache with SLRU eviction (Layer 2, #147).
ra8_keycache_cell_t ra8_vmem_frame_t
Per-frame cache metadata (one caller-owned array entry per frame).
Definition ra8_vmem.h:122
ra8_err_t rabook_import_compile_adapter_m33(void *compile_ctx, ra8_fs_mount_t *mount, const char *epub_path, const char *out_path)
Import-seam adapter that offloads the compile to the Cortex-M33 (#149).
ra8_err_t rabook_import_compile_adapter(void *compile_ctx, ra8_fs_mount_t *mount, const char *epub_path, const char *out_path)
Import-seam adapter: stream a .epub off mount and compile it.
Opened EPUB book.
Definition epub.h:286
Cached parse of one mounted FAT volume.
Caller-owned, fixed-capacity arenas the builder appends into (no heap).
Caller-owned temporary buffers the pipeline stage needs.
The (object_id, frame-aligned offset) key the page cache hashes on.
Definition ra8_vmem.h:136
Page-cache state (caller-owned; treat as private).
Definition ra8_vmem.h:179
Cookie carrying the storage rabook_import_compile_adapter needs.
epub_book_t * epub
Caller-owned open-book storage.
ra8_vmem_t * cache
Page cache re-initialised per compile.
ra8_vmem_key_t * cache_keys
Per-frame key-storage array.
const ra8_rabook_buffers_t * bufs
RABOOK1 builder arenas.
uint32_t cache_frame_bytes
Bytes per cache frame (e.g.
uint32_t cache_frame_count
Frames in the pool (the RAM budget).
int32_t * cache_buckets
Cache hash-bucket heads.
uint8_t * cache_frames
Frame pool backing the cache.
uint32_t cache_bucket_count
Number of hash buckets (>= 1).
ra8_vmem_frame_t * cache_meta
Per-frame metadata array.
const ra8_rabook_pipeline_scratch_t * scr
XHTML + image decode scratch.
Cookie for rabook_import_compile_adapter_m33 (the M33-offload binding).
uint32_t blob_cap
Capacity of blob_buf in bytes.
uint8_t * blob_buf
Buffer the dispatched RABOOK1 blob lands in.
ra8_dual_core_compile_dispatch_fn dispatch
Cross-core compile seam (non-NULL).
uint8_t * epub_load_buf
Buffer the source .epub is read into.
void * dispatch_ctx
Cookie forwarded to dispatch.
rabook_import_compiler_ctx_t * fallback
In-core retry cookie used if the offload fails; NULL = offload-only.
uint32_t epub_load_cap
Capacity of epub_load_buf in bytes.