Skip to content

Develop/nn#3

Merged
00lllooolll00 merged 12 commits into
masterfrom
develop/nn
Jan 31, 2026
Merged

Develop/nn#3
00lllooolll00 merged 12 commits into
masterfrom
develop/nn

Conversation

@00lllooolll00

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings January 31, 2026 07:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR backports / refactors the LVGL integration towards the 8.x API style, simplifies the build integration, and extends the HAL and memory utilities.

Changes:

  • Reworks LVGL core headers and sources (events, display, input, groups, styles, drawing) to a different API surface and build layout.
  • Adjusts build and packaging infrastructure (CMake, Zephyr, ESP, Micropython, GitHub Actions) to the new LVGL structure.
  • Extends and refactors local utilities and HAL (TLSF-backed ek_mem wrappers, new I2C HAL, minor SPI updates) and adds LVGL documentation in multiple languages.

Reviewed changes

Copilot reviewed 61 out of 961 changed files in this pull request and generated 23 comments.

Show a summary per file
File Description
L3_Middlewares/LVGL/src/core/lv_obj_style.h Refactors style-related types/APIs, adds internal structs and helpers.
L3_Middlewares/LVGL/src/core/lv_obj_scroll.h Updates scroll enums, types, and prototypes to new object forward-decl pattern.
L3_Middlewares/LVGL/src/core/lv_obj_pos.h Changes layout/position APIs and introduces layout registration helpers.
L3_Middlewares/LVGL/src/core/lv_obj_draw.h Consolidates draw includes, defines draw-part descriptor, and exposes ext-draw helpers.
L3_Middlewares/LVGL/src/core/lv_indev_scroll.h Switches scroll helpers to new indev proc type and include path.
L3_Middlewares/LVGL/src/core/lv_indev.h Introduces a new public input-device API surface.
L3_Middlewares/LVGL/src/core/lv_event.h / lv_event.c Reimplements the event system around lv_event_t and lv_event_send.
L3_Middlewares/LVGL/src/core/lv_disp.h / lv_disp.c Adds display API (screen management, background, inactivity, invalidation).
L3_Middlewares/LVGL/src/core/lv_group.h / lv_group.c Reworks focus group implementation and API names.
L3_Middlewares/LVGL/src/core/lv_core.mk Adds a core source list for LVGL builds.
L3_Middlewares/LVGL/lvgl.h Reorganizes top-level LVGL includes and version macros.
L3_Middlewares/LVGL/env_support/cmake/*.cmake Simplifies version handling and platform integration (Zephyr, Micropython, ESP, custom).
L3_Middlewares/LVGL/doc/README*.md Adds/updates multi-language LVGL README documentation.
L2_Core/utils/src/ek_mem.c / inc/ek_mem.h Wraps TLSF allocators with overridable APIs and adjusts heap macros.
L2_Core/hal/src/ek_hal_spi.c Minor cleanup and comments in SPI HAL stub.
L2_Core/hal/src/ek_hal_i2c.c / inc/ek_hal_i2c.h Introduces a new I2C HAL abstraction with locking and list registration.
.github/workflows/build.yml Simplifies CI matrix by removing LVGL ThorVG combinations.
L3_Middlewares/CMakeLists.txt Removes ThorVG option and links LVGL more simply.
L3_Middlewares/LVGL/CMakeLists.txt Simplifies LVGL top-level CMake config and removes version.cmake usage.
Comments suppressed due to low confidence (2)

L3_Middlewares/LVGL/src/core/lv_indev_scroll.h:1

  • Both _lv_indev_scroll_handler and _lv_indev_scroll_throw_handler use the _lv_indev_proc_t type, but this header neither declares that struct nor includes a header that does, which will lead to an unknown type error when compiling any user of these functions. Either forward-declare the type (e.g. struct _lv_indev_proc_t;) above these prototypes or include the appropriate private indev header where _lv_indev_proc_t is defined.
/**

L3_Middlewares/LVGL/src/core/lv_obj_style.h:1

  • This header now omits the lv_style.h and lv_types.h includes while still using lv_style_t, lv_style_selector_t, lv_style_prop_t, lv_style_value_t, lv_anim_path_cb_t, etc., which will cause undeclared-type errors unless every includer happens to pull in those headers beforehand. Restore the #include "../misc/lv_style.h" (and lv_types.h if needed) or add equivalent forward declarations/typedefs so that all style-related types are visible from lv_obj_style.h alone.
/**

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

/*********************
* INCLUDES
*********************/
#include <stdbool.h>

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The event header uses several LVGL core types (lv_res_t, lv_obj_class_t, lv_indev_t, lv_obj_draw_part_dsc_t, lv_draw_ctx_t, lv_area_t, lv_point_t, lv_anim_t, lv_coord_t, lv_cover_res_t) without including the headers that define them or forward-declaring the struct/typedefs, which will cause compilation errors when including lv_event.h in isolation. Add the appropriate includes (e.g. lv_obj.h, lv_obj_class.h, lv_indev.h, lv_obj_draw.h, lv_anim.h, lv_area.h, lv_types.h) or add the required forward declarations and typedefs so that all referenced types are visible to translation units that include this header.

Suggested change
#include <stdbool.h>
#include <stdbool.h>
#include "../misc/lv_types.h"
#include "../misc/lv_area.h"
#include "../misc/lv_anim.h"
#include "../indev/lv_indev.h"
#include "lv_obj_draw.h"

Copilot uses AI. Check for mistakes.
Comment on lines +26 to +27
struct _lv_obj_t;
struct _lv_event_dsc_t;

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The event header uses several LVGL core types (lv_res_t, lv_obj_class_t, lv_indev_t, lv_obj_draw_part_dsc_t, lv_draw_ctx_t, lv_area_t, lv_point_t, lv_anim_t, lv_coord_t, lv_cover_res_t) without including the headers that define them or forward-declaring the struct/typedefs, which will cause compilation errors when including lv_event.h in isolation. Add the appropriate includes (e.g. lv_obj.h, lv_obj_class.h, lv_indev.h, lv_obj_draw.h, lv_anim.h, lv_area.h, lv_types.h) or add the required forward declarations and typedefs so that all referenced types are visible to translation units that include this header.

Copilot uses AI. Check for mistakes.
Comment on lines +94 to +97
typedef struct _lv_event_t {
struct _lv_obj_t * target;
struct _lv_obj_t * current_target;
lv_event_code_t code;

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The event header uses several LVGL core types (lv_res_t, lv_obj_class_t, lv_indev_t, lv_obj_draw_part_dsc_t, lv_draw_ctx_t, lv_area_t, lv_point_t, lv_anim_t, lv_coord_t, lv_cover_res_t) without including the headers that define them or forward-declaring the struct/typedefs, which will cause compilation errors when including lv_event.h in isolation. Add the appropriate includes (e.g. lv_obj.h, lv_obj_class.h, lv_indev.h, lv_obj_draw.h, lv_anim.h, lv_area.h, lv_types.h) or add the required forward declarations and typedefs so that all referenced types are visible to translation units that include this header.

Copilot uses AI. Check for mistakes.
Comment on lines +120 to +123
typedef struct {
const lv_point_t * point; /**< A point relative to screen to check if it can click the object or not*/
bool res; /**< true: `point` can click the object; false: it cannot*/
} lv_hit_test_info_t;

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The event header uses several LVGL core types (lv_res_t, lv_obj_class_t, lv_indev_t, lv_obj_draw_part_dsc_t, lv_draw_ctx_t, lv_area_t, lv_point_t, lv_anim_t, lv_coord_t, lv_cover_res_t) without including the headers that define them or forward-declaring the struct/typedefs, which will cause compilation errors when including lv_event.h in isolation. Add the appropriate includes (e.g. lv_obj.h, lv_obj_class.h, lv_indev.h, lv_obj_draw.h, lv_anim.h, lv_area.h, lv_types.h) or add the required forward declarations and typedefs so that all referenced types are visible to translation units that include this header.

Copilot uses AI. Check for mistakes.
Comment on lines +130 to +133
typedef struct {
lv_cover_res_t res;
const lv_area_t * area;
} lv_cover_check_info_t;

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The event header uses several LVGL core types (lv_res_t, lv_obj_class_t, lv_indev_t, lv_obj_draw_part_dsc_t, lv_draw_ctx_t, lv_area_t, lv_point_t, lv_anim_t, lv_coord_t, lv_cover_res_t) without including the headers that define them or forward-declaring the struct/typedefs, which will cause compilation errors when including lv_event.h in isolation. Add the appropriate includes (e.g. lv_obj.h, lv_obj_class.h, lv_indev.h, lv_obj_draw.h, lv_anim.h, lv_area.h, lv_types.h) or add the required forward declarations and typedefs so that all referenced types are visible to translation units that include this header.

Copilot uses AI. Check for mistakes.
* @param indev pointer to an input device
* @return pointer to the indev read refresher timer. (NULL on error)
*/
lv_timer_t * lv_indev_get_read_timer(lv_disp_t * indev);

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lv_indev_get_read_timer API takes an lv_disp_t * parameter while the documentation and semantics clearly refer to an input device; the type should be lv_indev_t * (or const lv_indev_t *) to match how this function is used elsewhere in LVGL. Update the function signature (and its implementation) to accept an input device pointer instead of a display pointer to prevent type mismatches and incorrect calls.

Suggested change
lv_timer_t * lv_indev_get_read_timer(lv_disp_t * indev);
lv_timer_t * lv_indev_get_read_timer(lv_indev_t * indev);

Copilot uses AI. Check for mistakes.
Comment on lines +78 to 85
* Add a style to an object.
* @param obj pointer to an object
* @param style pointer to a style to remove. Can be NULL to check only the selector
* @param selector OR-ed values of states and a part to remove only styles with matching selectors. LV_STATE_ANY and LV_PART_ANY can be used
*
* Examples:
* @code
* lv_obj_remove_style(obj, &style, LV_PART_ANY | LV_STATE_ANY); //Remove a specific style
*
* lv_obj_remove_style(obj, NULL, LV_PART_MAIN | LV_STATE_ANY); //Remove all styles from the main part
*
* lv_obj_remove_style(obj, NULL, LV_PART_ANY | LV_STATE_ANY); //Remove all styles
* @endcode
* @example lv_obj_remove_style(obj, &style, LV_PART_ANY | LV_STATE_ANY); //Remove a specific style
* @example lv_obj_remove_style(obj, NULL, LV_PART_MAIN | LV_STATE_ANY); //Remove all styles from the main part
* @example lv_obj_remove_style(obj, NULL, LV_PART_ANY | LV_STATE_ANY); //Remove all styles
*/

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation for lv_obj_remove_style still says “Add a style to an object.” while the function removes styles, and the lv_obj_get_style_opa_recursive comment contains a typo (“teh MAIN part”). Update the comment header to describe removal (e.g. “Remove a style from an object.”) and fix the typo “teh” to “the” to keep the API documentation accurate and readable.

Copilot uses AI. Check for mistakes.
* Get the `opa` style property from all parents and multiply and `>> 8` them.
* @param obj the object whose opacity should be get
* @param part the part whose opacity should be get. Non-MAIN parts will consider the `opa` of the MAIN part too
* @param part the part whose opacity should be get. Non-MAIN parts will consider the `opa` of teh MAIN part too

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation for lv_obj_remove_style still says “Add a style to an object.” while the function removes styles, and the lv_obj_get_style_opa_recursive comment contains a typo (“teh MAIN part”). Update the comment header to describe removal (e.g. “Remove a style from an object.”) and fix the typo “teh” to “the” to keep the API documentation accurate and readable.

Suggested change
* @param part the part whose opacity should be get. Non-MAIN parts will consider the `opa` of teh MAIN part too
* @param part the part whose opacity should be get. Non-MAIN parts will consider the `opa` of the MAIN part too

Copilot uses AI. Check for mistakes.

/**
* Get the actually set x coordinate of object, i.e. the offset from the set alignment
* Get the actually set x coordinate of object, i.e. the offset form the set alignment

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word “form” in “the offset form the set alignment” is a typo and should be “from” in both comments to correctly describe the offset from the set alignment.

Copilot uses AI. Check for mistakes.

/**
* Get the actually set y coordinate of object, i.e. the offset from the set alignment
* Get the actually set y coordinate of object, i.e. the offset form the set alignment

Copilot AI Jan 31, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word “form” in “the offset form the set alignment” is a typo and should be “from” in both comments to correctly describe the offset from the set alignment.

Copilot uses AI. Check for mistakes.
@00lllooolll00 00lllooolll00 merged commit 40e9993 into master Jan 31, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants