mirror of
https://github.com/torlando-tech/pyxis.git
synced 2026-10-22 22:11:26 +00:00
SDArchiveFileSystem.h: split listDirectory's SPI bus mutex hold into per-entry acquire/release cycles. The previous all-or-nothing hold scaled with archive size; a directory with thousands of entries could keep the bus locked past LoRa/display's 500 ms acquire timeout (LoRa TX would fail silently, display would tear, RX FIFO could overflow under inbound flood). The new pattern records each entry's name to a std::string, releases the bus, invokes the callback (or appends), then re-acquires for the next entry. Callback runs outside the critical section. SD cursor lives in the root File so other-CS bus users (display CS, LoRa CS) between iterations don't clobber it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>