Arm-2D  
2D Image Processing Library for Cortex-M Processors
1 Kernel

Data Structures

struct  __arm_slist_node_t
 a type for generic list More...
 
union  arm_2d_color_gray8_t
 the colour type for gray8 (8bit gray scale) More...
 
union  arm_2d_color_rgb565_t
 the colour type for rgb565 More...
 
union  arm_2d_color_bgra8888_t
 the colour type for brga8888 More...
 
union  arm_2d_color_rgb888_t
 the colour type for rgb888 (compliant with ccca888 and bgra8888) More...
 
union  arm_2d_color_ccca8888_t
 the colour type for any 32bit colour formats which has an alpha channel on its 3rd byte. More...
 
union  arm_2d_color_accc8888_t
 the colour type for any 32bit colour formats which has an alpha channel on its first byte. More...
 
union  arm_2d_color_cccn888_t
 the colour type for any 32bit colour formats which has an unused-alpha channel on its 3rd byte. More...
 
union  arm_2d_color_nccc888_t
 the colour type for any 32bit colour formats which has an unused-alpha channel on its first byte. More...
 
union  arm_2d_color_info_t
 a type used as colour descriptor More...
 
struct  arm_2d_location_t
 a type for coordinates (integer) More...
 
struct  arm_2d_point_float_t
 a type for coordinates in floating point More...
 
struct  arm_2d_point_fx_t
 a type for coordinates in fixed point More...
 
struct  arm_2d_size_t
 a type for the size of an rectangular area More...
 
struct  arm_2d_region_t
 a type for an rectangular area More...
 
struct  arm_2d_tile_t
 a type for tile More...
 
struct  arm_2d_vres_t
 a type for virtual resource More...
 
struct  arm_2d_task_t
 arm-2d application level task control block More...
 
struct  arm_2d_op_evt_t
 a type for 2D operation event handling More...
 
struct  arm_2d_evt_t
 a type for generic event handling More...
 
union  __arm_2d_op_info_t
 A descriptive header for 2D operations. More...
 
union  arm_2d_op_status_t
 a type for 2D operation status More...
 
struct  arm_2d_op_core_t
 the abstract class of 2D operations More...
 
struct  arm_2d_op_t
 the base class for operations with only a target tile More...
 
struct  arm_2d_op_msk_t
 the base class for operations with a target tile and a target mask More...
 
struct  arm_2d_op_src_t
 the base class for operations with a target tile and a source tile More...
 
struct  arm_2d_op_src_msk_t
 the base class for operations with a target tile, a source tile and masks More...
 
struct  arm_2d_op_src_orig_t
 the base class for operations with a target tile, a dummy tile and a reference to the original source tile More...
 
struct  arm_2d_op_src_orig_msk_t
 the base class for operations with a target tile, a dummy tile, a reference to the original source tile and masks More...
 
struct  arm_2d_rot_linear_regr_t
 a type for parameters of linear interpolation (in fixed point) More...
 
struct  arm_2d_runtime_feature_t
 a type for arm-2d runtime configuration More...
 
struct  arm_2d_version_t
 a type for arm-2d version More...
 
struct  arm_2d_color_rgb565_t.__unnamed4__
 
struct  arm_2d_color_bgra8888_t.__unnamed6__
 
struct  arm_2d_color_rgb888_t.__unnamed8__
 
struct  arm_2d_color_ccca8888_t.__unnamed10__
 
struct  arm_2d_color_accc8888_t.__unnamed12__
 
struct  arm_2d_color_cccn888_t.__unnamed14__
 
struct  arm_2d_color_nccc888_t.__unnamed16__
 
struct  arm_2d_color_info_t.__unnamed18__
 
struct  arm_2d_tile_t.__unnamed20__
 < enforced colour More...
 
union  arm_2d_tile_t.__unnamed22__
 
struct  arm_2d_task_t.__unnamed24__
 < a pointer for an internal object More...
 
struct  __arm_2d_op_info_t.Info
 
union  __arm_2d_op_info_t.Info.Param
 
struct  __arm_2d_op_info_t.Info.Param.__unnamed30__
 
union  __arm_2d_op_info_t.Info.LowLevelInterfaceIndex
 
struct  __arm_2d_op_info_t.Info.LowLevelInterfaceIndex.__unnamed32__
 
struct  __arm_2d_op_info_t.Info.LowLevelInterfaceIndex.__unnamed34__
 
struct  __arm_2d_op_info_t.Info.LowLevelInterfaceIndex.__unnamed36__
 
union  __arm_2d_op_info_t.Info.LowLevelIO
 
struct  __arm_2d_op_info_t.Info.LowLevelIO.__unnamed38__
 
struct  __arm_2d_op_info_t.Info.LowLevelIO.__unnamed40__
 
struct  __arm_2d_op_info_t.Info.LowLevelIO.__unnamed42__
 
struct  arm_2d_op_status_t.__unnamed44__
 
struct  arm_2d_op_core_t.__unnamed46__
 < a pointer for a single list More...
 
struct  arm_2d_op_core_t.__unnamed46__.Preference
 
struct  arm_2d_op_t.Target
 
struct  arm_2d_op_msk_t.Target
 
struct  arm_2d_op_msk_t.Mask
 
struct  arm_2d_op_src_t.Target
 
struct  arm_2d_op_src_t.Source
 
struct  arm_2d_op_src_msk_t.Target
 
struct  arm_2d_op_src_msk_t.Source
 
struct  arm_2d_op_src_msk_t.Mask
 
struct  arm_2d_op_src_orig_t.Target
 
struct  arm_2d_op_src_orig_t.Source
 
struct  arm_2d_op_src_orig_t.Origin
 
struct  arm_2d_op_src_orig_msk_t.Target
 
struct  arm_2d_op_src_orig_msk_t.Source
 
struct  arm_2d_op_src_orig_msk_t.Origin
 
struct  arm_2d_op_src_orig_msk_t.Mask
 

Macros

#define __implement_ex(__type, __name)
 to detect IAR More...
 
#define __inherit_ex(__type, __name)    __type __name \
 
#define __implement(__type)
 
#define __inherit(__type)   __inherit_ex(__type,use_as__##__type)
 
#define implement(__type)   __implement(__type)
 
#define implement_ex(__type, __name)   __implement_ex(__type, __name)
 
#define inherit(__type)   __inherit(__type)
 
#define inherit_ex(__type, __name)   __inherit_ex(__type, __name)
 
#define ARM_2D_UNUSED(__VAR)   (void)(__VAR)
 
#define ARM_TEST_BITS(__VALUE, __BITS)   ((__BITS) == ((__VALUE) & (__BITS)))
 
#define dimof(__array)   (sizeof(__array)/sizeof(__array[0]))
 
#define offsetof(__type, __member)    ((uintptr_t)&(((__type *)NULL)->__member))
 
#define __ARM_TO_STRING(__STR)   #__STR
 
#define ARM_TO_STRING(__STR)   __ARM_TO_STRING(__STR)
 
#define __ARM_VA_NUM_ARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, __N, ...)   __N
 
#define __ARM_VA_NUM_ARGS(...)
 A macro to count the number of parameters. More...
 
#define ARM_2D_INVOKE(__FUNC_PTR, ...)
 detect whether GNU extension is enabled in compilation or not More...
 
#define __ARM_CONNECT2(__A, __B)   __A##__B
 
#define __ARM_CONNECT2_ALT(__A, __B)   __A##__B
 
#define __ARM_CONNECT3(__A, __B, __C)   __A##__B##__C
 
#define __ARM_CONNECT4(__A, __B, __C, __D)   __A##__B##__C##__D
 
#define __ARM_CONNECT5(__A, __B, __C, __D, __E)   __A##__B##__C##__D##__E
 
#define __ARM_CONNECT6(__A, __B, __C, __D, __E, __F)    __A##__B##__C##__D##__E##__F
 
#define __ARM_CONNECT7(__A, __B, __C, __D, __E, __F, __G)    __A##__B##__C##__D##__E##__F##__G
 
#define __ARM_CONNECT8(__A, __B, __C, __D, __E, __F, __G, __H)    __A##__B##__C##__D##__E##__F##__G##__H
 
#define __ARM_CONNECT9(__A, __B, __C, __D, __E, __F, __G, __H, __I)    __A##__B##__C##__D##__E##__F##__G##__H##__I
 
#define ARM_CONNECT2(__A, __B)   __ARM_CONNECT2(__A, __B)
 
#define ARM_CONNECT2_ALT(__A, __B)   __ARM_CONNECT2_ALT(__A, __B)
 
#define ARM_CONNECT3(__A, __B, __C)   __ARM_CONNECT3(__A, __B, __C)
 
