How libdriver/w25qxx works
LibDriver W25QXX is an embedded C driver for serial flash, exposing basic and advanced operations through a platform-linked SPI/QSPI interface. The documented workflow initializes the driver, performs device identification and flash reads or writes, then deinitializes it; advanced operations include erase, status, power, and protection controls. Board projects provide command or shell entry points and hardware adapters. The README establishes broader capabilities; sampled excerpts show representative application calls and callback-link definitions, not the complete driver or adapter implementations.
Main entry points: driver_w25qxx.h Driver API · driver_w25qxx_interface.h SPI/QSPI contract · raspberrypi4b_driver_w25qxx_interface.c Raspberry Pi adapter · stm32f407_driver_w25qxx_interface.c STM32F407 adapter
Components 15
Flash driver
- Driver API
src/driver_w25qxx.h - Flash operations
src/driver_w25qxx.c - SPI/QSPI contract
interface/driver_w25qxx_interface.h - Interface template
interface/driver_w25qxx_interface_template.c
Platform adapters
- Raspberry Pi adapter
project/raspberrypi4b/driver/src/raspberrypi4b_driver_w25qxx_interface.c - Raspberry Pi SPI
project/raspberrypi4b/interface/src/spi.c - STM32F407 adapter
project/stm32f407/driver/src/stm32f407_driver_w25qxx_interface.c - STM32F407 SPI
project/stm32f407/interface/src/spi.c - STM32F767 adapter
project/stm32f767/driver/src/stm32f767_driver_w25qxx_interface.c - STM32F767 QSPI
project/stm32f767/interface/src/qspi.c
Board applications
- Raspberry Pi CLI
project/raspberrypi4b/src/main.c - STM32F407 shell
project/stm32f407/usr/src/main.c - STM32F767 shell
project/stm32f767/usr/src/main.c
Other components
- Application user
- W25QXX flash
Connections 17
- Application user → Raspberry Pi CLI: runs commands
- Application user → STM32F407 shell: uses shell
- Application user → STM32F767 shell: uses shell
- Raspberry Pi CLI → Driver API: calls operations
- STM32F407 shell → Driver API: calls operations
- STM32F767 shell → Driver API: calls operations
- Driver API → Flash operations: declares API
- Flash operations → SPI/QSPI contract: dispatches callbacks
- Raspberry Pi adapter → SPI/QSPI contract: implements
- STM32F407 adapter → SPI/QSPI contract: implements
- STM32F767 adapter → SPI/QSPI contract: implements
- Raspberry Pi adapter → Raspberry Pi SPI: transfers SPI
- STM32F407 adapter → STM32F407 SPI: transfers SPI
- STM32F767 adapter → STM32F767 QSPI: transfers QSPI
- Raspberry Pi SPI → W25QXX flash: exchanges data
- STM32F407 SPI → W25QXX flash: exchanges data
- STM32F767 QSPI → W25QXX flash: exchanges data