Followup to LVGL patch (#18920)

2.0.x
Victor Oliveira 4 years ago committed by Scott Lahteine
parent 38a24ce6c9
commit 1a50260ebd

@ -24,12 +24,13 @@
#if HAS_TFT_LVGL_UI
#include "../../../../inc/MarlinConfig.h"
#include "SPIFlashStorage.h"
uint8_t SPIFlashStorage::::m_pageData[SPI_FLASH_PageSize];
uint32_t SPIFlashStorage::::m_currentPage;
uint16_t SPIFlashStorage::::m_pageDataUsed;
uint32_t SPIFlashStorage::::m_startAddress;
uint8_t SPIFlashStorage::m_pageData[SPI_FLASH_PageSize];
uint32_t SPIFlashStorage::m_currentPage;
uint16_t SPIFlashStorage::m_pageDataUsed;
uint32_t SPIFlashStorage::m_startAddress;
#if HAS_SPI_FLASH_COMPRESSION
@ -291,7 +292,7 @@ void SPIFlashStorage::beginRead(uint32_t startAddress) {
uint16_t SPIFlashStorage::outData(uint8_t* data, uint16_t size) {
// Don't read more than we have
NOMORE(size > pageDataFree());
NOMORE(size, pageDataFree());
memcpy(data, m_pageData + m_pageDataUsed, size);
m_pageDataUsed += size;
return size;

@ -79,7 +79,7 @@ public:
static void endWrite();
static void writeData(uint8_t* data, uint16_t size);
static // Read operation
// Read operation
static void beginRead(uint32_t startAddress);
static void readData(uint8_t* data, uint16_t size);

@ -482,7 +482,7 @@ uint8_t public_buf[512];
if (card.longFilename[0] == '.') continue;
int8_t a = arrayFindStr(assets, COUNT(assets), card.longFilename);
if (a >= 0 && a < COUNT(assets)) {
if (a >= 0 && a < (int8_t)COUNT(assets)) {
uint8_t assetType = ASSET_TYPE_ICON;
if (strstr(assets[a], "_logo"))
assetType = ASSET_TYPE_LOGO;
@ -498,7 +498,7 @@ uint8_t public_buf[512];
#if HAS_SPI_FLASH_FONT
a = arrayFindStr(fonts, COUNT(fonts), card.longFilename);
if (a >= 0 && a < COUNT(fonts))
if (a >= 0 && a < (int8_t)COUNT(fonts))
loadAsset(dir, d, fonts[a], ASSET_TYPE_FONT);
#endif
}

Loading…
Cancel
Save