How armink/sfud works
SFUD is a portable C library for detecting and operating multiple serial SPI/QSPI flash devices. The principal workflow initializes a configured flash device, identifies its capabilities from SFDP or a fallback parameter table, then exposes read, erase, write, status, and addressing operations through a platform-supplied bus interface. The graph follows documented and excerpted relationships; port-specific wiring and some operation internals are not fully shown, so those links are omitted rather than inferred.
Main entry points: sfud.c Device Core · sfud.h SFUD API · sfud_sfdp.c SFDP Parser · sfud_port.c SPI/QSPI Port
Components 9
Public API
- SFUD API
sfud/inc/sfud.h - Device Model
sfud/inc/sfud_def.h
Device Detection
- Device Configuration
sfud/inc/sfud_cfg.h - SFDP Parser
sfud/src/sfud_sfdp.c - Flash Parameter Tables
sfud/inc/sfud_flash_def.h
Flash Operations
- Device Core
sfud/src/sfud.c
Platform Interface
- SPI/QSPI Port
sfud/port/sfud_port.c
Other components
- Library User
- Serial Flash
Connections 10
- Library User → SFUD API: calls
sfud/inc/sfud.h - SFUD API → Device Core: exposes
sfud/inc/sfud.h - SFUD API → Device Model: includes
sfud/inc/sfud.h - Device Core → Device Configuration: uses device table
- Device Core → SFDP Parser: reads parameters
sfud/src/sfud.c - Device Core → Flash Parameter Tables: falls back to
sfud/src/sfud.c - SFDP Parser → Serial Flash: reads SFDP
sfud/src/sfud_sfdp.c - Device Core → SPI/QSPI Port: uses bus callbacks
- SPI/QSPI Port → Serial Flash: communicates
- Device Core → Serial Flash: reads, erases, writes