#define ARM_CONNECT4(__A, __B, __C, __D)   __ARM_CONNECT4(__A, __B, __C, __D)
 
#define ARM_CONNECT5(__A, __B, __C, __D, __E)    __ARM_CONNECT5(__A, __B, __C, __D, __E)
 
#define ARM_CONNECT6(__A, __B, __C, __D, __E, __F)    __ARM_CONNECT6(__A, __B, __C, __D, __E, __F)
 
#define ARM_CONNECT7(__A, __B, __C, __D, __E, __F, __G)    __ARM_CONNECT7(__A, __B, __C, __D, __E, __F, __G)
 
#define ARM_CONNECT8(__A, __B, __C, __D, __E, __F, __G, __H)    __ARM_CONNECT8(__A, __B, __C, __D, __E, __F, __G, __H)
 
#define ARM_CONNECT9(__A, __B, __C, __D, __E, __F, __G, __H, __I)    __ARM_CONNECT9(__A, __B, __C, __D, __E, __F, __G, __H, __I)
 
#define arm_connect(...)
 
#define ARM_CONNECT(...)   arm_connect(__VA_ARGS__)
 
#define __ARM_USING1(__declare)
 
#define __ARM_USING2(__declare, __on_leave_expr)
 
#define __ARM_USING3(__declare, __on_enter_expr, __on_leave_expr)
 
#define __ARM_USING4(__dcl1, __dcl2, __on_enter_expr, __on_leave_expr)
 
#define arm_using(...)    ARM_CONNECT2(__ARM_USING, __ARM_VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)
 
#define __ARM_WITH2(__type, __addr)    ARM_USING(__type *_p=(__addr))
 
#define __ARM_WITH3(__type, __addr, __item)    ARM_USING(__type *_p=(__addr), *__item = _p, _p=_p, )
 
#define arm_with(...)    ARM_CONNECT2(__ARM_WITH, __ARM_VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)
 
#define ARM_FOREACH2(__type, __array)
 
#define ARM_FOREACH3(__type, __array, __item)
 
#define ARM_FOREACH4(__type, __array, __count, __item)
 
#define arm_foreach(...)    ARM_CONNECT2(ARM_FOREACH, __ARM_VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)
 
#define ARM_NOINIT
 
#define __ARM_ALIGN(__N)   __attribute__((aligned(__N)))
 
#define ARM_ALIGN(__N)   __ARM_ALIGN(__N)
 
#define __RESTRICT   __restrict
 
#define __OVERRIDE_WEAK
 
#define ARM_2D_SAFE_NAME(...)   ARM_CONNECT(__,__LINE__,##__VA_ARGS__)
 A macro to generate a safe name, usually used in macro template as the name of local variables. More...
 
#define arm_2d_safe_name(...)   ARM_2D_SAFE_NAME(__VA_ARGS__)
 
#define arm_irq_safe
 a decoration to make the immediate following code irq-safe More...
 
#define __ARM_2D_WRAP_FUNC(x)   __wrap_ ## x
 
#define __ARM_2D_ORIG_FUNC(x)   __real_ ## x
 
#define ARM_2D_WRAP_FUNC(__FUNC)   __ARM_2D_WRAP_FUNC(__FUNC)
 
#define ARM_2D_ORIG_FUNC(__FUNC)   __ARM_2D_ORIG_FUNC(__FUNC)
 
#define __ARM_LIST_STACK_PUSH(__P_TOP, __P_NODE)
 
#define ARM_LIST_STACK_PUSH(__P_TOP, __P_NODE)    __ARM_LIST_STACK_PUSH((__P_TOP), (__P_NODE))
 
#define ARM_LIST_INSERT_AFTER(__P_TARGET, __P_NODE)    __ARM_LIST_STACK_PUSH((__P_TARGET), (__P_NODE))
 
#define __ARM_LIST_STACK_POP(__P_TOP, __P_NODE)
 
#define ARM_LIST_STACK_POP(__P_TOP, __P_NODE)    __ARM_LIST_STACK_POP((__P_TOP), (__P_NODE))
 
#define ARM_LIST_REMOVE_AFTER(__P_TARGET, __P_NODE)    ARM_LIST_STACK_POP((__P_TARGET), (__P_NODE))
 
#define __ARM_LIST_QUEUE_ENQUEUE(__HEAD, __TAIL, __ITEM)
 
#define ARM_LIST_QUEUE_ENQUEUE(__HEAD, __TAIL, __ITEM)    __ARM_LIST_QUEUE_ENQUEUE((__HEAD), (__TAIL), (__ITEM))
 
#define __ARM_LIST_QUEUE_DEQUEUE(__HEAD, __TAIL, __ITEM)
 
#define ARM_LIST_QUEUE_DEQUEUE(__HEAD, __TAIL, __ITEM)    __ARM_LIST_QUEUE_DEQUEUE((__HEAD), (__TAIL), (__ITEM))
 
#define __ARM_LIST_QUEUE_PEEK(__HEAD, __TAIL, __ITEM)
 
#define ARM_LIST_QUEUE_PEEK(__HEAD, __TAIL, __ITEM)    __ARM_LIST_QUEUE_PEEK((__HEAD), (__TAIL), (__ITEM)) \
 
#define __def_low_lv_io(__NAME, __SW, ...)
 
#define __ref_low_lv_io(__NAME)   &LOW_LEVEL_IO##__NAME
 
#define ref_low_lv_io(__NAME)   __ref_low_lv_io(__NAME)
 
#define ARM_2D_M_COLOUR_SZ_1BIT   0
 1 bit:black and white More...
 
#define ARM_2D_M_COLOUR_SZ_2BIT   1
 4 colours or 4 gray-levels More...
 
#define ARM_2D_M_COLOUR_SZ_4BIT   2
 16 colours or 16 gray-levels More...
 
#define ARM_2D_M_COLOUR_SZ_8BIT   3
 256 colours More...
 
#define ARM_2D_M_COLOUR_SZ_16BIT   4
 16bits More...
 
#define ARM_2D_M_COLOUR_SZ_32BIT   5
 true colour More...
 
#define ARM_2D_M_COLOUR_SZ_1BIT_msk   (ARM_2D_M_COLOUR_SZ_1BIT << 1)
 
#define ARM_2D_M_COLOUR_SZ_2BIT_msk   (ARM_2D_M_COLOUR_SZ_2BIT << 1)
 
#define ARM_2D_M_COLOUR_SZ_4BIT_msk   (ARM_2D_M_COLOUR_SZ_4BIT << 1)
 
#define ARM_2D_M_COLOUR_SZ_8BIT_msk   (ARM_2D_M_COLOUR_SZ_8BIT << 1)
 
#define ARM_2D_M_COLOUR_SZ_16BIT_msk   (ARM_2D_M_COLOUR_SZ_16BIT<< 1)
 
#define ARM_2D_M_COLOUR_SZ_32BIT_msk   (ARM_2D_M_COLOUR_SZ_32BIT<< 1)
 
#define ARM_2D_M_COLOUR_SZ_msk   (0x07 << 1),
 
#define ARM_2D_M_COLOUR_LITTLE_ENDIAN   0
 
#define ARM_2D_M_COLOUR_BIG_ENDIAN   1
 
#define ARM_2D_M_COLOUR_LITTLE_ENDIAN_msk   (ARM_2D_M_COLOUR_LITTLE_ENDIAN << 4)
 
#define ARM_2D_M_COLOUR_BIG_ENDIAN_msk   (ARM_2D_M_COLOUR_BIG_ENDIAN << 4)
 
#define ARM_2D_M_COLOUR_NO_ALPHA   0
 
#define ARM_2D_M_COLOUR_HAS_ALPHA   1
 
#define ARM_2D_M_COLOUR_NO_ALPHA_msk   (ARM_2D_M_COLOUR_NO_ALPHA << 0)
 
#define ARM_2D_M_COLOUR_HAS_ALPHA_msk   (ARM_2D_M_COLOUR_HAS_ALPHA << 0)
 
#define ARM_2D_M_COLOUR_VARIANT_pos   5
 
#define ARM_2D_M_COLOUR_VARIANT_msk   (0x07 << ARM_2D_M_COLOUR_VARIANT_pos)
 
#define ARM_2D_M_COLOUR_BIN   ARM_2D_M_COLOUR_SZ_1BIT_msk
 
#define ARM_2D_M_COLOUR_1BIT   ARM_2D_M_COLOUR_SZ_1BIT_msk
 
#define ARM_2D_M_COLOUR_8BIT   ARM_2D_M_COLOUR_SZ_8BIT_msk
 
#define ARM_2D_M_COLOUR_GRAY8   ARM_2D_M_COLOUR_SZ_8BIT_msk
 
