Ken Van Hoeylandt 0ebd471cc0
Reduce internal RAM use: embedded assets, fonts in flash, PSRAM stacks, file_ops (#701)
- The `/system` FAT volume is removed. Its files are embedded in the firmware as generated C arrays.
- Default-size fonts are generated at build time and used from flash.
- The LVGL task and the Launcher run on PSRAM-preferred stacks. A new kernel `file_ops` API takes the file work off those threads.
- `MainDispatcher` is reimplemented as an on-demand task.
- More long-lived state is allocated with the PSRAM-preferring helpers.
- Other fixes and improvements
2026-10-18 17:30:43 +02:00

46 lines
1.2 KiB
C

// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <lvgl.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Amount of spinner images. The sizes in pixels are 12, 16, 20, 24, 32, 36 and 40 */
#define LVGL_UI_SPINNER_COUNT 7
/** Amount of cursor images. The sizes in pixels are 12, 16, 20, 24, 32 and 40 */
#define LVGL_UI_CURSOR_COUNT 6
/**
* @brief PNG images for the spinner and the mouse cursor, ordered by size.
* The arrays have LVGL_UI_SPINNER_COUNT and LVGL_UI_CURSOR_COUNT entries and must stay valid forever.
*/
struct LvglUiAssets {
const lv_image_dsc_t* spinner;
const lv_image_dsc_t* cursor;
};
/**
* @brief Sets the images that the spinner and cursor getters pick from.
* @param[in] assets the images, copied by reference
*/
void lvgl_ui_assets_configure(const struct LvglUiAssets* assets);
/**
* @brief Gets the spinner image that fits the default text size best.
* @return an image for lv_image_set_src(), or NULL when not configured
*/
const lv_image_dsc_t* lvgl_get_spinner_image(void);
/**
* @brief Gets the mouse cursor image that fits the default text size best.
* @return an image for lv_image_set_src(), or NULL when not configured
*/
const lv_image_dsc_t* lvgl_get_cursor_image(void);
#ifdef __cplusplus
}
#endif