ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
fw_if_fs_types.h
Go to the documentation of this file.
1
20
21#pragma once
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include <stddef.h>
28#include <stdint.h>
29
30#include "ra8_err.h"
31
33typedef enum : uint16_t {
36
45
53
59
101
117
119typedef struct {
120 uint32_t nanosecond;
121 uint16_t year;
123 uint8_t month;
124 uint8_t day;
125 uint8_t hour;
126 uint8_t minute;
127 uint8_t second;
129
141
151
153typedef struct {
154 const char* name;
155 uint64_t size_bytes;
156 uint16_t name_bytes;
159
167
169typedef struct {
170 uint64_t total_bytes;
171 uint64_t free_bytes;
172 uint64_t used_bytes;
174
182typedef ra8_err_t (*fw_fs_list_fn_t)(void* ctx, const fw_fs_dirent_t* entry, bool* out_continue);
183
187
194
201
208
216
218typedef struct {
220 void* ctx;
221 void* state;
222 uint32_t state_bytes;
223 bool is_open;
225
235
237typedef struct {
239 void* ctx;
240 void* state;
241 uint32_t state_bytes;
242 bool active;
245
252typedef ra8_err_t (*fw_fs_validate_fn_t)(void* ctx, fw_fs_file_t* staged);
253
254#ifdef __cplusplus
255}
256#endif
fw_fs_node_type_t
Filesystem node kind reported by fw_fs_stat.
@ k_fw_fs_node_none
No node exists at the path.
@ k_fw_fs_node_directory
Directory.
@ k_fw_fs_node_file
Regular byte stream.
@ k_fw_fs_node_other
Backend-specific non-file node.
@ k_fw_fs_node_symlink
Symbolic link, if observable.
struct fw_fs_stream_iface fw_fs_stream_iface_t
struct fw_fs_transaction_iface fw_fs_transaction_iface_t
ra8_err_t(* fw_fs_validate_fn_t)(void *ctx, fw_fs_file_t *staged)
Validate staged bytes through a read-only generic file handle.
fw_fs_limits_t
Interface-wide hard bounds used before a backend is called.
@ k_fw_fs_path_cap
Largest portable path including its NUL.
struct fw_fs_namespace_iface fw_fs_namespace_iface_t
fw_fs_open_mode_t
Open intent for fw_fs_open.
@ k_fw_fs_open_create_new
Create only when leaf is absent.
@ k_fw_fs_open_append
Create/append, write-only.
@ k_fw_fs_open_read
Existing file, read-only.
@ k_fw_fs_open_write_truncate
Create/truncate, write-only.
ra8_err_t(* fw_fs_list_fn_t)(void *ctx, const fw_fs_dirent_t *entry, bool *out_continue)
Bounded list callback.
fw_fs_transaction_policy_t
Destination policy for a staged transaction.
@ k_fw_fs_txn_create_new
Commit only when destination is absent.
@ k_fw_fs_txn_replace_atomic
Atomically replace an existing file.
fw_fs_capability_t
Capability bits returned in fw_fs_caps_t.flags.
@ k_fw_fs_cap_durable_directory_sync
Namespace changes can be made durable.
@ k_fw_fs_cap_durable_file_sync
Successful file sync reaches durable media.
@ k_fw_fs_cap_symlinks
Symbolic links may be represented by the backend.
@ k_fw_fs_cap_stream
Regular-file stream operations are available.
@ k_fw_fs_cap_case_sensitive
Path-component comparisons are case-sensitive.
@ k_fw_fs_cap_namespace
Metadata and namespace operations are available.
@ k_fw_fs_cap_space_query
Volume capacity and available bytes can be queried.
@ k_fw_fs_cap_rejects_symlink_walk
Path traversal refuses symbolic-link components.
@ k_fw_fs_cap_removable_media
The backing volume may disappear at runtime.
@ k_fw_fs_cap_same_volume_rename
Rename is supported within one backend volume.
@ k_fw_fs_cap_modified_time
Modification timestamps may be reported as valid.
@ k_fw_fs_cap_create_exclusive
Open can atomically require that its leaf be absent.
@ k_fw_fs_cap_file_sync
An explicit file-sync operation is available.
@ k_fw_fs_cap_accessed_time
Access timestamps may be reported as valid.
@ k_fw_fs_cap_atomic_noreplace
Rename can atomically reject an existing destination.
@ k_fw_fs_cap_created_time
Creation timestamps may be reported as valid.
@ k_fw_fs_cap_thread_safe
Independent calls may execute concurrently.
@ k_fw_fs_cap_transactions
Staged publication operations are available.
@ k_fw_fs_cap_atomic_replace
Rename can atomically replace an existing destination.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
Static properties and workspace requirements of one bound port.
uint16_t name_max_bytes
Component bytes excluding NUL.
uint8_t directory_workspace_align
Required directory-state alignment.
uint16_t path_max_bytes
Path bytes including NUL.
uint32_t file_workspace_bytes
State bytes required by open.
uint16_t max_open_files
Concurrent backend file limit.
uint64_t max_file_bytes
Largest supported regular file.
uint8_t transaction_workspace_align
Required transaction alignment.
uint16_t max_open_directories
Concurrent directory cursors.
uint32_t directory_workspace_bytes
State bytes required by dir open.
uint8_t file_workspace_align
Required file-state alignment.
uint32_t flags
OR of fw_fs_capability_t.
uint32_t transaction_workspace_bytes
State bytes required by begin.
Backend-neutral civil time with nanosecond precision.
uint16_t year
Full civil year.
int16_t utc_offset_min
Offset from UTC when the validity flag is set.
uint8_t month
Month, 1..12.
uint32_t nanosecond
Fraction within second, 0..999,999,999.
uint8_t second
Second, 0..59.
uint8_t day
Day, 1..31.
uint8_t hour
Hour, 0..23.
uint8_t minute
Minute, 0..59.
Caller-owned open directory cursor; fields are private to the facade.
void * state
Caller workspace.
void * ctx
Adapter context.
uint32_t state_bytes
Workspace extent.
fw_fs_caps_t caps
Immutable port caps.
bool is_open
Facade lifecycle guard.
const fw_fs_namespace_iface_t * iface
Bound namespace vtable.
One directory entry, valid only for the callback invocation.
uint16_t name_bytes
Bytes excluding the NUL.
fw_fs_node_type_t type
Entry kind.
const char * name
NUL-terminated leaf name.
uint64_t size_bytes
File length; zero for directories.
Stable caller-owned value returned by fw_fs_dir_next.
uint64_t size_bytes
File length; zero for dirs.
uint16_t name_bytes
Bytes excluding the NUL.
fw_fs_node_type_t type
Entry kind.
char name[k_fw_fs_path_cap]
Copied NUL-terminated leaf.
Caller-owned open file; fields are private to the facade.
const fw_fs_stream_iface_t * iface
Bound stream vtable.
void * state
Caller workspace.
void * ctx
Adapter context.
bool is_open
Facade lifecycle guard.
uint32_t state_bytes
Workspace extent.
Namespace backend operations.
Independently injectable path/namespace facade.
fw_fs_caps_t caps
Immutable capabilities.
void * ctx
Backend context.
const fw_fs_namespace_iface_t * iface
Bound private vtable.
Portable volume usage snapshot.
uint64_t free_bytes
Bytes available to new data.
uint64_t total_bytes
Addressable data bytes.
uint64_t used_bytes
Allocated bytes.
Result of a portable metadata query.
fw_fs_timestamp_t created
Creation/birth time, when supported.
uint64_t size_bytes
File length; zero for a directory.
fw_fs_timestamp_t accessed
Last access time, when supported.
bool exists
False means a clean lookup miss.
fw_fs_node_type_t type
Kind of node at the path.
fw_fs_timestamp_t modified
Content modification time, when supported.
Open-file backend operations over caller-supplied state.
Independently injectable open-stream facade.
fw_fs_caps_t caps
Immutable capabilities.
void * ctx
Backend context.
const fw_fs_stream_iface_t * iface
Bound private vtable.
One complete composition-root filesystem binding.
fw_fs_stream_port_t streams
Byte-stream operations.
fw_fs_caps_t caps
Shared capabilities.
fw_fs_namespace_t names
Namespace operations.
fw_fs_transaction_port_t transactions
Staged publication.
One portable timestamp and independent availability facts.
fw_fs_datetime_t value
Decoded civil date and time.
bool utc_offset_valid
True when utc_offset_min is known.
bool valid
True when the field is meaningful.
Staged-publication backend operations over caller-supplied state.
Independently injectable staged-transaction facade.
fw_fs_caps_t caps
Immutable capabilities.
const fw_fs_transaction_iface_t * iface
Bound private vtable.
void * ctx
Backend context.
Caller-owned transaction; fields are private to the facade.
void * ctx
Adapter context.
const fw_fs_transaction_iface_t * iface
Bound vtable.
void * state
Caller workspace.
uint32_t state_bytes
Workspace extent.
bool validated
Stage was accepted.
bool active
Begin succeeded.