|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Everything decided about a new directory entry before anything is written. More...
#include <ra8_fs_fat_types_internal.h>
Data Fields | |
| dir_slot_t | start |
| First slot of the reserved run. | |
| uint16_t | units [k_lfn_write_max] |
| The name, as UTF-16LE code units. | |
| 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 | ntres |
| DIR_NTRes case flags for the entry. | |
| uint8_t | lfn_entries |
| Chain slots ahead of the 8.3 entry. | |
Everything decided about a new directory entry before anything is written.
Adding an entry is split into a reservation and a commit so the caller can fail on a full directory BEFORE it allocates a cluster for the thing it was about to file: mkdir reserves, then allocates, then commits, and a directory with no room left costs no cluster. It also means the alias probing and the free-run search – the only two parts that read the directory – happen exactly once.
The name travels as CODE UNITS rather than as a pointer to the caller's UTF-8. Decoding once, in priv_dir_reserve(), is what lets the commit fill slots without re-deriving a length – and it removes the old rule that the caller's buffer had to outlive the commit.
Definition at line 658 of file ra8_fs_fat_types_internal.h.
| uint8_t dir_insert_t::lfn_entries |
Chain slots ahead of the 8.3 entry.
Definition at line 664 of file ra8_fs_fat_types_internal.h.
Referenced by priv_dir_commit(), and priv_dir_reserve().
| uint8_t dir_insert_t::name83[k_max_8_3_name] |
Packed 8.3 name, or the generated alias.
Definition at line 662 of file ra8_fs_fat_types_internal.h.
Referenced by priv_dir_commit(), and priv_dir_reserve().
| uint8_t dir_insert_t::ntres |
DIR_NTRes case flags for the entry.
Definition at line 663 of file ra8_fs_fat_types_internal.h.
Referenced by priv_dir_commit(), and priv_dir_reserve().
| uint32_t dir_insert_t::nunits |
How many of units the name occupies.
Definition at line 661 of file ra8_fs_fat_types_internal.h.
Referenced by priv_dir_commit(), and priv_dir_reserve().
| dir_slot_t dir_insert_t::start |
First slot of the reserved run.
Definition at line 659 of file ra8_fs_fat_types_internal.h.
Referenced by priv_dir_commit(), and priv_dir_reserve().
| uint16_t dir_insert_t::units[k_lfn_write_max] |
The name, as UTF-16LE code units.
Definition at line 660 of file ra8_fs_fat_types_internal.h.
Referenced by priv_dir_commit(), and priv_dir_reserve().