Module ble

Module ble 

Source
Expand description

Power-loss-safe BLE security snapshot encoding.

Fixed-size snapshots (pairing PIN, local IRK, bonds) written through the shared record engine. Which two pages the journal owns is the firmware’s memory-map decision.

Structs§

Snapshot
StoredBond

Enums§

BondUpsert
Outcome of upsert_bond.

Constants§

COMMIT_OFFSET
MAX_BONDS
SLOT_SIZE

Functions§

consider_snapshot
Consider one journal slot while mounting without retaining its flash buffer.
touch_bond
Move the bond matching address_kind + address to the MRU end, if present and not already there. Returns true when the order changed (and the caller should persist), false when the bond was already MRU or is not stored at all.
upsert_bond
Insert or refresh bond in bonds, which is kept ordered least-recently-used-first / most-recently-used-last (index 0 is the eviction candidate). A bond matching by address_kind + address is refreshed in place and moved to the MRU end; a new bond is appended at the MRU end, evicting the current LRU entry first if the list is full.