Changelog¶
What changed in each release of the driver. Entries marked BREAKING need source changes in code that used the affected API.
Unreleased¶
Added¶
WaitReady(timeout_ms): polls RDSR until RDY clears,Timeoutafter the budget (defaultkWriteCycleTimeoutMs= 10 ms, twice the 5 ms tWC).Write(addr, src, len): any range inside the array, split at 8-byte page boundaries, waiting after each page.WriteDisable()(WRDI),SetBlockProtection(level)(WREN + WRSR + write cycle) andGetBlockProtection(level), withenum class at25040::BlockProtect { None, UpperQuarter, UpperHalf, All }.cmake --installsupport: the headers, the generatedat25040_version.hand afind_package(hf_at25040)package exportinghf::at25040, checked by thehf_at25040_install_consumertest.- Optional port hook
void delay_us(uint32_t us), detected at compile time:WaitReady()sleeps 100 µs between polls when it is there, and polls a bounded number of times when it is not. - Host unit tests (
-DHF_AT25040_BUILD_TESTS=ON) against a model of the AT25040B, and a CI workflow.
Changed¶
- BREAKING (behaviour):
Read(),WritePage(),Write(),WriteEnable(),WriteDisable()andSetBlockProtection()read the status register first and returnStatus::Busywithout sending anything else while a write cycle runs; the chip would ignore the instruction.Busyused to come only fromProbe(). A read on a floating MISO (0xFF) now returnsBusyinstead ofOkwith0xFFdata. - BREAKING (behaviour):
WritePage()waits for the internal write cycle before it returns (up to 5 ms, at most 10 ms before it gives up withTimeout). It used to return as soon as the data was sent, so a following call inside tWC was silently ignored by the chip. Polling loops afterWritePage()still work but are no longer needed.Timeoutnow also means "write cycle did not end within the budget". Read()returns every byte requested. It used to shorten anylenabove 16 to 16 and still returnOk; it now splits the range into READ transactions of up toDevice::kReadChunkBytes(16) data bytes, recomputes A8 for each, and returnsArgfor a range past0x1FF. Code that read in 16-byte chunks keeps working.- Documentation moved to the HardFOC MkDocs platform: standard page set (quickstart, hardware, architecture, API
guide, porting, testing), code snippets compiled by the host build from
tests/docs/, Doxygen under/api/, versioned with mike. The Jekyll site files and the doxygen-awesome submodule are gone.
1.0.0¶
Added¶
at25040::Device<Spi>:Probe(),ReadStatus(),Read(),WriteEnable(),WritePage(),LastRdsr().at25040::SpiInterface<Derived>CRTP contract, opcodes and status bits inat25040_registers.hpp.- CMake build settings with a generated version header, ESP-IDF component wrapper and ESP32 example.