From a461d2c18acb6681e774559fbeef416f61663357 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Mon, 13 Jun 2022 00:12:36 +0300 Subject: [PATCH] board: fix 2.7.4 build --- code/espurna/board.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/espurna/board.cpp b/code/espurna/board.cpp index 707f76a5..083bc630 100644 --- a/code/espurna/board.cpp +++ b/code/espurna/board.cpp @@ -415,7 +415,10 @@ void boardSetup() { // TODO: also check the next sector? both look like dupes const uint32_t Sector { (ESP.getFlashChipSize() / FLASH_SECTOR_SIZE) - 3 }; - static constexpr size_t Size { FLASH_PAGE_SIZE }; + static constexpr size_t Size { 256 }; +#ifdef FLASH_PAGE_SIZE + static_assert(FLASH_PAGE_SIZE == Size, ""); +#endif alignas(alignof(uint32_t)) uint8_t page[Size]; if (ESP.flashRead(Sector, reinterpret_cast(&page), Size)) {