#define ARM_2D_M_COLOUR_16BIT   ARM_2D_M_COLOUR_SZ_16BIT_msk
 
#define ARM_2D_M_COLOUR_RGB16   ARM_2D_M_COLOUR_SZ_16BIT_msk
 
#define ARM_2D_M_COLOUR_RGB565   ARM_2D_M_COLOUR_RGB16
 
#define ARM_2D_M_COLOUR_32BIT   ARM_2D_M_COLOUR_SZ_32BIT_msk
 
#define ARM_2D_M_COLOUR_RGB32   ARM_2D_M_COLOUR_SZ_32BIT_msk
 
#define ARM_2D_M_COLOUR_CCCN888   ARM_2D_M_COLOUR_RGB32
 
#define ARM_2D_M_COLOUR_CCCA8888
 
#define ARM_2D_M_COLOUR_RGB888   ARM_2D_M_COLOUR_CCCN888
 
#define ARM_2D_M_COLOUR_RGBA8888   ARM_2D_M_COLOUR_CCCA8888
 
#define ARM_2D_M_CHANNEL_8in32
 
#define ARM_2D_OP_INFO_PARAM_HAS_SOURCE   _BV(0)
 
#define ARM_2D_OP_INFO_PARAM_HAS_TARGET   _BV(1)
 
#define ARM_2D_OP_INFO_PARAM_HAS_SOURCE_MASK   _BV(2)
 
#define ARM_2D_OP_INFO_PARAM_HAS_TARGET_MASK   _BV(3)
 
#define ARM_2D_OP_INFO_PARAM_HAS_ORIGIN   _BV(4)
 
#define ARM_2D_OP_INFO_PARAM_TILES_MASK
 
#define __ARM_2D_OP_STATUS_BUSY_msk   (1 << 4)
 
#define __ARM_2D_OP_STATUS_IO_ERROR_msk   (1 << 5)
 
#define __ARM_2D_OP_STATUS_CPL_msk   (1 << 6)
 
#define __ARM_2D_HAS_HELIUM__   0
 
#define __ARM_2D_HAS_HELIUM_INTEGER__   0
 
#define __ARM_2D_HAS_HELIUM_FLOAT__   0
 
#define __ARM_2D_HAS_CDE__   0
 
#define __ARM_2D_HAS_HW_ACC__   0
 
#define __ARM_2D_HAS_ASYNC__   1
 
#define __ARM_2D_CFG_DEFAULT_SUB_TASK_POOL_SIZE__   4
 
#define __ARM_2D_HAS_FPU__   0
 
#define __ARM_2D_HAS_DSP__   0
 
#define __ARM_2D_HAS_ANTI_ALIAS_TRANSFORM__   0
 
#define __ARM_2D_CFG_FORCED_FIXED_POINT_TRANSFORM__   1
 
#define __ARM_2D_CFG_SUPPORT_COLOUR_CHANNEL_ACCESS__   1
 
#define ARM_2D_VERSION_MAJOR   1
 Major version. More...
 
#define ARM_2D_VERSION_MINOR   1
 Minor version. More...
 
#define ARM_2D_VERSION_PATCH   0
 Patch number. More...
 
#define ARM_2D_VERSION_STR   "preview1"
 tag More...
 
#define ARM_2D_VERISON
 arm-2d version number in decimal More...
 

Typedefs

typedef bool arm_2d_op_evt_handler_t(arm_2d_op_core_t *ptThisOP, arm_fsm_rt_t tResult, void *pTarget)
 a prototype of event handlers for 2D operations More...
 
typedef bool arm_2d_evt_handler_t(void *pTarget)
 a prototype for generic event handlers More...
 
typedef struct __arm_2d_low_level_io_t __arm_2d_low_level_io_t
 an incomplete defintion which is only used for defining pointers More...
 

Enumerations

enum  arm_fsm_rt_t {
  arm_fsm_rt_err = -1 ,
  arm_fsm_rt_cpl = 0 ,
  arm_fsm_rt_on_going = 1 ,
  arm_fsm_rt_wait_for_obj = 2 ,
  arm_fsm_rt_async = 3 ,
  arm_fsm_rt_wait_for_res = 4
}
 finite-state-machine status return (Compatible with arm_status, minimal integer: int8_t) More...
 
enum  arm_2d_err_t {
  ARM_2D_ERR_UNSUPPORTED_COLOUR = -11 ,
  ARM_2D_ERR_BUSY = -10 ,
  ARM_2D_ERR_INSUFFICIENT_RESOURCE = -9 ,
  ARM_2D_ERR_IO_BUSY = -8 ,
  ARM_2D_ERR_IO_ERROR = -7 ,
  ARM_2D_ERR_MISSING_PARAM = -6 ,
  ARM_2D_ERR_INVALID_OP = -5 ,
  ARM_2D_ERR_NOT_SUPPORT = -4 ,
  ARM_2D_ERR_OUT_OF_REGION = -3 ,
  ARM_2D_ERR_INVALID_PARAM = -2 ,
  ARM_2D_ERR_UNKNOWN = -1 ,
  ARM_2D_ERR_NONE = 0
}
 the error code for arm-2d (minimal integer: int8_t) More...
 
enum  arm_2d_cmp_t {
  ARM_2D_CMP_SMALLER = -1 ,
  ARM_2D_CMP_EQUALS = 0 ,
  ARM_2D_CMP_LARGER = 1
}
 comparison result More...
 
enum  {
  ARM_2D_COLOUR_SZ_1BIT = 0 ,
  ARM_2D_COLOUR_SZ_2BIT = 1 ,
  ARM_2D_COLOUR_SZ_4BIT = 2 ,
  ARM_2D_COLOUR_SZ_8BIT = 3 ,
  ARM_2D_COLOUR_SZ_16BIT = 4 ,
  ARM_2D_COLOUR_SZ_32BIT = 5 ,
  ARM_2D_COLOUR_SZ_1BIT_msk = ARM_2D_COLOUR_SZ_1BIT << 1 ,
  ARM_2D_COLOUR_SZ_2BIT_msk = ARM_2D_COLOUR_SZ_2BIT << 1 ,
  ARM_2D_COLOUR_SZ_4BIT_msk = ARM_2D_COLOUR_SZ_4BIT << 1 ,
  ARM_2D_COLOUR_SZ_8BIT_msk = ARM_2D_COLOUR_SZ_8BIT << 1 ,
  ARM_2D_COLOUR_SZ_16BIT_msk = ARM_2D_COLOUR_SZ_16BIT<< 1 ,
  ARM_2D_COLOUR_SZ_32BIT_msk = ARM_2D_COLOUR_SZ_32BIT<< 1 ,
  ARM_2D_COLOUR_SZ_msk = (0x07 << 1) ,
  ARM_2D_COLOUR_LITTLE_ENDIAN = 0 ,
  ARM_2D_COLOUR_BIG_ENDIAN = 1 ,
  ARM_2D_COLOUR_LITTLE_ENDIAN_msk = ARM_2D_COLOUR_LITTLE_ENDIAN << 4 ,
  ARM_2D_COLOUR_BIG_ENDIAN_msk = ARM_2D_COLOUR_BIG_ENDIAN << 4 ,
  ARM_2D_COLOUR_NO_ALPHA = 0 ,
  ARM_2D_COLOUR_HAS_ALPHA = 1 ,
  ARM_2D_COLOUR_NO_ALPHA_msk = ARM_2D_COLOUR_NO_ALPHA << 0 ,
  ARM_2D_COLOUR_HAS_ALPHA_msk = ARM_2D_COLOUR_HAS_ALPHA << 0 ,
  ARM_2D_COLOUR_VARIANT_pos = 5 ,
  ARM_2D_COLOUR_VARIANT_msk = 0x07 << ARM_2D_COLOUR_VARIANT_pos
}
 enumerations for colour attributes More...
 
enum  {
  ARM_2D_COLOUR_BIN = ARM_2D_COLOUR_SZ_1BIT_msk ,
  ARM_2D_COLOUR_1BIT = ARM_2D_COLOUR_SZ_1BIT_msk ,
  ARM_2D_COLOUR_8BIT = ARM_2D_COLOUR_SZ_8BIT_msk ,
  ARM_2D_COLOUR_GRAY8 = ARM_2D_COLOUR_SZ_8BIT_msk ,
  ARM_2D_COLOUR_16BIT = ARM_2D_COLOUR_SZ_16BIT_msk ,
  ARM_2D_COLOUR_RGB16 = ARM_2D_COLOUR_SZ_16BIT_msk ,
  ARM_2D_COLOUR_RGB565 = ARM_2D_COLOUR_RGB16 ,
  ARM_2D_COLOUR_32BIT = ARM_2D_COLOUR_SZ_32BIT_msk ,
  ARM_2D_COLOUR_RGB32 = ARM_2D_COLOUR_SZ_32BIT_msk ,
  ARM_2D_COLOUR_CCCN888 = ARM_2D_COLOUR_RGB32 ,
  ARM_2D_COLOUR_CCCA8888 ,
  ARM_2D_COLOUR_RGB888 = ARM_2D_COLOUR_CCCN888 ,
  ARM_2D_COLOUR_BGRA8888 = ARM_2D_COLOUR_CCCA8888 ,
  ARM_2D_CHANNEL_8in32
}
 enumerations for colour types More...
 
enum  {
  ARM_2D_PREF_ACC_USE_HW_IF_POSSIBLE = 0 ,
  ARM_2D_PREF_ACC_HW_ONLY = 1 ,
  ARM_2D_PREF_ACC_SW_ONLY = 2 ,
  ARM_2D_PREF_ACC_DONT_CARE = 3
}
 how would you want to accelerate the 2d-operation More...
 

Functions

void arm_2d_init (void)
 initialise arm-2d More...
 
arm_2d_tile_tarm_2d_set_default_frame_buffer (const arm_2d_tile_t *ptFrameBuffer)
 set the default frame buffer More...
 
arm_2d_tile_tarm_2d_get_default_frame_buffer (void)
 get the default frame buffer More...
 
void arm_2d_set_user_param (arm_2d_op_core_t *ptOP, uintptr_t pUserParam)
 attach a user param (which could be a pointer) to specified OP More...
 
bool arm_2d_op_wait_async (arm_2d_op_core_t *ptOP)
 wait asynchronous operation complete More...
 
arm_2d_op_status_t arm_2d_get_op_status (arm_2d_op_core_t *ptOP)
 get the status of a specified OP, More...
 
arm_fsm_rt_t arm_2d_task (arm_2d_task_t *ptTask)
 arm-2d pixel pipeline task entery More...
 

Variables

arm_2d_runtime_feature_t ARM_2D_RUNTIME_FEATURE
 arm-2d runtime feature configuration More...
 
const arm_2d_version_t ARM_2D_VERSION
 arm-2d version More...
 

Description

Note
arm-2d relies on CMSIS 5.4.0 and above.

Data Structure Documentation

◆ __arm_slist_node_t

struct __arm_slist_node_t

a type for generic list

Note
to avoid using container_of() operand, please put __arm_slist_node_t at the beginning of a class/structure
Data Fields
__arm_slist_node_t * ptNext the next node

◆ arm_2d_color_gray8_t

union arm_2d_color_gray8_t

the colour type for gray8 (8bit gray scale)

Data Fields
uint8_t tValue

◆ arm_2d_color_rgb565_t

union arm_2d_color_rgb565_t

the colour type for rgb565

Data Fields
uint16_t tValue
struct arm_2d_color_rgb565_t.__unnamed4__ __unnamed__

◆ arm_2d_color_bgra8888_t

union arm_2d_color_bgra8888_t

the colour type for brga8888

In most cases four equal-sized pieces of adjacent memory are used, one for each channel, and a 0 in a channel indicates black color or transparent alpha, while all-1 bits indicates white or fully opaque alpha. By far the most common format is to store 8 bits (one byte) for each channel, which is 32 bits for each pixel.

