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; 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 )