Skip to content

Commit

Permalink
update API wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
GorgonMeducer committed Oct 4, 2023
1 parent 9ebfd74 commit c115634
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 4 deletions.
6 changes: 6 additions & 0 deletions Helper/Include/__arm_2d_helper_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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!
Expand Down
95 changes: 93 additions & 2 deletions Library/Include/arm_2d_transform.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
* -------------------------------------------------------------------- */
Expand Down Expand Up @@ -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, \
Expand Down
4 changes: 2 additions & 2 deletions Library/Source/arm_2d_transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down

0 comments on commit c115634

Please sign in to comment.