From 33fc3175a0f7fce3bbdc0dda933e3ac19f050156 Mon Sep 17 00:00:00 2001 From: Fabian Blatz Date: Mon, 16 Dec 2024 13:01:22 +0100 Subject: [PATCH] fix(dma2d): Add return value to DMA2d conversion functions (#7456) --- src/draw/dma2d/lv_draw_dma2d.c | 4 +++- src/draw/dma2d/lv_draw_dma2d_fill.c | 2 +- src/draw/dma2d/lv_draw_dma2d_private.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/draw/dma2d/lv_draw_dma2d.c b/src/draw/dma2d/lv_draw_dma2d.c index 0c65aa519..c44f2e7dc 100644 --- a/src/draw/dma2d/lv_draw_dma2d.c +++ b/src/draw/dma2d/lv_draw_dma2d.c @@ -134,9 +134,10 @@ lv_draw_dma2d_output_cf_t lv_draw_dma2d_cf_to_dma2d_output_cf(lv_color_format_t default: LV_ASSERT_MSG(false, "unsupported output color format"); } + return LV_DRAW_DMA2D_OUTPUT_CF_RGB565; } -uint32_t lv_draw_dma2d_color_to_dma2d_ocolr(lv_draw_dma2d_output_cf_t cf, lv_color_t color) +uint32_t lv_draw_dma2d_color_to_dma2d_color(lv_draw_dma2d_output_cf_t cf, lv_color_t color) { switch(cf) { case LV_DRAW_DMA2D_OUTPUT_CF_ARGB8888: @@ -147,6 +148,7 @@ uint32_t lv_draw_dma2d_color_to_dma2d_ocolr(lv_draw_dma2d_output_cf_t cf, lv_col default: LV_ASSERT_MSG(false, "unsupported output color format"); } + return 0; } void lv_draw_dma2d_configure_and_start_transfer(const lv_draw_dma2d_configuration_t * conf) diff --git a/src/draw/dma2d/lv_draw_dma2d_fill.c b/src/draw/dma2d/lv_draw_dma2d_fill.c index 96396e1c3..23cd346f1 100644 --- a/src/draw/dma2d/lv_draw_dma2d_fill.c +++ b/src/draw/dma2d/lv_draw_dma2d_fill.c @@ -41,7 +41,7 @@ void lv_draw_dma2d_opaque_fill(lv_draw_dma2d_unit_t * u, void * first_pixel, int lv_draw_dma2d_output_cf_t output_cf = lv_draw_dma2d_cf_to_dma2d_output_cf(cf); uint32_t cf_size = LV_COLOR_FORMAT_GET_SIZE(cf); - uint32_t reg_to_mem_color = lv_draw_dma2d_color_to_dma2d_ocolr(output_cf, dsc->color); + uint32_t reg_to_mem_color = lv_draw_dma2d_color_to_dma2d_color(output_cf, dsc->color); #if LV_DRAW_DMA2D_CACHE lv_draw_dma2d_cache_area_t cache_area = { diff --git a/src/draw/dma2d/lv_draw_dma2d_private.h b/src/draw/dma2d/lv_draw_dma2d_private.h index 5b6ce2e27..1ed493845 100644 --- a/src/draw/dma2d/lv_draw_dma2d_private.h +++ b/src/draw/dma2d/lv_draw_dma2d_private.h @@ -136,7 +136,7 @@ void lv_draw_dma2d_opaque_image(lv_draw_dma2d_unit_t * u, void * dest_first_pixe void lv_draw_dma2d_image(lv_draw_dma2d_unit_t * u, void * dest_first_pixel, lv_area_t * clipped_coords, int32_t dest_stride); lv_draw_dma2d_output_cf_t lv_draw_dma2d_cf_to_dma2d_output_cf(lv_color_format_t cf); -uint32_t lv_draw_dma2d_color_to_dma2d_ocolr(lv_draw_dma2d_output_cf_t cf, lv_color_t color); +uint32_t lv_draw_dma2d_color_to_dma2d_color(lv_draw_dma2d_output_cf_t cf, lv_color_t color); void lv_draw_dma2d_configure_and_start_transfer(const lv_draw_dma2d_configuration_t * conf); #if LV_DRAW_DMA2D_CACHE void lv_draw_dma2d_invalidate_cache(const lv_draw_dma2d_cache_area_t * mem_area);