ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
mkfontimg_internal.h
Go to the documentation of this file.
1
15
16#pragma once
17
18#include <stdint.h>
19
20#include "ra8_attributes.h"
21#include "ra8_fs.h"
22
28
30typedef struct {
31 uint64_t block_count;
32 uint32_t block_size;
33 int fd;
34 bool io_failed;
36
47
59RA8_PRIV void priv_mkfontimg_diag(const char* text);
60
72RA8_PRIV void priv_mkfontimg_diag_u64(uint64_t value);
73
75[[nodiscard]] RA8_PRIV bool priv_mkfontimg_host_begin(const char* final_path,
76 uint64_t block_count,
77 uint32_t block_size,
78 mkfontimg_host_t* host);
79
81[[nodiscard]] RA8_PRIV bool
82priv_mkfontimg_host_seed(mkfontimg_host_t* host, const uint8_t* bytes, uint32_t length);
83
85[[nodiscard]] RA8_PRIV bool priv_mkfontimg_host_copy(const mkfontimg_host_t* host,
86 ra8_fs_mount_t* mount,
87 const char* input_path,
88 const char* card_name,
89 uint64_t minimum_bytes,
90 uint64_t maximum_bytes,
91 uint64_t* out_bytes);
92
95
void priv_mkfontimg_diag(const char *text)
Write one complete best-effort diagnostic fragment to standard error.
bool priv_mkfontimg_host_seed(mkfontimg_host_t *host, const uint8_t *bytes, uint32_t length)
Seed exact bytes at the beginning of the temporary image.
bool priv_mkfontimg_host_begin(const char *final_path, uint64_t block_count, uint32_t block_size, mkfontimg_host_t *host)
Create, size, and bind one private sibling-temporary image.
bool priv_mkfontimg_host_commit(mkfontimg_host_t *host)
Sync and atomically publish a complete temporary image.
void priv_mkfontimg_diag_u64(uint64_t value)
Write one unsigned decimal value to standard error without stdio.
void priv_mkfontimg_host_abort(mkfontimg_host_t *host)
Close and unlink an unpublished temporary image.
bool priv_mkfontimg_host_copy(const mkfontimg_host_t *host, ra8_fs_mount_t *mount, const char *input_path, const char *card_name, uint64_t minimum_bytes, uint64_t maximum_bytes, uint64_t *out_bytes)
Stream one stable host input into a card file and verify it by reread.
mkfontimg_host_limit_t
Fixed private storage bounds for the hosted adapter.
@ k_mkfontimg_host_name_cap
Hosted leaf capacity.
@ k_mkfontimg_host_path_cap
Hosted path capacity.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
Minimal FAT12/FAT16/FAT32 filesystem adapter (read + write).
Descriptor-backed block-device state bound into ra8_fs.
bool io_failed
Sticky positioned-I/O failure.
int fd
Temporary image descriptor.
uint32_t block_size
Bytes per sector.
uint64_t block_count
Addressable sectors.
Caller-owned sibling-temporary and block-backend binding.
ra8_fs_backend_t backend
Portable FS facade.
mkfontimg_disk_t disk
Bound block state.
int image_fd
Image descriptor.
int directory_fd
Parent descriptor.
char final_name[k_mkfontimg_host_name_cap]
Destination leaf.
char temp_name[k_mkfontimg_host_name_cap]
Temporary leaf.
bool temp_exists
Temp cleanup guard.
Block-device interface that ra8_fs runs on top of.
Cached parse of one mounted FAT volume.