From c11563435d1ea024780956bf77b8da3c33397253 Mon Sep 17 00:00:00 2001 From: Gabriel Wang Date: Wed, 4 Oct 2023 12:04:19 +0100 Subject: [PATCH] update API wrappers --- Helper/Include/__arm_2d_helper_common.h | 6 ++ Library/Include/arm_2d_transform.h | 95 ++++++++++++++++++++++++- Library/Source/arm_2d_transform.c | 4 +- 3 files changed, 101 insertions(+), 4 deletions(-) diff --git a/Helper/Include/__arm_2d_helper_common.h b/Helper/Include/__arm_2d_helper_common.h index 8a729c98e..8014e51c5 100644 --- a/Helper/Include/__arm_2d_helper_common.h +++ b/Helper/Include/__arm_2d_helper_common.h @@ -215,6 +215,8 @@ extern "C" { arm_2d_gray8_fill_colour_with_a2_mask # define arm_2dp_fill_colour_with_mask_opacity_and_transform \ arm_2dp_gray8_fill_colour_with_mask_opacity_and_transform +# define arm_2d_fill_colour_with_mask_opacity_and_transform \ + arm_2d_gray8_fill_colour_with_mask_opacity_and_transform # define arm_2d_draw_point arm_2d_gray8_draw_point #elif __GLCD_CFG_COLOUR_DEPTH__ == 16 @@ -363,6 +365,8 @@ extern "C" { arm_2d_rgb565_fill_colour_with_a2_mask # define arm_2dp_fill_colour_with_mask_opacity_and_transform \ arm_2dp_rgb565_fill_colour_with_mask_opacity_and_transform +# define arm_2d_fill_colour_with_mask_opacity_and_transform \ + arm_2d_rgb565_fill_colour_with_mask_opacity_and_transform # define arm_2d_draw_point arm_2d_rgb565_draw_point #elif __GLCD_CFG_COLOUR_DEPTH__ == 32 @@ -511,6 +515,8 @@ extern "C" { arm_2d_cccn888_fill_colour_with_a2_mask # define arm_2dp_fill_colour_with_mask_opacity_and_transform \ arm_2dp_cccn888_fill_colour_with_mask_opacity_and_transform +# define arm_2d_fill_colour_with_mask_opacity_and_transform \ + arm_2d_cccn888_fill_colour_with_mask_opacity_and_transform # define arm_2d_draw_point arm_2d_cccn888_draw_point #else # error Unsupported colour depth! diff --git a/Library/Include/arm_2d_transform.h b/Library/Include/arm_2d_transform.h index c14abb6d4..6200cd836 100644 --- a/Library/Include/arm_2d_transform.h +++ b/Library/Include/arm_2d_transform.h @@ -21,8 +21,8 @@ * Title: #include "arm_2d_transform.h" * Description: Public header file to contain the APIs for transform * - * $Date: 03 May 2023 - * $Revision: V.1.0.6 + * $Date: 04 Oct 2023 + * $Revision: V.1.0.7 * * Target Processor: Cortex-M cores * -------------------------------------------------------------------- */ @@ -2092,6 +2092,97 @@ extern "C" { (NULL,##__VA_ARGS__)); \ }) + + +#define arm_2d_gray8_fill_colour_with_mask_opacity_and_transform( \ + __MASK_ADDR, \ + __DES_TILE_ADDR, \ + __DES_REGION_ADDR, \ + __CENTRE, \ + __ANGLE, \ + __SCALE, \ + __MSK_COLOUR, \ + __OPACITY,...) \ + ({arm_2dp_gray8_fill_colour_with_mask_opacity_and_transform_prepare( \ + (NULL), \ + (__MASK_ADDR), \ + (__CENTRE), \ + (float)(__ANGLE), \ + (float)(__SCALE), \ + (__MSK_COLOUR), \ + (__OPACITY)); \ + arm_2dp_tile_transform(NULL, \ + (__DES_TILE_ADDR), \ + (__DES_REGION_ADDR), \ + (NULL,##__VA_ARGS__));}) + +#define arm_2d_rgb565_fill_colour_with_mask_opacity_and_transform( \ + __MASK_ADDR, \ + __DES_TILE_ADDR, \ + __DES_REGION_ADDR, \ + __CENTRE, \ + __ANGLE, \ + __SCALE, \ + __MSK_COLOUR, \ + __OPACITY,...) \ + ({arm_2dp_rgb565_fill_colour_with_mask_opacity_and_transform_prepare( \ + (NULL), \ + (__MASK_ADDR), \ + (__CENTRE), \ + (float)(__ANGLE), \ + (float)(__SCALE), \ + (__MSK_COLOUR), \ + (__OPACITY)); \ + arm_2dp_tile_transform(NULL, \ + (__DES_TILE_ADDR), \ + (__DES_REGION_ADDR), \ + (NULL,##__VA_ARGS__));}) + +#define arm_2d_rgb888_fill_colour_with_mask_opacity_and_transform( \ + __MASK_ADDR, \ + __DES_TILE_ADDR, \ + __DES_REGION_ADDR, \ + __CENTRE, \ + __ANGLE, \ + __SCALE, \ + __MSK_COLOUR, \ + __OPACITY,...) \ + ({arm_2dp_cccn888_fill_colour_with_mask_opacity_and_transform_prepare(\ + (NULL), \ + (__MASK_ADDR), \ + (__CENTRE), \ + (float)(__ANGLE), \ + (float)(__SCALE), \ + (__MSK_COLOUR), \ + (__OPACITY)); \ + arm_2dp_tile_transform(NULL, \ + (__DES_TILE_ADDR), \ + (__DES_REGION_ADDR), \ + (NULL,##__VA_ARGS__));}) + +#define arm_2d_cccn888_fill_colour_with_mask_opacity_and_transform( \ + __MASK_ADDR, \ + __DES_TILE_ADDR, \ + __DES_REGION_ADDR, \ + __CENTRE, \ + __ANGLE, \ + __SCALE, \ + __MSK_COLOUR, \ + __OPACITY,...) \ + ({arm_2dp_cccn888_fill_colour_with_mask_opacity_and_transform_prepare(\ + (NULL), \ + (__MASK_ADDR), \ + (__CENTRE), \ + (float)(__ANGLE), \ + (float)(__SCALE), \ + (__MSK_COLOUR), \ + (__OPACITY)); \ + arm_2dp_tile_transform(NULL, \ + (__DES_TILE_ADDR), \ + (__DES_REGION_ADDR), \ + (NULL,##__VA_ARGS__));}) + + #define arm_2dp_gray8_tile_transform_with_src_mask( \ __CB_ADDR, \ __SRC_TILE_ADDR, \ diff --git a/Library/Source/arm_2d_transform.c b/Library/Source/arm_2d_transform.c index f2adf6ac8..ea9a56dc5 100644 --- a/Library/Source/arm_2d_transform.c +++ b/Library/Source/arm_2d_transform.c @@ -21,8 +21,8 @@ * Title: arm-2d_transform.c * Description: APIs for tile transform * - * $Date: 03 May 2023 - * $Revision: V.1.0.6 + * $Date: 04 Oct 2023 + * $Revision: V.1.0.7 * * Target Processor: Cortex-M cores *