(source: https://en.wikipedia.org/wiki/RGBA_color_model#ARGB32)

Data Fields
uint32_t tValue
struct arm_2d_color_bgra8888_t.__unnamed6__ __unnamed__

◆ arm_2d_color_rgb888_t

union arm_2d_color_rgb888_t

the colour type for rgb888 (compliant with ccca888 and bgra8888)

In most cases four equal-sized pieces of adjacent memory are used, one for each channel, and a 0 in a channel indicates black color or transparent alpha, while all-1 bits indicates white or fully opaque alpha. By far the most common format is to store 8 bits (one byte) for each channel, which is 32 bits for each pixel.

(source: https://en.wikipedia.org/wiki/RGBA_color_model#ARGB32)

Data Fields
uint32_t tValue
struct arm_2d_color_rgb888_t.__unnamed8__ __unnamed__

◆ arm_2d_color_ccca8888_t

union arm_2d_color_ccca8888_t

the colour type for any 32bit colour formats which has an alpha channel on its 3rd byte.

In most cases four equal-sized pieces of adjacent memory are used, one for each channel, and a 0 in a channel indicates black color or transparent alpha, while all-1 bits indicates white or fully opaque alpha. By far the most common format is to store 8 bits (one byte) for each channel, which is 32 bits for each pixel.

(source: https://en.wikipedia.org/wiki/RGBA_color_model#ARGB32)

Data Fields
uint32_t tValue
struct arm_2d_color_ccca8888_t.__unnamed10__ __unnamed__

◆ arm_2d_color_accc8888_t

union arm_2d_color_accc8888_t

the colour type for any 32bit colour formats which has an alpha channel on its first byte.

In most cases four equal-sized pieces of adjacent memory are used, one for each channel, and a 0 in a channel indicates black color or transparent alpha, while all-1 bits indicates white or fully opaque alpha. By far the most common format is to store 8 bits (one byte) for each channel, which is 32 bits for each pixel.

(source: https://en.wikipedia.org/wiki/RGBA_color_model#ARGB32)

Data Fields
uint32_t tValue
struct arm_2d_color_accc8888_t.__unnamed12__ __unnamed__

◆ arm_2d_color_cccn888_t

union arm_2d_color_cccn888_t

the colour type for any 32bit colour formats which has an unused-alpha channel on its 3rd byte.

In most cases four equal-sized pieces of adjacent memory are used, one for each channel, and a 0 in a channel indicates black color or transparent alpha, while all-1 bits indicates white or fully opaque alpha. By far the most common format is to store 8 bits (one byte) for each channel, which is 32 bits for each pixel.

(source: https://en.wikipedia.org/wiki/RGBA_color_model#ARGB32)

Data Fields
uint32_t tValue
struct arm_2d_color_cccn888_t.__unnamed14__ __unnamed__

◆ arm_2d_color_nccc888_t

union arm_2d_color_nccc888_t

the colour type for any 32bit colour formats which has an unused-alpha channel on its first byte.

In most cases four equal-sized pieces of adjacent memory are used, one for each channel, and a 0 in a channel indicates black color or transparent alpha, while all-1 bits indicates white or fully opaque alpha. By far the most common format is to store 8 bits (one byte) for each channel, which is 32 bits for each pixel.

(source: https://en.wikipedia.org/wiki/RGBA_color_model#ARGB32)

Data Fields
uint32_t tValue
struct arm_2d_color_nccc888_t.__unnamed16__ __unnamed__

◆ arm_2d_color_info_t

union arm_2d_color_info_t

a type used as colour descriptor

Data Fields
struct arm_2d_color_info_t.__unnamed18__ __unnamed__
uint8_t chScheme

◆ arm_2d_location_t

struct arm_2d_location_t

a type for coordinates (integer)

Data Fields
int16_t iX x in Cartesian coordinate system
int16_t iY y in Cartesian coordinate system

◆ arm_2d_point_float_t

struct arm_2d_point_float_t

a type for coordinates in floating point

Data Fields
float fX x in Cartesian coordinate system
float fY y in Cartesian coordinate system

◆ arm_2d_point_fx_t

struct arm_2d_point_fx_t

a type for coordinates in fixed point

Data Fields
int32_t X x in Cartesian coordinate system
int32_t Y y in Cartesian coordinate system

◆ arm_2d_size_t

struct arm_2d_size_t

a type for the size of an rectangular area

Data Fields
int16_t iWidth width of an rectangular area
int16_t iHeight height of an rectangular area

◆ arm_2d_region_t

struct arm_2d_region_t

a type for an rectangular area

Data Fields
arm_2d_location_t the location (top-left corner)
arm_2d_size_t the size

◆ arm_2d_tile_t

struct arm_2d_tile_t

a type for tile

Data Fields
struct arm_2d_tile_t.__unnamed20__ __unnamed__ < enforced colour

< is this tile a root tile does this tile contains enforced colour info indicate whether this is a derived resources (when bIsRoot == 0) indicate whether the resource should be loaded on-demand

arm_2d_region_t the region of the tile
union arm_2d_tile_t.__unnamed22__ __unnamed__

◆ arm_2d_vres_t

struct arm_2d_vres_t

a type for virtual resource

Note
the flag tTile.tInfo.bVirtualResource must be true (1)

Data Fields

 arm_2d_tile_t
 
uintptr_t pTarget
 
intptr_t(* Load )(uintptr_t pTarget, arm_2d_vres_t *ptVRES, arm_2d_region_t *ptRegion)
 a method to load a specific part of an image More...
 
void(* Depose )(uintptr_t pTarget, arm_2d_vres_t *ptVRES, intptr_t pBuffer)
 a method to despose the buffer More...
 

Field Documentation

◆ arm_2d_tile_t

arm_2d_vres_t::arm_2d_tile_t

base class: tTile

◆ pTarget

uintptr_t arm_2d_vres_t::pTarget

a reference of an user object

◆ Load

intptr_t(* arm_2d_vres_t::Load) (uintptr_t pTarget, arm_2d_vres_t *ptVRES, arm_2d_region_t *ptRegion)

a method to load a specific part of an image

Parameters
[in]pTargeta reference of an user object
[in]ptVRESa reference of this virtual resource
[in]ptRegionthe target region of the image
Returns
intptr_t the address of a resource buffer which holds the content

◆ Depose

void(* arm_2d_vres_t::Depose) (uintptr_t pTarget, arm_2d_vres_t *ptVRES, intptr_t pBuffer)

a method to despose the buffer

Parameters
[in]pTargeta reference of an user object
[in]ptVRESa reference of this virtual resource
[in]pBufferthe target buffer

◆ arm_2d_task_t

struct arm_2d_task_t

arm-2d application level task control block

Data Fields
struct arm_2d_task_t.__unnamed24__ __unnamed__ < a pointer for an internal object

< the temporary result of the task the state of the FSM

◆ arm_2d_op_evt_t

struct arm_2d_op_evt_t

a type for 2D operation event handling

Data Fields
arm_2d_op_evt_handler_t * fnHandler event handler
void * pTarget user attached target

◆ arm_2d_evt_t

struct arm_2d_evt_t

a type for generic event handling

Data Fields
arm_2d_evt_handler_t * fnHandler event handler
void * pTarget user attached target

◆ __arm_2d_op_info_t

union __arm_2d_op_info_t

A descriptive header for 2D operations.

Data Fields
struct __arm_2d_op_info_t.Info Info operation description
uint32_t wID Operation ID.

◆ arm_2d_op_status_t

union arm_2d_op_status_t

a type for 2D operation status

Data Fields
struct arm_2d_op_status_t.__unnamed44__ __unnamed__
uint16_t tValue the host integer

◆ arm_2d_op_core_t

struct arm_2d_op_core_t

the abstract class of 2D operations

Data Fields
struct arm_2d_op_core_t.__unnamed46__ __unnamed__ < a pointer for a single list

< the pointer for the corresponding 2D operation description < acceleration Methods reserved < operation result operation status < operation-complete event

uintptr_t pUserParam user attached object

◆ arm_2d_op_t

struct arm_2d_op_t

the base class for operations with only a target tile

Note
arm_2d_op_msk_t inherits from arm_2d_op_core_t
Data Fields
arm_2d_op_core_t
struct arm_2d_op_t.Target Target

◆ arm_2d_op_msk_t

struct arm_2d_op_msk_t

the base class for operations with a target tile and a target mask

Note
arm_2d_op_msk_t inherits from arm_2d_op_t
Data Fields
arm_2d_op_core_t
struct arm_2d_op_msk_t.Target Target
struct arm_2d_op_msk_t.Mask Mask

◆ arm_2d_op_src_t

struct arm_2d_op_src_t

the base class for operations with a target tile and a source tile

Note
arm_2d_op_src_t inherits from arm_2d_op_t
Data Fields
arm_2d_op_core_t
struct arm_2d_op_src_t.Target Target
struct arm_2d_op_src_t.Source Source
uint32_t wMode

◆ arm_2d_op_src_msk_t

struct arm_2d_op_src_msk_t

the base class for operations with a target tile, a source tile and masks

Note
arm_2d_op_src_msk_t inherits from arm_2d_op_src_t
Data Fields
arm_2d_op_core_t
struct arm_2d_op_src_msk_t.Target Target
struct arm_2d_op_src_msk_t.Source Source
uint32_t wMode
struct arm_2d_op_src_msk_t.Mask Mask

◆ arm_2d_op_src_orig_t

struct arm_2d_op_src_orig_t

the base class for operations with a target tile, a dummy tile and a reference to the original source tile

Note
arm_2d_op_src_orig_t inherits from arm_2d_op_src_t
Data Fields
arm_2d_op_core_t
struct arm_2d_op_src_orig_t.Target Target
struct arm_2d_op_src_orig_t.Source Source
uint32_t wMode
struct arm_2d_op_src_orig_t.Origin Origin

◆ arm_2d_op_src_orig_msk_t

struct arm_2d_op_src_orig_msk_t

the base class for operations with a target tile, a dummy tile, a reference to the original source tile and masks

Note
arm_2d_op_src_orig_msk_t inherits from arm_2d_op_src_orig_t
Data Fields
arm_2d_op_core_t
struct arm_2d_op_src_orig_msk_t.Target Target
struct arm_2d_op_src_orig_msk_t.Source Source
uint32_t wMode
struct arm_2d_op_src_orig_msk_t.Origin Origin
struct arm_2d_op_src_orig_msk_t.Mask Mask

◆ arm_2d_rot_linear_regr_t

struct arm_2d_rot_linear_regr_t

a type for parameters of linear interpolation (in fixed point)

Data Fields
int32_t slopeY
int32_t interceptY
int32_t slopeX
int32_t interceptX

◆ arm_2d_runtime_feature_t

struct arm_2d_runtime_feature_t

a type for arm-2d runtime configuration

Data Fields
uint8_t TREAT_OUT_OF_RANGE_AS_COMPLETE: 1

if the target region is out of the target tile, return arm_fsm_rt_cpl

uint8_t HAS_DEDICATED_THREAD_FOR_2D_TASK: 1

indicate that there is a dedicated thread to run arm_2d_task() in RTOS env

◆ arm_2d_version_t

struct arm_2d_version_t

a type for arm-2d version

Data Fields
uint8_t Major major version
uint8_t Minor minor version
uint8_t Patch patch number

◆ arm_2d_color_rgb565_t.__unnamed4__

struct arm_2d_color_rgb565_t.__unnamed4__
Data Fields
uint16_t u5B: 5
uint16_t u6G: 6
uint16_t u5R: 5

◆ arm_2d_color_bgra8888_t.__unnamed6__

struct arm_2d_color_bgra8888_t.__unnamed6__
Data Fields
uint32_t u8B: 8
uint32_t u8G: 8
uint32_t u8R: 8
uint32_t u8A: 8

◆ arm_2d_color_rgb888_t.__unnamed8__

struct arm_2d_color_rgb888_t.__unnamed8__
Data Fields
uint32_t u8B: 8
uint32_t u8G: 8
uint32_t u8R: 8

◆ arm_2d_color_ccca8888_t.__unnamed10__

struct arm_2d_color_ccca8888_t.__unnamed10__
Data Fields
uint8_t u8C[3]
uint8_t u8A

◆ arm_2d_color_accc8888_t.__unnamed12__

struct arm_2d_color_accc8888_t.__unnamed12__
Data Fields
uint8_t u8A
uint8_t u8C[3]

◆ arm_2d_color_cccn888_t.__unnamed14__

struct arm_2d_color_cccn888_t.__unnamed14__
Data Fields
uint8_t u8C[3]

◆ arm_2d_color_nccc888_t.__unnamed16__

struct arm_2d_color_nccc888_t.__unnamed16__
Data Fields
uint8_t u8C[3]

◆ arm_2d_color_info_t.__unnamed18__

struct arm_2d_color_info_t.__unnamed18__
Data Fields
uint8_t bHasAlpha: 1 whether the target colour has alpha channel
uint8_t u3ColourSZ: 3 the size of the colour
uint8_t bBigEndian: 1 whether the colour is stored in big endian
uint8_t u3Variant: 3

◆ arm_2d_tile_t.__unnamed20__

struct arm_2d_tile_t.__unnamed20__

< enforced colour

< is this tile a root tile does this tile contains enforced colour info indicate whether this is a derived resources (when bIsRoot == 0) indicate whether the resource should be loaded on-demand

Data Fields
uint8_t bIsRoot: 1
uint8_t bHasEnforcedColour: 1
uint8_t bDerivedResource: 1
uint8_t bVirtualResource: 1
uint8_t __pad1__: 8
uint8_t __pad2__: 8
arm_2d_color_info_t tColourInfo

◆ arm_2d_tile_t.__unnamed22__

union arm_2d_tile_t.__unnamed22__
Data Fields
arm_2d_tile_t * ptParent a pointer points to the parent tile
uint8_t * pchBuffer a pointer points to a buffer in a 8bit colour type
uint16_t * phwBuffer a pointer points to a buffer in a 16bit colour type
uint32_t * pwBuffer a pointer points to a buffer in a 32bit colour type
intptr_t nAddress a pointer in integer

◆ arm_2d_task_t.__unnamed24__

struct arm_2d_task_t.__unnamed24__

< a pointer for an internal object

< the temporary result of the task the state of the FSM

Data Fields
arm_fsm_rt_t tResult
uint8_t chState
void * ptTask

◆ __arm_2d_op_info_t.Info

struct __arm_2d_op_info_t.Info
Data Fields
arm_2d_color_info_t Colour the colour used in thie operation
union __arm_2d_op_info_t.Info.Param Param operation feature set
uint8_t chInClassOffset some operation uses this as the offset of the key member in the class
uint8_t chOpIndex __ARM_2D_OP_IDX_XXXXXX
union __arm_2d_op_info_t.Info.LowLevelInterfaceIndex LowLevelInterfaceIndex Low level interface index.
union __arm_2d_op_info_t.Info.LowLevelIO LowLevelIO low level IO definition

◆ __arm_2d_op_info_t.Info.Param

union __arm_2d_op_info_t.Info.Param
Data Fields
struct __arm_2d_op_info_t.Info.Param.__unnamed30__ __unnamed__
uint8_t chValue feature value

◆ __arm_2d_op_info_t.Info.Param.__unnamed30__

struct __arm_2d_op_info_t.Info.Param.__unnamed30__
Data Fields
uint8_t bHasSource: 1 whether this operation contains source tile
uint8_t bHasTarget: 1 whether this operation contains target tile
uint8_t bHasSrcMask: 1 whether this operation has Mask layer for source tile
uint8_t bHasDesMask: 1 whether this operation has Mask layer for target tile
uint8_t bHasOrigin: 1 whether the Source has an origin tile
uint8_t bAllowEnforcedColour: 1 whether this operation allow enforced colours in tiles

◆ __arm_2d_op_info_t.Info.LowLevelInterfaceIndex

union __arm_2d_op_info_t.Info.LowLevelInterfaceIndex

◆ __arm_2d_op_info_t.Info.LowLevelInterfaceIndex.__unnamed32__

struct __arm_2d_op_info_t.Info.LowLevelInterfaceIndex.__unnamed32__
Data Fields
uint8_t CopyLike A copy-like interface contains the target tile, the source tile and the copy size.
uint8_t FillLike A copy-like interface contains the target tile and the source tile.

◆ __arm_2d_op_info_t.Info.LowLevelInterfaceIndex.__unnamed34__

struct __arm_2d_op_info_t.Info.LowLevelInterfaceIndex.__unnamed34__
Data Fields
uint8_t CopyOrigLike A copy-like interface contains the target tile, the dummy tile, the reference to the original source tile and the copy size.
uint8_t FillOrigLike A copy-like interface contains the target tile, the dummy tile and the reference to the original source tile.

◆ __arm_2d_op_info_t.Info.LowLevelInterfaceIndex.__unnamed36__

struct __arm_2d_op_info_t.Info.LowLevelInterfaceIndex.__unnamed36__
Data Fields
uint8_t TileProcessLike A simple interface contains only the target tile.

◆ __arm_2d_op_info_t.Info.LowLevelIO

union __arm_2d_op_info_t.Info.LowLevelIO

◆ __arm_2d_op_info_t.Info.LowLevelIO.__unnamed38__

struct __arm_2d_op_info_t.Info.LowLevelIO.__unnamed38__
Data Fields
const __arm_2d_low_level_io_t * ptCopyLike the function pointer for a copy-like implementation
const __arm_2d_low_level_io_t * ptFillLike the function pointer for a fill-like implementation

◆ __arm_2d_op_info_t.Info.LowLevelIO.__unnamed40__

struct __arm_2d_op_info_t.Info.LowLevelIO.__unnamed40__
Data Fields
const __arm_2d_low_level_io_t * ptCopyOrigLike the function pointer for a copy-orig-like implementation
const __arm_2d_low_level_io_t * ptFillOrigLike the function pointer for a fill-orig-like implementation

◆ __arm_2d_op_info_t.Info.LowLevelIO.__unnamed42__

struct __arm_2d_op_info_t.Info.LowLevelIO.__unnamed42__
Data Fields
const __arm_2d_low_level_io_t * ptTileProcessLike the function pointer for the tile-process-like implementation

◆ arm_2d_op_status_t.__unnamed44__

struct arm_2d_op_status_t.__unnamed44__
Data Fields
uint16_t u4SubTaskCount: 4 sub task count
uint16_t bIsBusy: 1 busy flag
uint16_t bIOError: 1 HW IO Error.
uint16_t bOpCpl: 1 the whole operation complete

◆ arm_2d_op_core_t.__unnamed46__

struct arm_2d_op_core_t.__unnamed46__

< a pointer for a single list

< the pointer for the corresponding 2D operation description < acceleration Methods reserved < operation result operation status < operation-complete event

Data Fields
arm_2d_op_core_t * ptNext
const __arm_2d_op_info_t * ptOp
struct arm_2d_op_core_t.__unnamed46__.Preference Preference
int8_t tResult
volatile arm_2d_op_status_t Status
arm_2d_op_evt_t evt2DOpCpl

◆ arm_2d_op_core_t.__unnamed46__.Preference

struct arm_2d_op_core_t.__unnamed46__.Preference
Data Fields
uint8_t u2ACCMethods: 2

◆ arm_2d_op_t.Target

struct arm_2d_op_t.Target
Data Fields
const arm_2d_tile_t * ptTile target tile
const arm_2d_region_t * ptRegion target region

◆ arm_2d_op_msk_t.Target

struct arm_2d_op_msk_t.Target
Data Fields
const arm_2d_tile_t * ptTile target tile
const arm_2d_region_t * ptRegion target region

◆ arm_2d_op_msk_t.Mask

struct arm_2d_op_msk_t.Mask
Data Fields
const arm_2d_tile_t * ptTile target tile

◆ arm_2d_op_src_t.Target

struct arm_2d_op_src_t.Target
Data Fields
const arm_2d_tile_t * ptTile target tile
const arm_2d_region_t * ptRegion target region

◆ arm_2d_op_src_t.Source

struct arm_2d_op_src_t.Source
Data Fields
const arm_2d_tile_t * ptTile source tile

◆ arm_2d_op_src_msk_t.Target

struct arm_2d_op_src_msk_t.Target
Data Fields
const arm_2d_tile_t * ptTile target tile
const arm_2d_region_t * ptRegion target region

◆ arm_2d_op_src_msk_t.Source

struct arm_2d_op_src_msk_t.Source
Data Fields
const arm_2d_tile_t * ptTile source tile

◆ arm_2d_op_src_msk_t.Mask

struct arm_2d_op_src_msk_t.Mask
Data Fields
const arm_2d_tile_t * ptSourceSide source side mask
const arm_2d_tile_t * ptTargetSide target side mask

◆ arm_2d_op_src_orig_t.Target

struct arm_2d_op_src_orig_t.Target
Data Fields
const arm_2d_tile_t * ptTile target tile
const arm_2d_region_t * ptRegion target region

◆ arm_2d_op_src_orig_t.Source

struct arm_2d_op_src_orig_t.Source
Data Fields
const arm_2d_tile_t * ptTile the dummy source tile

◆ arm_2d_op_src_orig_t.Origin

struct arm_2d_op_src_orig_t.Origin
Data Fields
const arm_2d_tile_t * ptTile the origin tile
arm_2d_tile_t tDummySource the buffer for the source

◆ arm_2d_op_src_orig_msk_t.Target

struct arm_2d_op_src_orig_msk_t.Target
Data Fields
const arm_2d_tile_t * ptTile target tile
const arm_2d_region_t * ptRegion target region

◆ arm_2d_op_src_orig_msk_t.Source

struct arm_2d_op_src_orig_msk_t.Source
Data Fields
const arm_2d_tile_t * ptTile the dummy source tile

◆ arm_2d_op_src_orig_msk_t.Origin

struct arm_2d_op_src_orig_msk_t.Origin
Data Fields
const arm_2d_tile_t * ptTile the origin tile
arm_2d_tile_t tDummySource the buffer for the source

◆ arm_2d_op_src_orig_msk_t.Mask

struct arm_2d_op_src_orig_msk_t.Mask
Data Fields
const arm_2d_tile_t * ptOriginSide origin side mask
const arm_2d_tile_t * ptTargetSide target side mask

Macro Definition Documentation

◆ __implement_ex

#define __implement_ex (   __type,
  __name 
)
Value:
union { \
__type __name; \
__type; \
}

to detect IAR

to detect arm compiler 5

to detect arm compiler 6

to detect arm compilers

to detect clang (llvm)

to detect gcc

◆ __implement

#define __implement (   __type)
Value:
__implement_ex( __type, \
use_as__##__type)

◆ __ARM_VA_NUM_ARGS

#define __ARM_VA_NUM_ARGS (   ...)
Value:
__ARM_VA_NUM_ARGS_IMPL( 0,##__VA_ARGS__,16,15,14,13,12,11,10,9, \
8,7,6,5,4,3,2,1,0)

A macro to count the number of parameters.

Note
if GNU extension is not supported or enabled, the following express will be false: (__ARM_VA_NUM_ARGS() != 0) This might cause problems when in this library.

◆ ARM_2D_INVOKE

#define ARM_2D_INVOKE (   __FUNC_PTR,
  ... 
)
Value:
do { \
if (NULL != (__FUNC_PTR)) { \
(*(__FUNC_PTR))(__VA_ARGS__); \
} \
} while(0)

detect whether GNU extension is enabled in compilation or not

A macro to safely invode a function pointer

Parameters
[in]__FUNC_PTRthe target function pointer
[in]...an optional parameter list

◆ arm_connect

#define arm_connect (   ...)
Value:
ARM_CONNECT2_ALT(ARM_CONNECT, __ARM_VA_NUM_ARGS(__VA_ARGS__)) \
(__VA_ARGS__)

◆ __ARM_USING1

#define __ARM_USING1 (   __declare)
Value:
for (__declare, *ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
)

◆ __ARM_USING2

#define __ARM_USING2 (   __declare,
  __on_leave_expr 
)
Value:
for (__declare, *ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
__on_leave_expr \
)

◆ __ARM_USING3

#define __ARM_USING3 (   __declare,
  __on_enter_expr,
  __on_leave_expr 
)
Value:
for (__declare, *ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL ? \
((__on_enter_expr),1) : 0; \
__on_leave_expr \
)

◆ __ARM_USING4

#define __ARM_USING4 (   __dcl1,
  __dcl2,
  __on_enter_expr,
  __on_leave_expr 
)
Value:
for (__dcl1,__dcl2,*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)= NULL;\
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL ? \
((__on_enter_expr),1) : 0; \
__on_leave_expr \
)

◆ ARM_FOREACH2

#define ARM_FOREACH2 (   __type,
  __array 
)
Value:
arm_using(__type *_ = __array) \
for ( uint_fast32_t ARM_CONNECT2(count,__LINE__) = dimof(__array);\
ARM_CONNECT2(count,__LINE__) > 0; \
_++, ARM_CONNECT2(count,__LINE__)-- \
)

◆ ARM_FOREACH3

#define ARM_FOREACH3 (   __type,
  __array,
  __item 
)
Value:
arm_using(__type *_ = __array, *__item = _, _ = _, ) \
for ( uint_fast32_t ARM_CONNECT2(count,__LINE__) = dimof(__array);\
ARM_CONNECT2(count,__LINE__) > 0; \
_++, __item = _, ARM_CONNECT2(count,__LINE__)-- \
)

◆ ARM_FOREACH4

#define ARM_FOREACH4 (   __type,
  __array,
  __count,
  __item 
)
Value:
arm_using(__type *_ = __array, *__item = _, _ = _, ) \
for ( uint_fast32_t ARM_CONNECT2(count,__LINE__) = (__count); \
ARM_CONNECT2(count,__LINE__) > 0; \
_++, __item = _, ARM_CONNECT2(count,__LINE__)-- \
)

◆ ARM_2D_SAFE_NAME

#define ARM_2D_SAFE_NAME (   ...)    ARM_CONNECT(__,__LINE__,##__VA_ARGS__)

A macro to generate a safe name, usually used in macro template as the name of local variables.

◆ arm_irq_safe

#define arm_irq_safe
Value:
arm_using( uint32_t ARM_2D_SAFE_NAME(temp) = \
({uint32_t temp=__get_PRIMASK();__disable_irq();temp;}),\
__set_PRIMASK(ARM_2D_SAFE_NAME(temp)))

a decoration to make the immediate following code irq-safe

// code inside the brackets are IRQ safe
...
}
// the printf is IRQ safe
arm_irq_safe printf("IRQ safe printf\n");

◆ __ARM_LIST_STACK_PUSH

#define __ARM_LIST_STACK_PUSH (   __P_TOP,
  __P_NODE 
)
Value:
do { \
((__arm_slist_node_t *)(__P_NODE))->ptNext = \
(__arm_slist_node_t *)(__P_TOP); \
(*(__arm_slist_node_t **)&(__P_TOP)) = \
(__arm_slist_node_t *)(__P_NODE); \
} while(0)

◆ __ARM_LIST_STACK_POP

#define __ARM_LIST_STACK_POP (   __P_TOP,
  __P_NODE 
)
Value:
do { \
(*(__arm_slist_node_t **)&(__P_NODE)) = \
(__arm_slist_node_t *)(__P_TOP); \
if (NULL != (__P_TOP)) { \
(*(__arm_slist_node_t **)&(__P_TOP)) = \
((__arm_slist_node_t *)(__P_NODE))->ptNext; \
((__arm_slist_node_t *)(__P_NODE))->ptNext = NULL; \
} \
} while(0)

◆ __ARM_LIST_QUEUE_ENQUEUE

#define __ARM_LIST_QUEUE_ENQUEUE (   __HEAD,
  __TAIL,
  __ITEM 
)
Value:
do { \
if (NULL == (__TAIL)) { \
(*((__arm_slist_node_t **)&(__TAIL))) = \
(__arm_slist_node_t *)(__ITEM); \
(*((__arm_slist_node_t **)&(__HEAD))) = \
(__arm_slist_node_t *)(__ITEM); \
} else { \
((__arm_slist_node_t *)(__TAIL))->ptNext = \
(__arm_slist_node_t *)(__ITEM); \
(*(__arm_slist_node_t **)&(__TAIL)) = \
(__arm_slist_node_t *)(__ITEM); \
} \
((__arm_slist_node_t *)(__ITEM))->ptNext = NULL; \
} while(0)

◆ __ARM_LIST_QUEUE_DEQUEUE

#define __ARM_LIST_QUEUE_DEQUEUE (   __HEAD,
  __TAIL,
  __ITEM 
)
Value:
do { \
(*(__arm_slist_node_t **)&(__ITEM)) = (__arm_slist_node_t *)(__HEAD); \
if (NULL != (__HEAD)) { \
(*(__arm_slist_node_t **)&(__HEAD)) = \
((__arm_slist_node_t *)(__HEAD))->ptNext; \
if (NULL == (__HEAD)) { \
(__TAIL) = NULL; \
} \
} \
} while(0)

◆ __ARM_LIST_QUEUE_PEEK

#define __ARM_LIST_QUEUE_PEEK (   __HEAD,
  __TAIL,
  __ITEM 
)
Value:
do { \
(*(__arm_slist_node_t **)&(__ITEM)) = (__arm_slist_node_t *)(__HEAD); \
} while(0)

◆ __def_low_lv_io

#define __def_low_lv_io (   __NAME,
  __SW,
  ... 
)
Value:
const __arm_2d_low_level_io_t LOW_LEVEL_IO##__NAME = { \
.SW = (__arm_2d_io_func_t *)&(__SW), \
.HW = (NULL, ##__VA_ARGS__) \
}

◆ ARM_2D_M_COLOUR_SZ_1BIT

#define ARM_2D_M_COLOUR_SZ_1BIT   0

1 bit:black and white

◆ ARM_2D_M_COLOUR_SZ_2BIT

#define ARM_2D_M_COLOUR_SZ_2BIT   1

4 colours or 4 gray-levels

◆ ARM_2D_M_COLOUR_SZ_4BIT

#define ARM_2D_M_COLOUR_SZ_4BIT   2

16 colours or 16 gray-levels

◆ ARM_2D_M_COLOUR_SZ_8BIT

#define ARM_2D_M_COLOUR_SZ_8BIT   3

256 colours

◆ ARM_2D_M_COLOUR_SZ_16BIT

#define ARM_2D_M_COLOUR_SZ_16BIT   4

16bits

◆ ARM_2D_M_COLOUR_SZ_32BIT

#define ARM_2D_M_COLOUR_SZ_32BIT   5

true colour

◆ ARM_2D_M_COLOUR_CCCA8888

#define ARM_2D_M_COLOUR_CCCA8888
Value:
( ARM_2D_M_COLOUR_SZ_32BIT_msk \
| ARM_2D_M_COLOUR_HAS_ALPHA_msk)

◆ ARM_2D_M_CHANNEL_8in32

#define ARM_2D_M_CHANNEL_8in32
Value:
( ARM_2D_M_COLOUR_SZ_32BIT_msk \
| ARM_2D_M_COLOUR_HAS_ALPHA_msk) \
| ARM_2D_M_COLOUR_VARIANT_msk )

◆ ARM_2D_OP_INFO_PARAM_TILES_MASK

#define ARM_2D_OP_INFO_PARAM_TILES_MASK
Value:
( \
ARM_2D_OP_INFO_PARAM_HAS_SOURCE | \
ARM_2D_OP_INFO_PARAM_HAS_TARGET | \
ARM_2D_OP_INFO_PARAM_HAS_SOURCE_MASK | \
ARM_2D_OP_INFO_PARAM_HAS_TARGET_MASK | \
ARM_2D_OP_INFO_PARAM_HAS_ORIGIN )

◆ __ARM_2D_CFG_FORCED_FIXED_POINT_TRANSFORM__

#define __ARM_2D_CFG_FORCED_FIXED_POINT_TRANSFORM__   1
Note
DO NOT define macro ARM_2D_CFG_FORCED_FIXED_POINT_TRANSFORM unless ! you sure about what you are doing.

◆ __ARM_2D_CFG_SUPPORT_COLOUR_CHANNEL_ACCESS__

#define __ARM_2D_CFG_SUPPORT_COLOUR_CHANNEL_ACCESS__   1
Note
In your application, if you do need to use RGBA8888 for some resources ! and you want to use colour channels (e.g. the alpha channel) in mask ! related APIs, please set this macro to 1 in your project.

◆ ARM_2D_VERSION_MAJOR

#define ARM_2D_VERSION_MAJOR   1

Major version.

◆ ARM_2D_VERSION_MINOR

#define ARM_2D_VERSION_MINOR   1

Minor version.

◆ ARM_2D_VERSION_PATCH

#define ARM_2D_VERSION_PATCH   0

Patch number.

◆ ARM_2D_VERSION_STR

#define ARM_2D_VERSION_STR   "preview1"

tag

◆ ARM_2D_VERISON

#define ARM_2D_VERISON
Value:
( ARM_2D_VERSION_MAJOR * 10000ul \
ARM_2D_VERSION_PATCH)

arm-2d version number in decimal

Typedef Documentation

◆ arm_2d_op_evt_handler_t

typedef bool arm_2d_op_evt_handler_t(arm_2d_op_core_t *ptThisOP, arm_fsm_rt_t tResult, void *pTarget)

a prototype of event handlers for 2D operations

Parameters
[in]ptThisOPthe target 2D operation descriptor
[in]tResultthe operation result
[in]pTargetA user attached object
Returns
bool a boolean value to indicate whether the event has been handled

◆ arm_2d_evt_handler_t

typedef bool arm_2d_evt_handler_t(void *pTarget)

a prototype for generic event handlers

Parameters
pTargetA user attached object
Returns
bool a boolean value to indicate whether the event has been handled

◆ __arm_2d_low_level_io_t

an incomplete defintion which is only used for defining pointers

Enumeration Type Documentation

◆ arm_fsm_rt_t

finite-state-machine status return (Compatible with arm_status, minimal integer: int8_t)

Enumerator
arm_fsm_rt_err 

fsm error

arm_fsm_rt_cpl 

fsm complete

arm_fsm_rt_on_going 

fsm on-going

arm_fsm_rt_wait_for_obj 

fsm wait for IPC object

arm_fsm_rt_async 

fsm work asynchronously, please check it later.

arm_fsm_rt_wait_for_res 

wait for resource

◆ arm_2d_err_t

the error code for arm-2d (minimal integer: int8_t)

Enumerator
ARM_2D_ERR_UNSUPPORTED_COLOUR 

the specified colour is not supported

ARM_2D_ERR_BUSY 

service is busy

ARM_2D_ERR_INSUFFICIENT_RESOURCE 

insufficient resource

ARM_2D_ERR_IO_BUSY 

HW accelerator is busy.

ARM_2D_ERR_IO_ERROR 

Generic HW error.

ARM_2D_ERR_MISSING_PARAM 

missing mandatory parameter

ARM_2D_ERR_INVALID_OP 

unsupported / invalid operation

ARM_2D_ERR_NOT_SUPPORT 

feature/service/operation is not supported

ARM_2D_ERR_OUT_OF_REGION 

the operation is out of target area

ARM_2D_ERR_INVALID_PARAM 

invalid parameter

ARM_2D_ERR_UNKNOWN 

generic or unknown errors

ARM_2D_ERR_NONE 

no error

◆ arm_2d_cmp_t

comparison result

Enumerator
ARM_2D_CMP_SMALLER 

the target is smaller than the reference

ARM_2D_CMP_EQUALS 

the target is equal to the reference

ARM_2D_CMP_LARGER 

the target is larger than the reference

◆ anonymous enum

anonymous enum

enumerations for colour attributes

Enumerator
ARM_2D_COLOUR_SZ_1BIT 

1 bit:black and white

ARM_2D_COLOUR_SZ_2BIT 

4 colours or 4 gray-levels

ARM_2D_COLOUR_SZ_4BIT 

16 colours or 16 gray-levels

ARM_2D_COLOUR_SZ_8BIT 

256 colours

ARM_2D_COLOUR_SZ_16BIT 

16bits

ARM_2D_COLOUR_SZ_32BIT 

true colour

◆ anonymous enum

anonymous enum

enumerations for colour types

◆ anonymous enum

anonymous enum

how would you want to accelerate the 2d-operation

Enumerator
ARM_2D_PREF_ACC_USE_HW_IF_POSSIBLE 

Use hardware acceleration if possible, even if there is a long queue to wait.

ARM_2D_PREF_ACC_HW_ONLY 

Only use Hardware Acceleration, if it is not supported, IO error will be issued.

ARM_2D_PREF_ACC_SW_ONLY 

Only use software algorithm.

don't care, let the arm-2d library decide

Function Documentation

◆ arm_2d_init()

void arm_2d_init ( void  )

initialise arm-2d

◆ arm_2d_set_default_frame_buffer()

arm_2d_tile_t * arm_2d_set_default_frame_buffer ( const arm_2d_tile_t ptFrameBuffer)

set the default frame buffer

Parameters
ptFrameBufferthe new frame buffer,
Note
Passing NULL means using no default framebuffer
Returns
arm_2d_tile_t* the address of the old frame buffer

◆ arm_2d_get_default_frame_buffer()

arm_2d_tile_t * arm_2d_get_default_frame_buffer ( void  )

get the default frame buffer

Returns
arm_2d_tile_t* the address of the default frame buffer

◆ arm_2d_set_user_param()

void arm_2d_set_user_param ( arm_2d_op_core_t ptOP,
uintptr_t  pUserParam 
)

attach a user param (which could be a pointer) to specified OP

Parameters
ptOPthe address of the target OP (NULL means using the default OP)
pUserParama user parameter (it can be used as a pointer)

◆ arm_2d_op_wait_async()

bool arm_2d_op_wait_async ( arm_2d_op_core_t ptOP)

wait asynchronous operation complete

Parameters
[in]ptOPthe address of the target OP (NULL means using the default OP)
Return values
truesync up with operation
falseoperation is busy

◆ arm_2d_get_op_status()

arm_2d_op_status_t arm_2d_get_op_status ( arm_2d_op_core_t ptOP)

get the status of a specified OP,

usually, it is used after calling arm_2d_op_wait_async(). E.g.

//! wait for previous operation complete
do {
if (tStatus.bIOError) {
//! error detected
...
} else if (tStatus.bOpCpl) {
break;
}
} while(true);
Parameters
ptOPthe address of the target OP (NULL means using the default OP)
Returns
arm_2d_op_status_t the operation status

◆ arm_2d_task()

arm_fsm_rt_t arm_2d_task ( arm_2d_task_t ptTask)

arm-2d pixel pipeline task entery

Note
This function is TRHEAD-SAFE
Parameters
ptTaskthe address of an arm-2d task control block
Return values
arm_fsm_rt_cplThe sub-task FIFO is empty, the caller can wait for a semaphore set by arm_2d_notif_sub_task_fifo_task_arrive()
arm_fsm_rt_on_goingThe arm_2d_task yields
arm_fsm_rt_asyncYou shouldn't see this value
arm_fsm_rt_wait_for_objhardware accelerator wants to sync-up with applications.
(<0)Serious error is detected.

Variable Documentation

◆ ARM_2D_RUNTIME_FEATURE

arm_2d_runtime_feature_t ARM_2D_RUNTIME_FEATURE
extern

arm-2d runtime feature configuration

◆ ARM_2D_VERSION

const arm_2d_version_t ARM_2D_VERSION
extern

arm-2d version