SmingHub / Sming

Sming - powerful open source framework simplifying the creation of embedded C++ applications.
https://sming.readthedocs.io
GNU Lesser General Public License v3.0
1.47k stars 348 forks source link

Refactor spi flash code #2810

Closed mikee47 closed 3 months ago

mikee47 commented 3 months ago

This PR tidies up the flash memory code and adds the flash_addr_t and flash_sector_t types. In paricular, flash_addr_t defines flash addresses as uintptr_t rather than uint32_t. The primary reason for this is that host builds emulate flash addresses using memory pointers.

The main flash interface definitions are in Sming/Components/arch_driver/src/include/flashmem.h. The arch header files esp_spi_flash.h include this after any arch-specific definitions.

Other changes: