From 490cc15b965c6c7da636eee571986bf424c287f3 Mon Sep 17 00:00:00 2001 From: liamHowatt Date: Fri, 19 Jul 2024 13:42:46 -0400 Subject: [PATCH 1/2] use updated lv_indev_t name --- driver/stm32/STM32F7DISC/modrk043fn48h.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver/stm32/STM32F7DISC/modrk043fn48h.c b/driver/stm32/STM32F7DISC/modrk043fn48h.c index a3a7048a9..5fb01d33b 100644 --- a/driver/stm32/STM32F7DISC/modrk043fn48h.c +++ b/driver/stm32/STM32F7DISC/modrk043fn48h.c @@ -144,7 +144,7 @@ void HAL_LTDC_ReloadEventCallback(LTDC_HandleTypeDef *hltdc) { lv_display_flush_ready(dma2d_disp_drv); } -STATIC void mp_rk043fn48h_ts_read(struct _lv_indev_t *indev_drv, lv_indev_data_t *data) { +STATIC void mp_rk043fn48h_ts_read(lv_indev_t *indev_drv, lv_indev_data_t *data) { static TS_StateTypeDef ts_state = {0}; static int32_t lastX = 0; static int32_t lastY = 0; From a0281b8d0ebdcf5b9ebeef7d9ef3579ea80e60b6 Mon Sep 17 00:00:00 2001 From: liamHowatt Date: Fri, 19 Jul 2024 19:31:24 -0400 Subject: [PATCH 2/2] the cmake build system can use the JSON now too --- mkrules.cmake | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/mkrules.cmake b/mkrules.cmake index 145faedfa..0d0d6d79a 100644 --- a/mkrules.cmake +++ b/mkrules.cmake @@ -66,14 +66,48 @@ function(lv_bindings) set(LV_PP_FILTERED ${LV_PP}) endif() + set(LV_JSON ${CMAKE_BINARY_DIR}/lvgl_all.json) + + if (EXISTS ${LVGL_DIR}/scripts/gen_json/gen_json.py) + set(LVGL_ALL_H ${CMAKE_BINARY_DIR}/lvgl_all.h) + add_custom_command( + OUTPUT + ${LVGL_ALL_H} + COMMAND + echo "\"#include\"" "\"\\\"${LVGL_DIR}/lvgl.h\\\"\"" > ${LVGL_ALL_H} + COMMAND + echo "\"#include\"" "\"\\\"${LVGL_DIR}/src/lvgl_private.h\\\"\"" >> ${LVGL_ALL_H} + COMMAND_EXPAND_LISTS + ) + add_custom_command( + OUTPUT + ${LV_JSON} + COMMAND + ${Python3_EXECUTABLE} ${LVGL_DIR}/scripts/gen_json/gen_json.py --target-header ${LVGL_ALL_H} > ${LV_JSON} + DEPENDS + ${LVGL_DIR}/scripts/gen_json/gen_json.py + ${LVGL_ALL_H} + COMMAND_EXPAND_LISTS + ) + else() + add_custom_command( + OUTPUT + ${LV_JSON} + COMMAND + echo "{}" > ${LV_JSON} + COMMAND_EXPAND_LISTS + ) + endif() + add_custom_command( OUTPUT ${LV_OUTPUT} COMMAND - ${Python3_EXECUTABLE} ${LV_BINDINGS_DIR}/gen/gen_mpy.py ${LV_GEN_OPTIONS} -MD ${LV_MPY_METADATA} -E ${LV_PP_FILTERED} ${LV_INPUT} > ${LV_OUTPUT} || (rm -f ${LV_OUTPUT} && /bin/false) + ${Python3_EXECUTABLE} ${LV_BINDINGS_DIR}/gen/gen_mpy.py ${LV_GEN_OPTIONS} -MD ${LV_MPY_METADATA} -E ${LV_PP_FILTERED} -J ${LV_JSON} ${LV_INPUT} > ${LV_OUTPUT} || (rm -f ${LV_OUTPUT} && /bin/false) DEPENDS ${LV_BINDINGS_DIR}/gen/gen_mpy.py ${LV_PP_FILTERED} + ${LV_JSON} COMMAND_EXPAND_LISTS )