|
@@ -24,12 +24,13 @@
|
24
|
24
|
|
25
|
25
|
#if HAS_TFT_LVGL_UI
|
26
|
26
|
|
|
27
|
+#include "../../../../inc/MarlinConfig.h"
|
27
|
28
|
#include "SPIFlashStorage.h"
|
28
|
29
|
|
29
|
|
-uint8_t SPIFlashStorage::::m_pageData[SPI_FLASH_PageSize];
|
30
|
|
-uint32_t SPIFlashStorage::::m_currentPage;
|
31
|
|
-uint16_t SPIFlashStorage::::m_pageDataUsed;
|
32
|
|
-uint32_t SPIFlashStorage::::m_startAddress;
|
|
30
|
+uint8_t SPIFlashStorage::m_pageData[SPI_FLASH_PageSize];
|
|
31
|
+uint32_t SPIFlashStorage::m_currentPage;
|
|
32
|
+uint16_t SPIFlashStorage::m_pageDataUsed;
|
|
33
|
+uint32_t SPIFlashStorage::m_startAddress;
|
33
|
34
|
|
34
|
35
|
#if HAS_SPI_FLASH_COMPRESSION
|
35
|
36
|
|
|
@@ -291,7 +292,7 @@ void SPIFlashStorage::beginRead(uint32_t startAddress) {
|
291
|
292
|
|
292
|
293
|
uint16_t SPIFlashStorage::outData(uint8_t* data, uint16_t size) {
|
293
|
294
|
// Don't read more than we have
|
294
|
|
- NOMORE(size > pageDataFree());
|
|
295
|
+ NOMORE(size, pageDataFree());
|
295
|
296
|
memcpy(data, m_pageData + m_pageDataUsed, size);
|
296
|
297
|
m_pageDataUsed += size;
|
297
|
298
|
return size;
|