ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_rabook_pipeline.h
Go to the documentation of this file.
1
44#pragma once
45
46#include <stddef.h>
47#include <stdint.h>
48
49#include "epub.h"
50#include "ra8_err.h"
51#include "ra8_fs.h"
52#include "ra8_rabook_xml_shim.h"
53#include "rabook_compile.h"
54#include "reflow_image.h"
55
56#ifdef __cplusplus
57extern "C" {
58#endif
59
135
192 const ra8_rabook_buffers_t* buffers,
193 const ra8_rabook_pipeline_scratch_t* scratch,
194 ra8_fs_mount_t* mount,
195 const char* out_path);
196
234 const ra8_rabook_buffers_t* bufs,
236 const void** out_blob,
237 uint32_t* out_len);
238
239#ifdef __cplusplus
240} /* extern "C" */
241#endif
EPUB (.epub) reader and chapter iterator for ra8-firmware.
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).
ra8_err_t rabook_compile_from_epub(epub_book_t *epub, const ra8_rabook_buffers_t *buffers, const ra8_rabook_pipeline_scratch_t *scratch, ra8_fs_mount_t *mount, const char *out_path)
Compile an open EPUB into a RABOOK1 blob written to out_path on the SD filesystem.
ra8_err_t rabook_compile_from_epub_to_buffer(epub_book_t *epub, const ra8_rabook_buffers_t *bufs, const ra8_rabook_pipeline_scratch_t *scr, const void **out_blob, uint32_t *out_len)
Compile an open EPUB into a RABOOK1 blob left in bufs->out, with no filesystem write.
Bounded XHTML-to-RABOOK streaming builder.
Zero-heap builder that emits a RABOOK1 blob (the #149 compiler back-end).
Zero-heap raster image decode + scale + blit for reflow (#106).
Opened EPUB book.
Definition epub.h:286
Cached parse of one mounted FAT volume.
Caller-owned bump arena backing a single image decode.
Caller-owned, fixed-capacity arenas the builder appends into (no heap).
Caller-owned temporary buffers the pipeline stage needs.
uint16_t max_image_edge
Opt-in downscale clamp on the longer edge in pixels; 0 (the zero-init default) preserves source resol...
uint8_t pixel_format
Device profile: raster depth to emit, book_image_pixfmt_t.
uint32_t gray_cap
Capacity of gray in pixels (bytes).
uint8_t * gray
Intermediate gray-pixel downscale buffer.
char * css
Stylesheet load scratch (NUL-terminated).
size_t xhtml_cap
Capacity of xhtml in bytes.
uint8_t * image_raw
Raw encoded cover/image byte buffer.
ra8_rabook_xml_workspace_t * xml_workspace
Caller-owned XHTML parser state.
bool skip_images
Drop all images (text/CSS-only).
size_t image_cap
Capacity of image_raw in bytes.
size_t css_cap
Capacity of css in bytes.
ra8_img_arena_t * img_arena
stb_image bump arena (caller-sized scratch).
uint8_t * xhtml
Chapter XHTML scratch buffer.
Caller-owned storage for one parser invocation.