47typedef enum : uint16_t {
66typedef enum : uint8_t {
92typedef enum : uint8_t {
101typedef enum : uint8_t {
112typedef enum : uint8_t {
128typedef enum : uint16_t {
145typedef enum : uint16_t {
167typedef enum : uint16_t {
191typedef enum : uint32_t {
236typedef enum : uint16_t {
260typedef enum : uint32_t {
322typedef enum : uint32_t {
349typedef enum : uint32_t {
377typedef enum : uint16_t {
408typedef enum : uint32_t {
458typedef enum : uint16_t {
514typedef enum : uint32_t {
574typedef enum : uint8_t {
750typedef enum : uint32_t {
818typedef enum : uint8_t {
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).
uint8_t g_fs_scratch[k_ra8_fs_sector_max]
Single max-sector scratch buffer reused across all I/O.
ra8_fs_fmt_off_t
Extra BPB byte offsets written only by the formatter (ra8_fs_format).
@ k_fmt_off_f16_volid
FAT12/16 BS_VolID (4 bytes).
@ k_fmt_off_jmp1
Jump-boot byte 1 (offset).
@ k_fmt_off_media
BPB_Media descriptor.
@ k_fmt_fsi_off_free
FSInfo FSI_Free_Count offset.
@ k_fmt_off_f16_drvnum
FAT12/16 BS_DrvNum.
@ k_fmt_off_f32_bkboot
FAT32 BPB_BkBootSec (backup boot).
@ k_fmt_fsi_off_struct
FSInfo FSI_StrucSig offset.
@ k_fmt_off_f32_fsinfo
FAT32 BPB_FSInfo sector number.
@ k_fmt_off_f16_bootsig
FAT12/16 BS_BootSig (0x29).
@ k_fmt_off_oem
OEM name field (8 bytes).
@ k_fmt_fsi_off_nxtfree
FSInfo FSI_Nxt_Free offset.
@ k_fmt_off_f32_fstype
FAT32 BS_FilSysType (8 bytes).
@ k_fmt_off_f32_label
FAT32 BS_VolLab (11 bytes).
@ k_fmt_off_sec_per_trk
BPB_SecPerTrk.
@ k_fmt_off_f16_fstype
FAT12/16 BS_FilSysType (8 bytes).
@ k_fmt_off_num_heads
BPB_NumHeads.
@ k_fmt_off_jmp2
Jump-boot byte 2 (0x90 NOP).
@ k_fmt_off_f32_bootsig
FAT32 BS_BootSig (0x29).
@ k_fmt_off_f32_drvnum
FAT32 BS_DrvNum.
@ k_fmt_off_f32_volid
FAT32 BS_VolID (4 bytes).
@ k_fmt_off_f16_label
FAT12/16 BS_VolLab (11 bytes).
@ k_fmt_fsi_off_lead
FSInfo FSI_LeadSig offset.
@ k_fmt_fsi_off_trail
FSInfo FSI_TrailSig offset.
@ k_fmt_off_jmp0
Jump-boot byte 0 (0xEB).
ra8_fs_name_kind_t
How a leaf component has to be stored in a FAT directory.
@ k_name_kind_invalid
Empty, over-long, or holds an illegal character.
@ k_name_kind_short
Fits 8.3; store one entry (+ NTRes case bits).
@ k_name_kind_long
Needs a VFAT chain and a generated ~N alias.
ra8_fs_exfat_fmt_val_t
Magic values + geometry constants used by the exFAT formatter.
@ k_exfat_fmt_csum_hibit
Rotate-right wrap bit (32-bit).
@ k_exfat_fmt_fat_eoc
FatEntry end-of-chain.
@ k_exfat_fmt_clus_4k
log2 cluster BYTES for 4 KB clusters.
@ k_exfat_fmt_thr_256g
<= 256 GB -> 128 KB clusters.
@ k_exfat_fmt_first_clus
First cluster of the heap.
@ k_exfat_entry_label
Volume Label directory entry.
@ k_exfat_fmt_label_max
Volume-label cap (UTF-16 units).
@ k_exfat_fmt_fs_rev
FileSystemRevision = 1.00.
@ k_exfat_fmt_ext_sig
ExtendedBootSignature (sectors 1-8).
@ k_exfat_fmt_thr_32g
<= 32 GB -> 32 KB clusters.
@ k_exfat_fmt_csum_lba
Boot Checksum sector.
@ k_exfat_fmt_byte_full
A fully-allocated bitmap byte.
@ k_exfat_fmt_byte_bits
Bits per bitmap byte.
@ k_exfat_fmt_num_fats
exFAT uses a single FAT.
@ k_exfat_fmt_boot_sig
BootSignature (sector 0).
@ k_exfat_fmt_csum_skip1
Checksum-excluded byte: VolumeFlags.
@ k_exfat_fmt_min_sectors
Smallest exFAT volume: 32 MiB.
@ k_exfat_fmt_thr_256m
<= 256 MB -> 4 KB clusters.
@ k_exfat_fmt_serial
Arbitrary volume-serial base.
@ k_exfat_fmt_upc_std_bytes
Canonical Microsoft up-case table len.
@ k_exfat_fmt_oem_lba
OEM Parameters sector.
@ k_exfat_fmt_backup_lba
Backup boot region start.
@ k_exfat_fmt_clus_256k
... 256 KB (> 256 GB cards).
@ k_exfat_fmt_clus_128k
... 128 KB.
@ k_exfat_fmt_csum_skip0
Checksum-excluded byte: VolumeFlags.
@ k_exfat_fmt_jump2
JumpBoot byte 2.
@ k_exfat_fmt_ext_count
Extended boot sector count.
@ k_exfat_fmt_boot_secs
12 main + 12 backup boot sectors.
@ k_exfat_fmt_geom_iters
Fixed-point geometry passes.
@ k_exfat_entry_upcase
Up-case Table directory entry.
@ k_exfat_fmt_percent
PercentInUse = 0% (fresh volume).
@ k_exfat_fmt_jump0
JumpBoot byte 0.
@ k_exfat_fmt_part_align
exFAT partition alignment: 1 MiB.
@ k_exfat_fmt_csum_skip2
Checksum-excluded byte: PercentInUse.
@ k_exfat_fmt_fat_media
FatEntry[0] media descriptor.
@ k_exfat_fmt_ext_first
First extended boot sector.
@ k_exfat_fmt_drive
DriveSelect (first fixed disk).
@ k_exfat_fmt_clus_32k
... 32 KB.
@ k_exfat_fmt_jump1
JumpBoot byte 1.
@ k_exfat_fmt_resv_lba
Reserved sector.
ra8_fs_exfat_off_t
Byte offsets in the exFAT boot sector (VBR) and directory entries.
@ k_exfat_name_off
File-name entry character offset.
@ k_exfat_strm_off_dlen
Stream-ext DataLength (low 32 used).
@ k_exfat_strm_off_vlen_hi
Stream-ext ValidDataLength high word.
@ k_exfat_off_root_clus
FirstClusterOfRootDirectory.
@ k_exfat_off_fat_lba
FatOffset (sectors from VBR).
@ k_exfat_strm_off_nlen
Stream-ext NameLength (UTF-16 units).
@ k_exfat_strm_off_clus
Stream-ext FirstCluster.
@ k_exfat_strm_off_dlen_hi
Stream-ext DataLength high word.
@ k_exfat_strm_off_flags
Stream-ext GeneralSecondaryFlags.
@ k_exfat_off_spc_shift
SectorsPerClusterShift (log2).
@ k_exfat_off_fat_len
FatLength (sectors).
@ k_exfat_off_bps_shift
BytesPerSectorShift (log2).
@ k_exfat_off_fsname
"EXFAT " filesystem-name field (8 chars).
@ k_exfat_off_num_fats
NumberOfFats.
@ k_exfat_off_clus_count
ClusterCount.
@ k_exfat_off_heap_lba
ClusterHeapOffset (sectors from VBR).
@ k_exfat_upc_off_csum
Up-case-table entry TableChecksum (32-bit).
ra8_fs_exfat_val_t
exFAT entry-type tags + small magic values used by the reader.
@ k_exfat_entry_bitmap
Allocation-bitmap directory entry.
@ k_exfat_path_depth
Max nested components per exFAT path.
@ k_exfat_off_file_csum
File entry: SetChecksum (2 bytes).
@ k_exfat_secflag_no_fat
GeneralSecondaryFlags: NoFatChain.
@ k_exfat_name_per_entry
UTF-16 units per file-name entry.
@ k_exfat_entry_bytes
Directory entry size.
@ k_exfat_bps_shift_min
log2(512): smallest BytesPerSectorShift.
@ k_exfat_csum_hi_bit
Wrap bit for the rotate-add checksum.
@ k_exfat_off_strm_valid
Stream entry: ValidDataLength (8 B).
@ k_exfat_off_strm_hash
Stream entry: NameHash (2 bytes).
@ k_exfat_secflag_poss
GeneralSecondaryFlags: AllocationPossible.
@ k_exfat_upc_run_tag
Up-case table: an identity run follows.
@ k_exfat_entry_eod
End-of-directory marker.
@ k_exfat_bit_shift
log2(8): cluster index -> byte.
@ k_exfat_secflag_alloc
AllocationPossible | NoFatChain.
@ k_exfat_entry_stream
Stream-extension entry.
@ k_exfat_off_file_attr
File entry: FileAttributes (2 bytes).
@ k_exfat_off_file_secnt
File entry: SecondaryCount.
@ k_exfat_name_u8_cap
That name in UTF-8: 3 * 64, plus a NUL.
@ k_exfat_max_set_bytes
(2 + ceil(64/15)) * 32 = 7 entries.
@ k_exfat_attr_archive
FileAttributes: archive.
@ k_exfat_scan_limit
Max dir entries scanned (P10 bound).
@ k_exfat_upc_words
k_exfat_fmt_upc_std_bytes / 2.
@ k_exfat_dir_grow_max
Max clusters one find-space call appends.
@ k_exfat_attr_read_only
FileAttributes: read-only.
@ k_exfat_attr_directory
FileAttributes: directory.
@ k_exfat_bit_mask
Bit index within a bitmap byte.
@ k_exfat_entry_name
File-name entry.
@ k_exfat_bps_shift_max
log2(4096): largest BytesPerSectorShift.
@ k_exfat_name_cap
Longest name we store, in UTF-16 units.
@ k_exfat_fsname_len
"EXFAT " field length.
@ k_exfat_inuse_bit
Directory entry type bit 7 = in use.
@ k_exfat_entry_file
File directory entry.
ra8_fs_mbr_off_t
Byte offsets inside an MBR partition table (when LBA 0 is not a BPB).
@ k_mbr_part_entry_count
Primary partition entries in an MBR.
@ k_mbr_off_part0_lba
Partition 0 first-LBA (4 bytes, LE).
@ k_mbr_part_entry_stride
Bytes between primary partition entries.
@ k_mbr_off_part0_type
Partition 0 type byte (0 = unused).
ra8_fs_dir_off_t
Byte offsets inside a 32-byte FAT directory entry.
@ k_dir_off_fst_clus_lo
MS FAT spec sec 6 "DIR_FstClusLO".
@ k_dir_off_attr
MS FAT spec sec 6 "DIR_Attr".
@ k_dir_off_ntres
MS FAT spec sec 6 "DIR_NTRes".
@ k_dir_name_field_len
8 + 3 raw chars (no dot).
@ k_dir_off_file_size
MS FAT spec sec 6 "DIR_FileSize".
@ k_dir_off_name
MS FAT spec sec 6 "DIR_Name" (11 bytes).
@ k_dir_off_fst_clus_hi
MS FAT spec sec 6 "DIR_FstClusHI".
ra8_fs_mbr_fmt_t
Byte offsets, field strides, and CHS constants for the MBR the exFAT formatter writes at LBA 0.
@ k_mbr_fmt_pe_lba
Entry: first LBA (4 bytes LE).
@ k_mbr_fmt_part0_off
First partition-table entry.
@ k_mbr_fmt_pe_boot
Entry: boot flag (relative).
@ k_mbr_fmt_chs_cyl_hi_mask
Cylinder bits [9:8] before packing.
@ k_mbr_fmt_pe_type
Entry: partition type byte.
@ k_mbr_fmt_chs_cyl_hi_shift
Shift packing cyl[9:8] into bits[7:6].
@ k_mbr_fmt_disk_sig_base
Arbitrary disk-signature base.
@ k_mbr_fmt_pe_nsect
Entry: sector count (4 bytes LE).
@ k_mbr_fmt_chs_spt
Conventional sectors-per-track.
@ k_mbr_fmt_chs_ovf_h
Overflow CHS head byte.
@ k_mbr_fmt_disk_sig_off
MBR disk signature (4 bytes LE).
@ k_mbr_fmt_pe_chs_start
Entry: start CHS (3 bytes).
@ k_mbr_fmt_chs_ovf_l
Overflow CHS cylinder-low byte.
@ k_mbr_fmt_chs_ovf_m
Overflow CHS sector/cyl-hi byte.
@ k_mbr_fmt_chs_heads
Conventional heads-per-cylinder.
@ k_mbr_fmt_chs_sec_mask
Low 6 bits of the CHS sector byte.
@ k_mbr_fmt_boot_none
Non-bootable partition.
@ k_mbr_fmt_pe_chs_end
Entry: end CHS (3 bytes).
@ k_mbr_fmt_type_exfat
Partition type: exFAT/NTFS/HPFS.
@ k_mbr_fmt_chs_max
1024*255*63: first LBA past CHS.
ra8_fs_sig_t
Required boot-sector signature bytes (0x55 0xAA at off 510..511).
@ k_bpb_sig_hi
Bpb sig hi.
@ k_bpb_sig_lo
Bpb sig lo.
ra8_fs_gpt_t
GPT on-disk constants (UEFI spec 2.10 ch 5 "GUID Partition Table").
@ k_gpt_entry_off_first_lba
Entry: first LBA (8 bytes LE).
@ k_gpt_header_lba
GPT header location.
@ k_gpt_off_entry_lba
Entry-array first LBA (8 bytes LE).
@ k_gpt_guid_len
Type-GUID length in an entry.
@ k_gpt_part_type_protective
MBR type byte for a GPT disk.
@ k_gpt_off_entry_size
Bytes per partition entry.
@ k_gpt_off_entry_count
Number of partition entries.
@ k_gpt_entry_scan_max
Bounded entry walk (UEFI minimum).
@ k_gpt_sig_len
"EFI PART" signature length.
@ k_gpt_entry_bytes
Standard entry size supported.
ra8_fs_sec_role_t
Index of each fixed-role sector buffer in the arena (#683).
@ k_fs_sec_role_io
Leaf data / bitmap sector transfers.
@ k_fs_sec_roles
Arena row count.
@ k_fs_sec_role_walk
Directory scans and entry read-modify-write.
@ k_fs_sec_role_fat
The sector holding a FAT entry.
@ k_fs_sec_role_fat2
FAT12 straddle: the following sector.
exfat_set_const_t
Bounds on one exFAT directory entry set.
@ k_exfat_set_min_entries
The smallest legal set: File+Stream+Name.
@ k_exfat_set_max_entries
1 File + 1 Stream + 17 Name entries.
@ k_exfat_set_writable
1 File + 1 Stream + 5 Name (64 chars).
ra8_fs_fmt_val_t
Magic values + geometry limits used by the formatter (ra8_fs_format).
@ k_fmt_f32_thr_16g
<= 16 GB -> 8 KB clusters.
@ k_fmt_fat16_entry_bytes
Bytes per FAT16 (and FAT12-sizing) entry.
@ k_fmt_f32_clus_512b
log2(512): <= 260 MB cards.
@ k_fmt_f32_thr_260m
<= 260 MB -> 512 B clusters.
@ k_fmt_media_fixed
Media descriptor: non-removable.
@ k_fmt_label_len
Volume-label field width (bytes).
@ k_fmt_num_fats
Two FAT copies, like every mkfs.
@ k_fmt_fsi_lead_sig
FSInfo lead signature "RRaA".
@ k_fmt_resv_f16
FAT12/16 reserved (boot) sectors.
@ k_fmt_sec_per_trk
Conventional CHS sectors/track.
@ k_fmt_f32_clus_8k
log2(8 KB): <= 16 GB cards.
@ k_fmt_num_heads
Conventional CHS heads.
@ k_fmt_fat32_clus_cap
Max FAT32 cluster count we accept.
@ k_fmt_f32_clus_16k
log2(16 KB): <= 32 GB cards.
@ k_fmt_root_ents_f16
FAT12/16 root-directory entries.
@ k_fmt_spc_max
Largest sectors-per-cluster we set.
@ k_fmt_fsi_trail_sig
FSInfo trailing signature.
@ k_fmt_jmp_byte1
Jump displacement (to +0x5A).
@ k_fmt_drvnum_hd
BS_DrvNum: first fixed disk.
@ k_fmt_bkboot_sector
FAT32 backup boot sector LBA.
@ k_fmt_fat32_entry_bytes
Bytes per FAT32 FAT entry.
@ k_fmt_volid_base
Arbitrary volume-serial base.
@ k_fmt_root_clus_f32
FAT32 root directory cluster.
@ k_fmt_f32_clus_32k
log2(32 KB): > 32 GB cards.
@ k_fmt_fat32_nxt_free
First allocatable FAT32 cluster.
@ k_fmt_f32_thr_32g
<= 32 GB -> 16 KB clusters.
@ k_fmt_fsi_struct_sig
FSInfo struct signature "rrAa".
@ k_fmt_f32_thr_8g
<= 8 GB -> 4 KB clusters.
@ k_fmt_fsinfo_sector
FAT32 FSInfo sector LBA.
@ k_fmt_resv_f32
FAT32 reserved sectors.
@ k_fmt_jmp_byte2
NOP padding.
@ k_fmt_ext_bootsig
Extended boot signature present.
@ k_fmt_zero_chunk_bytes
Zero-fill bounce buffer size.
@ k_fmt_f32_clus_4k
log2(4 KB): <= 8 GB cards.
@ k_fmt_jmp_byte0
Short jump opcode.
@ k_fmt_fsi_unknown
FSInfo free-count "unknown".
ra8_fs_dir_marker_t
Special markers in DIR_Name[0].
@ k_dir_marker_free_used
Slot was used, deleted.
@ k_dir_marker_kanji_e5
0xE5 in raw name, escaped.
@ k_dir_marker_free_perm
End-of-directory.
ra8_fs_cluster_t
Reserved cluster numbers used by the FAT itself.
@ k_fat12_high_nibble_mask
Untouched nibble (odd cluster).
@ k_cluster_eoc_write_fat32
Cluster eoc write fat32.
@ k_cluster_eoc_min_fat32
MS FAT spec sec 4.2 EOC threshold.
@ k_cluster_eoc_min_fat12
MS FAT spec sec 4.1 EOC threshold.
@ k_cluster_free
Cluster free.
@ k_cluster_eoc_min_fat16
MS FAT spec sec 4.1 EOC threshold.
@ k_fat12_low_nibble_mask
Untouched nibble (even cluster).
@ k_cluster_first_data
Cluster numbers start at 2.
@ k_cluster_eoc_write_exfat
exFAT spec sec 4.1 EOC marker.
@ k_cluster_eoc_write_fat16
Cluster eoc write fat16.
@ k_cluster_mask_fat32
Top 4 bits reserved on FAT32.
@ k_cluster_count_fat12_max
MS FAT spec sec 3.5 boundary.
@ k_cluster_count_fat16_max
MS FAT spec sec 3.5 boundary.
@ k_fat12_value_mask
12-bit FAT12 entry mask.
@ k_cluster_eoc_min_exfat
exFAT spec sec 4.1 EOC threshold.
@ k_cluster_eoc_write_fat12
Value we write to terminate.
ra8_fs_misc_t
Misc small constants used by parsing/formatting code.
@ k_shift_byte
Shift byte.
@ k_shift_nibble
Shift nibble.
@ k_max_8_3_name
8.3 packed length without dot.
@ k_filename_ext_len
Filename ext length.
@ k_shift_two_bytes
Shift two bytes.
@ k_filename_base_len
Filename base length.
@ k_path_max
Path maximum.
@ k_shift_word32
Shift a whole 32-bit word (u64 halves).
@ k_shift_three_bytes
Shift three bytes.
@ k_nibble_mask
Nibble mask.
@ k_byte_mask_full
Byte mask full.
@ k_dot_pos
In an 8.3 packed name, dot would go here.
ra8_fs_lfn_t
LFN directory-entry field offsets, sequence masks, and reassembly caps.
@ k_lfn_unicode_pad
Slot padding past the name terminator.
@ k_sfn_csum_high_bit
Rotate-in bit when the running sum is odd.
@ k_lfn_utf8_cap
A 247-unit name in UTF-8: 3 * 247, + NUL.
@ k_lfn_off_type
LDIR_Type – zero for a name component.
@ k_lfn_seq_order_mask
Order = seq & 0x1F (1..20).
@ k_lfn_alias_tail_max
Highest ~N probed by the alias generator.
@ k_lfn_off_checksum
Checksum of the matching 8.3 name.
@ k_lfn_write_max
Longest name we WRITE (k_lfn_max_entries).
@ k_lfn_off_seq
Sequence/order byte (LDIR_Ord).
@ k_lfn_seq_last
Set on the last logical group.
@ k_lfn_max_entries
Cap so 19*13 = 247 chars fits the buffer.
@ k_lfn_alias_base_max
Basis chars kept ahead of a one-digit ~N.
@ k_lfn_erase_max
Longest chain we ERASE (spec LDIR_Ord max).
@ k_lfn_chars_per_ent
UTF-16 chars carried per LFN entry.
@ k_lfn_off_clus_lo
LDIR_FstClusLO – must be written as 0.
ra8_fs_exfat_fmt_off_t
VBR + directory-entry byte offsets written by the exFAT formatter.
@ k_exfat_foff_drive
DriveSelect.
@ k_exfat_foff_part_off
PartitionOffset (64-bit).
@ k_exfat_de_upc_csum
Up-case entry: TableChecksum (32-bit).
@ k_exfat_foff_vol_flags
VolumeFlags (16-bit).
@ k_exfat_foff_ext_sig
ExtendedBootSignature (extended sectors).
@ k_exfat_foff_jump
JumpBoot (3 bytes).
@ k_exfat_foff_boot_sig
BootSignature 0xAA55 (16-bit).
@ k_exfat_foff_vol_len
VolumeLength (64-bit).
@ k_exfat_foff_percent
PercentInUse.
@ k_exfat_de_lbl_name
Volume-label entry: UTF-16 label.
@ k_exfat_foff_fs_rev
FileSystemRevision (16-bit).
@ k_exfat_de_third
Offset of the 3rd dir entry in a set.
@ k_exfat_foff_serial
VolumeSerialNumber (32-bit).
@ k_exfat_de_lbl_cnt
Volume-label entry: CharacterCount.
@ k_exfat_de_data_len
Bitmap/Up-case entry: DataLength (64-bit).
@ k_exfat_de_second
Offset of the 2nd dir entry in a set.
@ k_exfat_de_first_clus
Bitmap/Up-case entry: FirstCluster.
ra8_fs_bpb_off_t
Byte offsets inside a 512-byte BPB / boot sector.
@ k_bpb_off_tot_sec_32
MS FAT spec sec 3.1 "BPB_TotSec32".
@ k_bpb_off_root_ent_cnt
MS FAT spec sec 3.1 "BPB_RootEntCnt".
@ k_bpb_off_tot_sec_16
MS FAT spec sec 3.1 "BPB_TotSec16".
@ k_bpb_off_bytes_per_sec
MS FAT spec sec 3.1 "BPB_BytsPerSec".
@ k_bpb_off_signature_lo
Boot sig byte 1 (0x55).
@ k_bpb_off_num_fats
MS FAT spec sec 3.1 "BPB_NumFATs".
@ k_bpb_off_root_clus
MS FAT spec sec 3.5 "BPB_RootClus".
@ k_bpb_off_rsvd_sec_cnt
MS FAT spec sec 3.1 "BPB_RsvdSecCnt".
@ k_bpb_off_fat_sz_32
MS FAT spec sec 3.5 "BPB_FATSz32".
@ k_bpb_off_sec_per_clus
MS FAT spec sec 3.1 "BPB_SecPerClus".
@ k_bpb_off_fat_sz_16
MS FAT spec sec 3.1 "BPB_FATSz16".
@ k_bpb_off_signature_hi
Boot sig byte 2 (0xAA).
ra8_fs_ntres_t
The two case flags Windows keeps in DIR_NTRes (byte 12).
@ k_ntres_base_lower
Render DIR_Name[0..7] lower case.
@ k_ntres_ext_lower
Render DIR_Name[8..10] lower case.
ra8_fs_type_t
FAT variant detected from the BPB cluster-count rule.
@ k_ra8_fs_dir_entry_bytes
MS FAT spec sec 6 "Directory Entry".
@ k_ra8_fs_sector_max
Largest supported sector size (4Kn).
Everything decided about a new directory entry before anything is written.
uint32_t nunits
How many of units the name occupies.
uint8_t name83[k_max_8_3_name]
Packed 8.3 name, or the generated alias.
uint8_t lfn_entries
Chain slots ahead of the 8.3 entry.
uint8_t ntres
DIR_NTRes case flags for the entry.
dir_slot_t start
First slot of the reserved run.
uint16_t units[k_lfn_write_max]
The name, as UTF-16LE code units.
Identifies the directory a lookup/scan should operate in.
uint8_t is_root
1 => the volume root; 0 => the subdirectory at cluster.
uint32_t cluster
First cluster of the subdirectory (ignored when root).
The on-disk address of one 32-byte directory slot.
uint32_t off
Byte offset of the slot in that sector.
uint64_t lba
Sector holding the slot.
A directory cursor that addresses one entry, not just one sector.
dir_walk_t w
Sector-level cursor for the containing directory.
uint32_t ent
Entry index within w.cur_lba.
One resolved directory entry: where it is, and what is in it.
uint32_t off
Byte offset within that sector.
uint8_t entry[k_ra8_fs_dir_entry_bytes]
The entry as read from disk.
dir_loc_t parent
Directory the entry lives in.
uint64_t lba
Sector holding the entry.
Internal cursor used by the directory iterator.
uint32_t cluster
Current cluster (FAT32 root case).
uint32_t sector_in_cluster
0..SPC-1 inside cluster.
uint64_t cur_lba
Currently loaded LBA.
uint32_t entry_idx
Byte offset within the loaded sector.
uint32_t cluster_hops
FAT-chain follows so far (cycle guard).
uint32_t fixed_remaining
Sectors left in fixed region.
uint8_t is_root_fixed
1 = FAT12/16 fixed root dir region.
Linear cursor over a directory's 32-byte entries.
uint32_t scanned
Total entries read (P10 bound).
uint32_t cluster
Current directory cluster.
uint32_t contig_end
One past the run's last cluster; 0 => FAT.
uint32_t entry_in_cluster
Next entry index within the cluster.
Identifies the exFAT directory a lookup, scan or link operates in.
uint32_t self_cluster
Parent cluster holding this dir's File entry; 0 => root.
uint32_t cluster
First cluster of the directory.
uint32_t self_index
File-entry index within self_cluster.
uint32_t contig_end
One past the run's last cluster; 0 => FAT-chained.
Directory position (cluster + entry index) of one 32-byte entry.
uint32_t index
Entry index within that cluster (0-based).
uint32_t cluster
Directory cluster holding the entry.
In-progress reassembly of one LFN chain across the directory scan.
uint8_t checksum
8.3 checksum the chain claims.
uint8_t have
1 once any group has been accumulated.
uint16_t units[k_lfn_write_max]
Reassembled UTF-16LE units; 0 ends it.
Computed on-disk geometry for one ra8_fs_format() run.
uint32_t sectors_per_cluster
Chosen cluster size (sectors).
uint32_t bytes_per_sector
Device sector size in bytes.
uint64_t total_sectors
Whole-device sector count.
uint32_t reserved_sectors
Boot + (FAT32) FSInfo/backup region.
uint32_t count_of_clusters
Resulting data-region cluster count.
ra8_fs_type_t type
Resolved FAT variant.
uint32_t root_sectors
FAT12/16 fixed-root sector span.
uint32_t root_entries
FAT12/16 root entries (0 on FAT32).
uint32_t fat_size_sectors
Sectors per FAT copy.