ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_fs_fat_exfat_stream_internal.h
Go to the documentation of this file.
1
37
38#pragma once
39
40#include <stdint.h>
41
42#include "ra8_attributes.h"
43#include "ra8_fs.h"
45
74priv_exfat_bitmap_test(const ra8_fs_mount_t* m, uint64_t bmp_lba, uint32_t clus, uint8_t* out_free);
75
106 uint64_t bmp_lba,
107 uint32_t need,
108 uint32_t* out_clus);
109
138priv_exfat_bitmap_mark(const ra8_fs_mount_t* m, uint64_t bmp_lba, uint32_t clus, uint32_t count);
139
176
213 const exfat_dir_t* dir,
214 const char* path,
215 exfat_setpos_t* pos,
216 uint32_t max_pos,
217 uint32_t* out_count,
218 uint8_t* file_copy,
219 uint8_t* strm_copy);
220
249ra8_err_t priv_exfat_free_clusters(const ra8_fs_mount_t* m, const uint8_t* strm);
250
284 const exfat_dir_t* dir,
285 const uint16_t* name,
286 uint32_t nlen,
287 exfat_setpos_t* out_head,
288 uint32_t* out_count);
289
326 const char* path,
327 ra8_fs_mode_t mode,
328 ra8_fs_file_t** out_file);
329
361ra8_err_t priv_exfat_write_stream(ra8_fs_file_t* file, const uint8_t* buf, uint32_t len);
362
395
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
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 priv_exfat_bitmap_mark(const ra8_fs_mount_t *m, uint64_t bmp_lba, uint32_t clus, uint32_t count)
Mark a contiguous cluster run as allocated in the bitmap.
ra8_err_t priv_exfat_bitmap_test(const ra8_fs_mount_t *m, uint64_t bmp_lba, uint32_t clus, uint8_t *out_free)
Read one allocation-bitmap bit: is this cluster free?
ra8_err_t priv_exfat_free_clusters(const ra8_fs_mount_t *m, const uint8_t *strm)
Free the cluster run / chain referenced by a Stream entry.
ra8_err_t priv_exfat_open_write(ra8_fs_mount_t *handle, const char *path, ra8_fs_mode_t mode, ra8_fs_file_t **out_file)
Open an exFAT file for writing: create, truncate, or position to append.
ra8_err_t priv_exfat_grow_dir(const ra8_fs_mount_t *m, exfat_dir_t *dir)
Append one zeroed cluster to a directory, keeping its entry set true.
ra8_err_t priv_exfat_bitmap_scan(const ra8_fs_mount_t *m, uint64_t bmp_lba, uint32_t need, uint32_t *out_clus)
Find a contiguous free run, starting from the mount's next-free hint.
ra8_err_t priv_exfat_find_set(const ra8_fs_mount_t *m, const exfat_dir_t *dir, const char *path, exfat_setpos_t *pos, uint32_t max_pos, uint32_t *out_count, uint8_t *file_copy, uint8_t *strm_copy)
Locate a file's full directory-entry set with per-entry positions.
ra8_err_t priv_exfat_write_stream(ra8_fs_file_t *file, const uint8_t *buf, uint32_t len)
Stream bytes into an exFAT file, growing its allocation as needed.
ra8_err_t priv_exfat_ensure_clusters(ra8_fs_file_t *file, uint32_t need)
Grow a file's allocation until it owns at least need clusters.
ra8_err_t priv_exfat_flush_set(ra8_fs_file_t *file)
Rewrite a file's entry set from the handle, checksum last.
ra8_err_t priv_exfat_link(const ra8_fs_mount_t *m, const exfat_dir_t *dir, const uint16_t *name, uint32_t nlen, exfat_setpos_t *out_head, uint32_t *out_count)
Lay down a fresh File/Stream/Name entry set and report where it went.
Cross-TU on-disk-layout enums and typedefs for the FAT/exFAT adapter.
ra8_fs_mode_t
File-open modes accepted by ra8_fs_open().
Identifies the exFAT directory a lookup, scan or link operates in.
Directory position (cluster + entry index) of one 32-byte entry.
Open-file state.
Cached parse of one mounted FAT volume.