ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
lfn_state_t Struct Reference

In-progress reassembly of one LFN chain across the directory scan. More...

#include <ra8_fs_fat_types_internal.h>

Data Fields

uint16_t units [k_lfn_write_max]
 Reassembled UTF-16LE units; 0 ends it.
uint8_t checksum
 8.3 checksum the chain claims.
uint8_t have
 1 once any group has been accumulated.

Detailed Description

In-progress reassembly of one LFN chain across the directory scan.

The name accumulates as UTF-16 CODE UNITS, which is what the slots carry, and is converted to UTF-8 only where a caller is handed it. Holding it as char was the shape that forced the old reader to substitute ? for every unit above 0x7F: a group writes at a fixed UNIT offset, and no byte-indexed buffer can take a variable-width encoding at a fixed index (#606).

A unit of zero terminates the name, exactly as the NUL did before, which is why priv_lfn_reset() clears the whole array: a group that never arrived leaves zeros, and the name stops there rather than running on into another chain's characters.

Invariant
units holds at most k_lfn_write_max units, the same cap the write side enforces, so a name that fits on disk fits here.
See also
priv_lfn_add()
Since
0.1.0

Definition at line 553 of file ra8_fs_fat_types_internal.h.

Field Documentation

◆ checksum

uint8_t lfn_state_t::checksum

8.3 checksum the chain claims.

Definition at line 555 of file ra8_fs_fat_types_internal.h.

Referenced by priv_lfn_add(), priv_lfn_reset(), and priv_lfn_units_for().

◆ have

uint8_t lfn_state_t::have

1 once any group has been accumulated.

Definition at line 556 of file ra8_fs_fat_types_internal.h.

Referenced by priv_lfn_add(), priv_lfn_reset(), and priv_lfn_units_for().

◆ units

uint16_t lfn_state_t::units[k_lfn_write_max]

Reassembled UTF-16LE units; 0 ends it.

Definition at line 554 of file ra8_fs_fat_types_internal.h.

Referenced by priv_lfn_add(), priv_lfn_reset(), and priv_lfn_units_for().


The documentation for this struct was generated from the following file: