mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 05:36:37 +00:00
Allow override of LV_MEM_SIZE and LV_VDB_SIZE
This commit is contained in:
parent
d1a7975347
commit
6943f6ed5c
@ -85,11 +85,27 @@ typedef int16_t lv_coord_t;
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP8266)
|
||||
# define LV_MEM_SIZE (10 * 1024U) // Minimum 10 Kb
|
||||
#elif defined(ARDUINO_ARCH_ESP32)
|
||||
# define LV_MEM_SIZE (48 * 1024U) // 48Kb is much better
|
||||
#else
|
||||
# define LV_MEM_SIZE (20 * 1024U) // 20Kb is much better
|
||||
# define LV_MEM_SIZE (64 * 1024U) // native app
|
||||
#endif
|
||||
|
||||
#endif // LV_MEM_SIZE
|
||||
|
||||
#ifndef LV_VDB_SIZE
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP8266)
|
||||
# define LV_VDB_SIZE (10 * 1024U) // Minimum 10 Kb
|
||||
#elif defined(ARDUINO_ARCH_ESP32)
|
||||
# define LV_VDB_SIZE (32 * 1024U) // 32kB draw buffer
|
||||
#else
|
||||
# define LV_VDB_SIZE (64 * 1024U) // native app
|
||||
#endif
|
||||
|
||||
#endif // LV_VDB_SIZE
|
||||
|
||||
|
||||
/* Complier prefix for a big array declaration */
|
||||
# define LV_MEM_ATTR
|
||||
|
||||
|
@ -702,7 +702,11 @@ void hasp_get_info(JsonDocument& doc)
|
||||
itoa(sec, size_buf, DEC);
|
||||
buffer += size_buf;
|
||||
buffer += "s";
|
||||
info[F(D_INFO_ENVIRONMENT)] = PIOENV;
|
||||
info[F(D_INFO_UPTIME)] = buffer;
|
||||
hasp_get_sleep_state(size_buf);
|
||||
info[F("Idle")] = size_buf;
|
||||
info[F("Active Page")] = haspPages.get();
|
||||
|
||||
info = doc.createNestedObject(F(D_INFO_DEVICE_MEMORY));
|
||||
Parser::format_bytes(haspDevice.get_free_heap(), size_buf, sizeof(size_buf));
|
||||
@ -728,11 +732,6 @@ void hasp_get_info(JsonDocument& doc)
|
||||
Parser::format_bytes(mem_mon.free_size, size_buf, sizeof(size_buf));
|
||||
info[F(D_INFO_FREE_MEMORY)] = size_buf;
|
||||
info[F(D_INFO_FRAGMENTATION)] = mem_mon.frag_pct;
|
||||
|
||||
info = doc.createNestedObject(F("HASP State"));
|
||||
hasp_get_sleep_state(size_buf);
|
||||
info[F("Idle")] = size_buf;
|
||||
info[F("Active Page")] = haspPages.get();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -14,8 +14,6 @@ build_flags =
|
||||
-D NO_GLOBAL_HTTPUPDATE ; dont instantiate httpUpdate
|
||||
;-D CONFIG_NEWLIB_NANO_FORMAT
|
||||
; -- lvgl build options -----------------------------
|
||||
-D LV_MEM_SIZE=49152U ; 48 kB lvgl memory
|
||||
-D LV_VDB_SIZE=32768U ; 32kB draw buffer
|
||||
-D LV_ATTRIBUTE_FAST_MEM=IRAM_ATTR
|
||||
-D LV_ATTRIBUTE_TASK_HANDLER=IRAM_ATTR
|
||||
;-D LV_FS_PC_PATH="//littlefs" ; this needs to match the vfs mount pount
|
||||
|
Loading…
x
Reference in New Issue
Block a user