Nexus Embedded Platform 1.0.0
Statically assembled reusable embedded mechanisms
Loading...
Searching...
No Matches
flash_storage.h File Reference

Explicit physical Flash-region adapter without global registry. More...

Go to the source code of this file.

Data Structures

struct  nx_flash_storage_adapter_t
 Caller-owned adapter, no dynamic binding or global token lookup. More...

Functions

nx_result_t nx_flash_storage_bind (nx_flash_storage_adapter_t *adapter, nx_flash_region_t region, nx_time_us_t deadline, nx_storage_port_t *port)
 Bind an explicit writable uniform-erase physical region.
void nx_flash_storage_set_deadline (nx_flash_storage_adapter_t *adapter, nx_time_us_t deadline)
 Set the next transaction's one absolute mutation deadline.

Detailed Description

Explicit physical Flash-region adapter without global registry.

Author
Nexus Team

Definition in file flash_storage.h.

Function Documentation

◆ nx_flash_storage_bind()

nx_result_t nx_flash_storage_bind ( nx_flash_storage_adapter_t * adapter,
nx_flash_region_t region,
nx_time_us_t deadline,
nx_storage_port_t * port )

Bind an explicit writable uniform-erase physical region.

Parameters
[out]adapterUnused caller storage kept through all store calls
[in]regionExternally selected writable physical region
[in]deadlineAbsolute whole-transaction deadline for mutations
[out]portNarrow synchronous persistent port, valid on SUCCESS
Returns
SUCCESS or INVALID/PERMISSION/UNSUPPORTED geometry error
Note
Task-only, serialized caller. No region is reserved by the platform. Mixed sector geometries require another explicit storage adapter; this one rejects them. IO pulse settlement guarantees sync durability; no caller buffer survives a port call. Physical power-loss remains unqualified.

◆ nx_flash_storage_set_deadline()

void nx_flash_storage_set_deadline ( nx_flash_storage_adapter_t * adapter,
nx_time_us_t deadline )

Set the next transaction's one absolute mutation deadline.

Parameters
[in,out]adapterBound adapter with no active store operation
[in]deadlineAbsolute deadline in nx_time_now_us domain
Note
Caller serializes and sets this before open/save/recovery. Per-pulse timeouts cannot preempt hardware pulses; IO settles before return.