2D Image Processing Library for Cortex-M Processors
 
All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
Loading...
Searching...
No Matches
7 Helper Services

Data Structures

union  __arm_2d_helper_scene_switch_t
 an internal data structure for scene switching More...
 
struct  arm_2d_scene_switch_mode_t
 scene switching mode descriptor More...
 
struct  arm_2d_scene_t
 a class for describing scenes which are the combination of a background and a foreground with a dirty-region-list support More...
 
struct  arm_2d_scene_player_t
 a class to manage scenes More...
 
struct  arm_2d_pfb_t
 the header of a PFB block More...
 
struct  arm_2d_region_list_item_t
 the node of a region list More...
 
struct  arm_2d_helper_render_evt_t
 on low level render event More...
 
struct  arm_2d_helper_draw_evt_t
 on drawing event More...
 
struct  arm_2d_helper_pfb_dependency_t
 The PFB Helper Service Dependency. More...
 
struct  arm_2d_helper_pfb_cfg_t
 PFB Helper configuration. More...
 
struct  arm_2d_helper_pfb_t
 the PFB helper control block More...
 
struct  __arm_2d_helper_scene_switch_t.Feature
 
struct  arm_2d_scene_t.__unnamed121__
 
struct  arm_2d_scene_player_t.__unnamed123__
 
struct  arm_2d_scene_player_t.__unnamed123__.SceneFIFO
 
struct  arm_2d_scene_player_t.__unnamed123__.Runtime
 
struct  arm_2d_scene_player_t.__unnamed123__.Switch
 
union  arm_2d_scene_player_t.__unnamed123__.Switch.__unnamed128__
 
struct  arm_2d_scene_player_t.__unnamed123__.Switch.__unnamed128__.Fade
 
struct  arm_2d_scene_player_t.__unnamed123__.Switch.__unnamed128__.Erase
 
struct  arm_2d_scene_player_t.__unnamed123__.Switch.__unnamed128__.Slide
 
struct  arm_2d_helper_pfb_dependency_t.Navigation
 event handler for drawing GUI More...
 
struct  arm_2d_helper_pfb_cfg_t.FrameBuffer
 
struct  arm_2d_helper_pfb_t.__unnamed136__
 < user configuration More...
 
struct  arm_2d_helper_pfb_t.__unnamed136__.Adapter
 
struct  arm_2d_helper_pfb_t.__unnamed136__.Adapter.__unnamed140__
 
struct  arm_2d_helper_pfb_t.__unnamed136__.Adapter.FlushFIFO
 
struct  arm_2d_helper_pfb_t.Statistics
 

Macros

#define arm_2d_scene_player_register_on_draw_navigation_event_handler( __DISP_ADAPTER_PTR, __DRAW_HANDLER, __USER_TARGET_PTR, ...)
 register / update the evtOnDrawNavigation event handler. You can use this event to draw an ALWAY-TOP navigation bar or title during switching period. More...
 
#define arm_2d_scene_player_set_switching_mode(__DISP_ADAPTER_PTR, __SWITCH_MODE, ...)
 configure the scene switching mode More...
 
#define ARM_2D_HELPER_PFB_INIT(__CB_ADDR, __SCREEN_WIDTH, __SCREEN_HEIGHT, __PIXEL_TYPE, __WIDTH, __HEIGHT, __PFB_NUM, ...)
 a macro wrapper in uppercase to help initialising PFB service More...
 
#define ARM_2D_HELPER_PFB_UPDATE_ON_DRAW_HANDLER( __CB_ADDR, __HANDLER, ...)
 a macro wrapper to update the evtOnDrawring event handler More...
 
#define __IMPL_ARM_2D_REGION_LIST(__NAME, ...)
 
#define IMPL_ARM_2D_REGION_LIST(__NAME, ...)    __IMPL_ARM_2D_REGION_LIST(__NAME,##__VA_ARGS__)
 
#define END_IMPL_ARM_2D_REGION_LIST(...)    };
 
#define __ADD_REGION_TO_LIST(__NAME, ...)
 
#define ADD_REGION_TO_LIST(__NAME, ...)    __ADD_REGION_TO_LIST(__NAME, ##__VA_ARGS__)
 
#define __ADD_LAST_REGION_TO_LIST(__NAME, ...)
 
#define ADD_LAST_REGION_TO_LIST(__NAME, ...)    __ADD_LAST_REGION_TO_LIST(__NAME, ##__VA_ARGS__)
 
#define IMPL_PFB_ON_DRAW(__NAME)
 
#define IMPL_PFB_ON_LOW_LV_RENDERING(__NAME)
 
#define IMPL_PFB_ON_FRAME_SYNC_UP(__NAME)    bool __NAME(void *pTarget)
 
#define init_arm_2d_helper_pfb(__CB_ADDR, __SCREEN_WIDTH, __SCREEN_HEIGHT, __PIXEL_TYPE, __WIDTH, __HEIGHT, __PFB_NUM, ...)
 a macro wrapper in lowercase to help initialising PFB service More...
 
#define update_arm_2d_helper_pfb_on_draw_handler( __CB_ADDR, __HANDLER, ...)
 a macro wrapper to update the evtOnDrawring event handler More...
 
#define arm_2d_helper_pfb_report_rendering_complete(__PFB_HELPER_PTR, ...)
 tell PFB helper that a low level LCD flushing work is complete More...
 
#define impl_arm_2d_region_list(__NAME, ...)    IMPL_ARM_2D_REGION_LIST(__NAME,##__VA_ARGS__)
 
#define add_region_to_list(__NAME, ...)    ADD_REGION_TO_LIST(__NAME, ##__VA_ARGS__)
 
#define add_last_region_to_list(__NAME, ...)    ADD_LAST_REGION_TO_LIST(__NAME, ##__VA_ARGS__)
 
#define end_impl_arm_2d_region_list(...)    END_IMPL_ARM_2D_REGION_LIST(__VA_ARGS__)
 
#define impl_pfb_on_draw(__NAME)   IMPL_PFB_ON_DRAW(__NAME)
 
#define impl_pfb_on_low_lv_rendering(__NAME)    IMPL_PFB_ON_LOW_LV_RENDERING(__NAME)
 
#define __declare_tile(__name)    extern const arm_2d_tile_t __name;
 Please do NOT use this macro. More...
 
#define declare_tile(__name)   __declare_tile(__name)
 declare a tile More...
 
#define dcl_tile(__name)   declare_tile(__name)
 declare a tile More...
 
#define dcl_fb(__name)   declare_tile(__name)
 declare a framebuffer More...
 
#define __impl_fb(__name, __width, __height, __type, ...)
 Please do NOT use this macro. More...
 
#define impl_fb(__name, __width, __height, __type, ...)    __impl_fb(__name, __width, __height, __type, ##__VA_ARGS__)
 implement a framebuffer More...
 
#define impl_heap_fb(__tile_name, __width, __height, __colour_type)
 implement a framebuffer and allocate it from the heap More...
 
#define get_tile_buffer_pixel_count(__name)
 calculate the number of pixels in a given tile More...
 
#define get_tile_buffer_size(__name, __type)    (get_2d_layer_buffer_pixel_count(__name) * sizeof(__type))
 calculate the size of a given framebuffer More...
 
#define impl_child_tile(__parent, __x, __y, __width, __height, ...)
 implement a child tile for a given parent More...
 
#define __arm_2d_align_top_left2(__region, __size)
 Please do NOT use this macro. More...
 
#define __arm_2d_align_top_left3(__region, __width, __height)
 Please do NOT use this macro. More...
 
#define arm_2d_align_top_left(...)
 generate a temporary arm_2d_region_t object with use specified info for top-left alignment. More...
 
#define __arm_2d_align_top_centre2(__region, __size)
 Please do NOT use this macro. More...
 
#define __arm_2d_align_top_centre3(__region, __width, __height)
 Please do NOT use this macro. More...
 
#define arm_2d_align_top_centre(...)
 generate a temporary arm_2d_region_t object with use specified info for top-central alignment. More...
 
#define __arm_2d_align_top_right2(__region, __size)
 Please do NOT use this macro. More...
 
#define __arm_2d_align_top_right3(__region, __width, __height)
 Please do NOT use this macro. More...
 
#define arm_2d_align_top_right(...)
 generate a temporary arm_2d_region_t object with use specified info for top-right alignment. More...
 
#define __arm_2d_align_mid_left2(__region, __size)
 Please do NOT use this macro. More...
 
#define __arm_2d_align_mid_left3(__region, __width, __height)
 Please do NOT use this macro. More...
 
#define arm_2d_align_mid_left(...)
 generate a temporary arm_2d_region_t object with use specified info for middle-left alignment. More...
 
#define __arm_2d_align_centre2(__region, __size)
 Please do NOT use this macro. More...
 
#define __arm_2d_align_centre3(__region, __width, __height)
 Please do NOT use this macro. More...
 
#define arm_2d_align_centre(...)
 generate a temporary arm_2d_region_t object with use specified info for central alignment. More...
 
#define __arm_2d_align_mid_right2(__region, __size)
 Please do NOT use this macro. More...
 
#define __arm_2d_align_mid_right3(__region, __width, __height)
 Please do NOT use this macro. More...
 
#define arm_2d_align_mid_right(...)
 generate a temporary arm_2d_region_t object with use specified info for middle-right alignment. More...
 
#define __arm_2d_align_bottom_left2(__region, __size)
 Please do NOT use this macro. More...
 
#define __arm_2d_align_bottom_left3(__region, __width, __height)
 Please do NOT use this macro. More...
 
#define arm_2d_align_bottom_left(...)
 generate a temporary arm_2d_region_t object with use specified info for bottom-left alignment. More...
 
#define __arm_2d_align_bottom_centre2(__region, __size)
 Please do NOT use this macro. More...
 
#define __arm_2d_align_bottom_centre3(__region, __width, __height)
 Please do NOT use this macro. More...
 
#define arm_2d_align_bottom_centre(...)
 generate a temporary arm_2d_region_t object with use specified info for bottom-central alignment. More...
 
#define __arm_2d_align_bottom_right2(__region, __size)
 Please do NOT use this macro. More...
 
#define __arm_2d_align_bottom_right3(__region, __width, __height)
 Please do NOT use this macro. More...
 
#define arm_2d_align_bottom_right(...)
 generate a temporary arm_2d_region_t object with use specified info for bottom-right alignment. More...
 
#define arm_2d_helper_is_time_out(__ms, ...)
 set an alarm with given period and check the status More...
 
#define arm_2d_helper_time_liner_slider(__from, __to, __ms, __stroke_ptr, ...)
 calculate the stroke of a liner slider based on time More...
 
#define arm_2d_helper_time_cos_slider(__from, __to, __ms, __phase, __stroke_ptr, ...)
 calculate the stroke of a cosine slider based on time More...
 
#define arm_2d_helper_time_half_cos_slider(__from, __to, __ms, __stroke_ptr, ...)
 calculate the stroke of a cosine slider(0~pi) based on time More...
 

Typedefs

typedef arm_fsm_rt_t arm_2d_helper_draw_handler_t(void *pTarget, const arm_2d_tile_t *ptTile, bool bIsNewFrame)
 the On-Drawing event handler for application layer More...
 
typedef void arm_2d_helper_render_handler_t(void *pTarget, const arm_2d_pfb_t *ptPFB, bool bIsNewFrame)
 the On Low Level Rendering event handler for the low level (LCD Driver) More...
 

Enumerations

enum  arm_2d_scene_player_switch_mode_t {
  ARM_2D_SCENE_SWITCH_CFG_NONE = 0 ,
  ARM_2D_SCENE_SWITCH_CFG_USER = 1 ,
  ARM_2D_SCENE_SWITCH_CFG_FADE_WHITE = 2 ,
  ARM_2D_SCENE_SWITCH_CFG_FADE_BLACK = 3 ,
  ARM_2D_SCENE_SWITCH_CFG_SLIDE_LEFT = 4 ,
  ARM_2D_SCENE_SWITCH_CFG_SLIDE_RIGHT ,
  ARM_2D_SCENE_SWITCH_CFG_SLIDE_UP ,
  ARM_2D_SCENE_SWITCH_CFG_SLIDE_DOWN ,
  ARM_2D_SCENE_SWITCH_CFG_ERASE_LEFT = 8 ,
  ARM_2D_SCENE_SWITCH_CFG_ERASE_RIGHT ,
  ARM_2D_SCENE_SWITCH_CFG_ERASE_UP ,
  ARM_2D_SCENE_SWITCH_CFG_ERASE_DOWN ,
  __ARM_2D_SCENE_SWITCH_CFG_VALID ,
  ARM_2D_SCENE_SWITCH_CFG_IGNORE_OLD_BG = _BV(8) ,
  ARM_2D_SCENE_SWITCH_CFG_IGNORE_OLD_SCEBE = _BV(9) ,
  ARM_2D_SCENE_SWITCH_CFG_IGNORE_NEW_BG = _BV(10) ,
  ARM_2D_SCENE_SWITCH_CFG_IGNORE_NEW_SCEBE = _BV(11) ,
  ARM_2D_SCENE_SWITCH_CFG_DEFAULT_BG_WHITE = 0 << 12 ,
  ARM_2D_SCENE_SWITCH_CFG_DEFAULT_BG_BLACK = 1 << 12 ,
  ARM_2D_SCENE_SWITCH_CFG_DEFAULT_BG_USER = 2 << 12 ,
  __ARM_2D_SCENE_SWTICH_CFG_IGNORE_msk = 0x0F << 8 ,
  __ARM_2D_SCENE_SWTICH_CFG_IGNORE_pos = 8 ,
  __ARM_2D_SCENE_SWTICH_CFG_DEFAULT_BG_msk = 3 << 12 ,
  __ARM_2D_SCENE_SWTICH_CFG_DEFAULT_BG_pos = 12
}
 scene switching mode More...
 
enum  {
  ARM_2D_PFB_DEPEND_ON_LOW_LEVEL_RENDERING = _BV(0) ,
  ARM_2D_PFB_DEPEND_ON_DRAWING = _BV(1) ,
  ARM_2D_PFB_DEPEND_ON_LOW_LEVEL_SYNC_UP = _BV(2) ,
  ARM_2D_PFB_DEPEND_ON_FRAME_SYNC_UP = _BV(3) ,
  ARM_2D_PFB_DEPEND_ON_EACH_FRAME_CPL = _BV(4) ,
  ARM_2D_PFB_DEPEND_ON_NAVIGATION = _BV(5)
}
 the enumeration for events More...
 

Functions

void arm_2d_scene_player_flush_fifo (arm_2d_scene_player_t *ptThis)
 flush the scene FIFO More...
 
void arm_2d_scene_player_append_scenes (arm_2d_scene_player_t *ptThis, arm_2d_scene_t *ptScenes, int_fast16_t hwCount)
 append a set of scenes to a scene player More...
 
void arm_2d_scene_player_update_scene_background (arm_2d_scene_player_t *ptThis)
 request updating the background of the current scene More...
 
void arm_2d_scene_player_switch_to_next_scene (arm_2d_scene_player_t *ptThis)
 request switching to the next scene safely More...
 
void __arm_2d_scene_player_set_switching_mode (arm_2d_scene_player_t *ptThis, arm_2d_scene_switch_mode_t *ptMode, uint16_t hwSettings)
 configure the scene switching mode More...
 
uint16_t arm_2d_scene_player_get_switching_cfg (arm_2d_scene_player_t *ptThis)
 read the current scene switching mode More...
 
void arm_2d_scene_player_set_switching_period (arm_2d_scene_player_t *ptThis, uint_fast16_t hwMS)
 configure the scene switching period More...
 
arm_2d_err_t __arm_2d_scene_player_register_on_draw_navigation_event_handler (arm_2d_scene_player_t *ptThis, arm_2d_helper_draw_handler_t *fnHandler, void *pTarget, arm_2d_region_list_item_t *ptDirtyRegions)
 register / update the evtOnDrawNavigation event handler. You can use this event to draw an ALWAY-TOP navigation bar or title during switching period. More...
 
arm_fsm_rt_t arm_2d_scene_player_task (arm_2d_scene_player_t *ptThis)
 the scene player task function More...
 
arm_2d_err_t arm_2d_helper_pfb_init (arm_2d_helper_pfb_t *ptThis, arm_2d_helper_pfb_cfg_t *ptCFG)
 initialize pfb helper service More...
 
arm_2d_region_t arm_2d_helper_pfb_get_display_area (arm_2d_helper_pfb_t *ptThis)
 get the display (screen) region More...
 
arm_fsm_rt_t arm_2d_helper_pfb_task (arm_2d_helper_pfb_t *ptThis, arm_2d_region_list_item_t *ptDirtyRegions)
 the task function for pfb helper More...
 
void arm_2d_helper_pfb_flush (arm_2d_helper_pfb_t *ptThis)
 flush the FPB FIFO More...
 
arm_2d_err_t arm_2d_helper_pfb_update_dependency (arm_2d_helper_pfb_t *ptThis, uint_fast8_t chMask, const arm_2d_helper_pfb_dependency_t *ptDependency)
 update PFB dependency (event handlers) More...
 
void __arm_2d_helper_pfb_report_rendering_complete (arm_2d_helper_pfb_t *ptThis, arm_2d_pfb_t *ptPFB)
 tell PFB helper that a low level LCD flushing work is complete More...
 
void arm_2d_helper_swap_rgb16 (uint16_t *phwBuffer, uint32_t wCount)
 swap the high and low bytes for each rgb16 pixel More...
 
arm_2d_pfb_t__arm_2d_helper_pfb_new (arm_2d_helper_pfb_t *ptThis)
 try to get a PFB block from the pool More...
 
void __arm_2d_helper_pfb_free (arm_2d_helper_pfb_t *ptThis, arm_2d_pfb_t *ptPFB)
 free a PFB block to the pool More...
 
__STATIC_INLINE uint8_t arm_2d_helper_alpha_mix (uint_fast8_t chAlpha1, uint_fast8_t chAlpha2)
 
void arm_2d_helper_init (void)
 initialize helper services More...
 
int64_t arm_2d_helper_convert_ticks_to_ms (int64_t lTick)
 convert ticks of a reference timer to millisecond More...
 
int64_t arm_2d_helper_convert_ms_to_ticks (uint32_t wMS)
 convert millisecond into ticks of the reference timer More...
 
uint32_t arm_2d_helper_get_reference_clock_frequency (void)
 get the reference clock frequency More...
 
int64_t arm_2d_helper_get_system_timestamp (void)
 get the current system stamp from the reference clock More...
 
bool __arm_2d_helper_is_time_out (int64_t lPeriod, int64_t *plTimestamp)
 set an alarm with given period and check the status More...
 
bool __arm_2d_helper_time_liner_slider (int32_t nFrom, int32_t nTo, int64_t lPeriod, int32_t *pnStroke, int64_t *plTimestamp)
 calculate the stroke of a liner slider based on time More...
 
bool __arm_2d_helper_time_half_cos_slider (int32_t nFrom, int32_t nTo, int64_t lPeriod, int32_t *pnStroke, int64_t *plTimestamp)
 calculate the stroke of a cosine slider (0~pi) based on time More...
 
bool __arm_2d_helper_time_cos_slider (int32_t nFrom, int32_t nTo, int64_t lPeriod, float fPhase, int32_t *pnStroke, int64_t *plTimestamp)
 calculate the stroke of a consine slider (0~2pi) based on time More...
 

Variables

arm_2d_scene_switch_mode_t ARM_2D_SCENE_SWITCH_MODE_NONE
 
arm_2d_scene_switch_mode_t ARM_2D_SCENE_SWITCH_MODE_USER
 
arm_2d_scene_switch_mode_t ARM_2D_SCENE_SWITCH_MODE_FADE_WHITE
 
arm_2d_scene_switch_mode_t ARM_2D_SCENE_SWITCH_MODE_FADE_BLACK
 
arm_2d_scene_switch_mode_t ARM_2D_SCENE_SWITCH_MODE_SLIDE_LEFT
 
arm_2d_scene_switch_mode_t ARM_2D_SCENE_SWITCH_MODE_SLIDE_RIGHT
 
arm_2d_scene_switch_mode_t ARM_2D_SCENE_SWITCH_MODE_SLIDE_UP
 
arm_2d_scene_switch_mode_t ARM_2D_SCENE_SWITCH_MODE_SLIDE_DOWN
 
arm_2d_scene_switch_mode_t ARM_2D_SCENE_SWITCH_MODE_ERASE_LEFT
 
arm_2d_scene_switch_mode_t ARM_2D_SCENE_SWITCH_MODE_ERASE_RIGHT
 
arm_2d_scene_switch_mode_t ARM_2D_SCENE_SWITCH_MODE_ERASE_UP
 
arm_2d_scene_switch_mode_t ARM_2D_SCENE_SWITCH_MODE_ERASE_DOWN
 

Description


Data Structure Documentation

◆ __arm_2d_helper_scene_switch_t

union __arm_2d_helper_scene_switch_t

an internal data structure for scene switching

Note
Please do not use it.
Data Fields
struct __arm_2d_helper_scene_switch_t.Feature Feature
uint16_t hwSetting the setting value

◆ arm_2d_scene_switch_mode_t

struct arm_2d_scene_switch_mode_t

scene switching mode descriptor

Data Fields
uint8_t chEffects switching effects
arm_2d_helper_draw_handler_t * fnSwitchDrawer switching algorithm

◆ arm_2d_scene_t

struct arm_2d_scene_t

a class for describing scenes which are the combination of a background and a foreground with a dirty-region-list support

Data Fields

arm_2d_scene_tptNext
 next scene More...
 
arm_2d_scene_player_tptPlayer
 points to the host scene player More...
 
arm_2d_region_list_item_tptDirtyRegion
 dirty region list for the foreground More...
 
arm_2d_helper_draw_handler_tfnBackground
 the function pointer for the background More...
 
arm_2d_helper_draw_handler_tfnScene
 the function pointer for the foreground More...
 
void(* fnOnBGStart )(arm_2d_scene_t *ptThis)
 on-start-drawing-background event handler More...
 
void(* fnOnBGComplete )(arm_2d_scene_t *ptThis)
 on-complete-drawing-background event handler More...
 
void(* fnOnFrameStart )(arm_2d_scene_t *ptThis)
 on-frame-start event handler More...
 
void(* fnOnFrameCPL )(arm_2d_scene_t *ptThis)
 on-frame-complete event handler More...
 
void(* fnDepose )(arm_2d_scene_t *ptThis)
 on-scene-depose event handler More...
 
struct {
uint8_t bOnSwitchingIgnoreBG: 1
 ignore background during switching period More...
 
uint8_t bOnSwitchingIgnoreScene: 1
 ignore forground during switching period More...
 
}; 
 

Field Documentation

◆ ptNext

arm_2d_scene_t* arm_2d_scene_t::ptNext

next scene

◆ ptPlayer

arm_2d_scene_player_t* arm_2d_scene_t::ptPlayer

points to the host scene player

◆ ptDirtyRegion

arm_2d_region_list_item_t* arm_2d_scene_t::ptDirtyRegion

dirty region list for the foreground

◆ fnBackground

arm_2d_helper_draw_handler_t* arm_2d_scene_t::fnBackground

the function pointer for the background

◆ fnScene

arm_2d_helper_draw_handler_t* arm_2d_scene_t::fnScene

the function pointer for the foreground

◆ fnOnBGStart

void(* arm_2d_scene_t::fnOnBGStart) (arm_2d_scene_t *ptThis)

on-start-drawing-background event handler

◆ fnOnBGComplete

void(* arm_2d_scene_t::fnOnBGComplete) (arm_2d_scene_t *ptThis)

on-complete-drawing-background event handler

◆ fnOnFrameStart

void(* arm_2d_scene_t::fnOnFrameStart) (arm_2d_scene_t *ptThis)

on-frame-start event handler

◆ fnOnFrameCPL

void(* arm_2d_scene_t::fnOnFrameCPL) (arm_2d_scene_t *ptThis)

on-frame-complete event handler

◆ fnDepose

void(* arm_2d_scene_t::fnDepose) (arm_2d_scene_t *ptThis)

on-scene-depose event handler

Note
We use fnDepose to free the resources

◆ arm_2d_scene_player_t

struct arm_2d_scene_player_t

a class to manage scenes

Data Fields
arm_2d_helper_pfb_t inherit from arm_2d_helper_pfb_t

points to the head of the FIFO points to the tail of the FIFO Scene FIFO a flag to request switching-to-the next-scene indication of scene switching completion update the background of the current scene the state of the FSM used by runtime. scene player runtime the switching mode FSM state FSM state opacity of the cover the colour of the cover FSM state scene window a temp tile erase offset FSM state scene window slide offset the switching configuration the switching should finish in specified millisecond

struct arm_2d_scene_player_t.__unnamed123__ __unnamed__

◆ arm_2d_pfb_t

struct arm_2d_pfb_t

the header of a PFB block

Data Fields
struct arm_2d_pfb_t * ptNext next pfb block
arm_2d_helper_pfb_t * ptPFBHelper the pfb helper service current PFB block comes from
arm_2d_tile_t tTile descriptor
uint32_t u24Size: 24
uint32_t bIsNewFrame: 1 a flag to indicate the starting of a frame

◆ arm_2d_region_list_item_t

struct arm_2d_region_list_item_t

the node of a region list

Data Fields
struct arm_2d_region_list_item_t * ptNext the next node
arm_2d_region_t tRegion the region

◆ arm_2d_helper_render_evt_t

struct arm_2d_helper_render_evt_t

on low level render event

Data Fields
arm_2d_helper_render_handler_t * fnHandler event handler function
void * pTarget user attached target

◆ arm_2d_helper_draw_evt_t

struct arm_2d_helper_draw_evt_t

on drawing event

Data Fields
arm_2d_helper_draw_handler_t * fnHandler event handler function
void * pTarget user attached target

◆ arm_2d_helper_pfb_dependency_t

struct arm_2d_helper_pfb_dependency_t

The PFB Helper Service Dependency.

Data Fields
arm_2d_helper_render_evt_t evtOnLowLevelRendering event handler for low level rendering
arm_2d_helper_draw_evt_t evtOnDrawing event handler for drawing GUI
arm_2d_evt_t evtOnLowLevelSyncUp low level rendering handler wants to sync-up (return arm_fsm_rt_wait_for_obj)
arm_2d_evt_t evtOnEachFrameCPL event handler for each frame complete
struct arm_2d_helper_pfb_dependency_t.Navigation Navigation event handler for drawing GUI

◆ arm_2d_helper_pfb_cfg_t

struct arm_2d_helper_pfb_cfg_t

PFB Helper configuration.

Data Fields
arm_2d_region_t tDisplayArea screen description
struct arm_2d_helper_pfb_cfg_t.FrameBuffer FrameBuffer frame buffer context
arm_2d_helper_pfb_dependency_t Dependency user registered dependency

◆ arm_2d_helper_pfb_t

struct arm_2d_helper_pfb_t

the PFB helper control block

Data Fields
struct arm_2d_helper_pfb_t.__unnamed136__ __unnamed__ < user configuration
struct arm_2d_helper_pfb_t.Statistics Statistics performance statistics

◆ __arm_2d_helper_scene_switch_t.Feature

struct __arm_2d_helper_scene_switch_t.Feature
Data Fields
uint8_t chMode the switch visual effect
uint8_t bIgnoreOldSceneBG: 1 when set, ignore the background of the old scene
uint8_t bIgnoreOldScene: 1 when set, ignore the old scene
uint8_t bIgnoreNewSceneBG: 1 when set, ignore the background of the new scene
uint8_t bIgnoreNewScene: 1 when set, ignore the new scene
uint8_t u2DefaultBG: 2 the default background

◆ arm_2d_scene_t.__unnamed121__

struct arm_2d_scene_t.__unnamed121__
Data Fields
uint8_t bOnSwitchingIgnoreBG: 1 ignore background during switching period
uint8_t bOnSwitchingIgnoreScene: 1 ignore forground during switching period

◆ arm_2d_scene_player_t.__unnamed123__

struct arm_2d_scene_player_t.__unnamed123__

◆ arm_2d_scene_player_t.__unnamed123__.SceneFIFO

struct arm_2d_scene_player_t.__unnamed123__.SceneFIFO
Data Fields
arm_2d_scene_t * ptHead
arm_2d_scene_t * ptTail

◆ arm_2d_scene_player_t.__unnamed123__.Runtime

struct arm_2d_scene_player_t.__unnamed123__.Runtime
Data Fields
uint8_t bNextSceneReq: 1
uint8_t bSwitchCPL: 1
uint8_t bUpdateBG: 1
uint8_t chState

◆ arm_2d_scene_player_t.__unnamed123__.Switch

struct arm_2d_scene_player_t.__unnamed123__.Switch
Data Fields
arm_2d_scene_switch_mode_t * ptMode
union arm_2d_scene_player_t.__unnamed123__.Switch.__unnamed128__ __unnamed__
__arm_2d_helper_scene_switch_t tConfig
uint16_t hwPeriod
int64_t lTimeStamp

◆ arm_2d_scene_player_t.__unnamed123__.Switch.__unnamed128__

union arm_2d_scene_player_t.__unnamed123__.Switch.__unnamed128__

◆ arm_2d_scene_player_t.__unnamed123__.Switch.__unnamed128__.Fade

struct arm_2d_scene_player_t.__unnamed123__.Switch.__unnamed128__.Fade
Data Fields
uint8_t chState
uint8_t chOpacity
bool bIsFadeBlack

◆ arm_2d_scene_player_t.__unnamed123__.Switch.__unnamed128__.Erase

struct arm_2d_scene_player_t.__unnamed123__.Switch.__unnamed128__.Erase
Data Fields
uint8_t chState
arm_2d_tile_t tSceneWindow
arm_2d_tile_t tTemp
int16_t iOffset

◆ arm_2d_scene_player_t.__unnamed123__.Switch.__unnamed128__.Slide

struct arm_2d_scene_player_t.__unnamed123__.Switch.__unnamed128__.Slide
Data Fields
uint8_t chState
arm_2d_tile_t tSceneWindow
int16_t iOffset

◆ arm_2d_helper_pfb_dependency_t.Navigation

struct arm_2d_helper_pfb_dependency_t.Navigation

event handler for drawing GUI

Data Fields
arm_2d_helper_draw_evt_t evtOnDrawing
arm_2d_region_list_item_t * ptDirtyRegion

◆ arm_2d_helper_pfb_cfg_t.FrameBuffer

struct arm_2d_helper_pfb_cfg_t.FrameBuffer
Data Fields
arm_2d_pfb_t * ptPFBs current PFB block
arm_2d_size_t tFrameSize the size of the frame
uint32_t wBufferSize the buffer size
uint16_t hwPFBNum the number of PFB
uint16_t bDoNOTUpdateDefaultFrameBuffer: 1 A flag to disable automatically default-framebuffer-registration.
uint16_t bDisableDynamicFPBSize: 1 A flag to disable resize of the PFB block.
uint16_t bSwapRGB16: 1 A flag to enable swapping high and low bytes of an RGB16 pixel.
uint16_t u4PoolReserve: 4 reserve specific number of PFB for other helper services

◆ arm_2d_helper_pfb_t.__unnamed136__

struct arm_2d_helper_pfb_t.__unnamed136__

< user configuration

Data Fields
arm_2d_helper_pfb_cfg_t tCFG
struct arm_2d_helper_pfb_t.__unnamed136__.Adapter Adapter

◆ arm_2d_helper_pfb_t.__unnamed136__.Adapter

struct arm_2d_helper_pfb_t.__unnamed136__.Adapter
Data Fields
arm_2d_region_t tDrawRegion
arm_2d_region_t tTargetRegion
arm_2d_region_list_item_t * ptDirtyRegion
arm_2d_tile_t tPFBTile
arm_2d_size_t tFrameSize
bool bFirstIteration
bool bIsRegionChanged
uint8_t chPT
struct arm_2d_helper_pfb_t.__unnamed136__.Adapter.__unnamed140__ __unnamed__
uint16_t hwFreePFBCount
arm_2d_pfb_t * ptCurrent
arm_2d_pfb_t * ptFreeList
arm_2d_pfb_t * ptFlushing
struct arm_2d_helper_pfb_t.__unnamed136__.Adapter.FlushFIFO FlushFIFO
arm_2d_tile_t * ptFrameBuffer

◆ arm_2d_helper_pfb_t.__unnamed136__.Adapter.__unnamed140__

struct arm_2d_helper_pfb_t.__unnamed136__.Adapter.__unnamed140__
Data Fields
uint8_t bIsNewFrame: 1
uint8_t bIsFlushRequested:1
uint8_t bNoAdditionalDirtyRegionList

◆ arm_2d_helper_pfb_t.__unnamed136__.Adapter.FlushFIFO

struct arm_2d_helper_pfb_t.__unnamed136__.Adapter.FlushFIFO
Data Fields
arm_2d_pfb_t * ptHead
arm_2d_pfb_t * ptTail

◆ arm_2d_helper_pfb_t.Statistics

struct arm_2d_helper_pfb_t.Statistics
Data Fields
int64_t lTimestamp PLEASE DO NOT USE.
int32_t nTotalCycle cycles used by drawing
int32_t nRenderingCycle cycles used in LCD flushing

Macro Definition Documentation

◆ arm_2d_scene_player_register_on_draw_navigation_event_handler

#define arm_2d_scene_player_register_on_draw_navigation_event_handler (   __DISP_ADAPTER_PTR,
  __DRAW_HANDLER,
  __USER_TARGET_PTR,
  ... 
)
Value:
(__DISP_ADAPTER_PTR), \
(__DRAW_HANDLER), \
(__USER_TARGET_PTR), \
(NULL,##__VA_ARGS__))

register / update the evtOnDrawNavigation event handler. You can use this event to draw an ALWAY-TOP navigation bar or title during switching period.

Parameters
[in]__DISP_ADAPTER_PTRthe target scene player
[in]__DRAW_HANDLERthe event handler to draw the navigation bar and/or titles
[in]__USER_TARGET_PTRthe address of an user specified object. If it is NULL, ptThis will be used instead.
[in]...an optional dirty region list for the navigation layer. If ommited, NULL is used.
Note
if the optional dirty region list is omitted and the normal scene doesn't cover the region of the content in the navigation layer, you won't see the content.
Returns
arm_2d_err_t the operation result

◆ arm_2d_scene_player_set_switching_mode

#define arm_2d_scene_player_set_switching_mode (   __DISP_ADAPTER_PTR,
  __SWITCH_MODE,
  ... 
)
Value:
&(__SWITCH_MODE), \
(0,##__VA_ARGS__))

configure the scene switching mode

Parameters
[in]__DISP_ADAPTER_PTRthe target scene player
[in]__SWITCH_MODEa switching mode object
[in]...an optional configurations for the switching

◆ ARM_2D_HELPER_PFB_INIT

#define ARM_2D_HELPER_PFB_INIT (   __CB_ADDR,
  __SCREEN_WIDTH,
  __SCREEN_HEIGHT,
  __PIXEL_TYPE,
  __WIDTH,
  __HEIGHT,
  __PFB_NUM,
  ... 
)
Value:
({ \
__attribute__((section(".bss.noinit.arm_2d_pfb_pool"))) \
static struct { \
arm_2d_pfb_t tFPB; \
__ALIGNED(4) \
__PIXEL_TYPE tBuffer[(__WIDTH) * (__HEIGHT)]; \
} s_tPFBs[__PFB_NUM]; \
\
.tDisplayArea.tSize = { \
.iWidth = (__SCREEN_WIDTH), \
.iHeight = (__SCREEN_HEIGHT), \
}, \
\
.FrameBuffer.ptPFBs = (arm_2d_pfb_t *)s_tPFBs, \
.FrameBuffer.tFrameSize = { \
.iWidth = (__WIDTH), \
.iHeight = (__HEIGHT), \
}, \
.FrameBuffer.wBufferSize = sizeof(s_tPFBs[0].tBuffer), \
.FrameBuffer.hwPFBNum = dimof(s_tPFBs), \
.Dependency = \
__VA_ARGS__ \
}; \
\
arm_2d_helper_pfb_init((__CB_ADDR), &tCFG); \
})

a macro wrapper in uppercase to help initialising PFB service

Parameters
[in]__CB_ADDRthe address of the arm_2d_helper_pfb_t object
[in]__SCREEN_WIDTHthe width of the screen
[in]__SCREEN_HEIGHTthe hight of the screen
[in]__PIXEL_TYPEthe integer type of the pixel, i.e. uint8_t, uint16_t, uint32_t
[in]__WIDTHthe width of the PFB block
[in]__HEIGHTthe height of the PFB block
Note
For the same number of pixels in a PFB block, please priority the width over height, for example, 240 * 1 is better than 30 * 8
Parameters
[in]__PFB_NUMthe number of PFB blocks in the built-in PFB pool.
[in]...a code block to add additional initializer, see example below:
Returns
arm_2d_err_t the result of the initialisation process
static ARM_NOINIT arm_2d_helper_pfb_t s_tExamplePFB;
...
// initialise FPB helper
&s_tExamplePFB, // FPB Helper object
__GLCD_CFG_SCEEN_WIDTH__, // screen width
__GLCD_CFG_SCEEN_HEIGHT__, // screen height
uint16_t, // colour date type
240, // PFB block width
1, // PFB block height
1, // number of PFB in the PFB pool
{
.evtOnLowLevelRendering = {
// callback for low level rendering
.fnHandler = &__pfb_render_handler,
},
.evtOnDrawing = {
// callback for drawing GUI
.fnHandler = &__pfb_draw_background_handler,
},
},
//.FrameBuffer.bSwapRGB16 = true,
) < 0) {
//! error detected
assert(false);
}

◆ ARM_2D_HELPER_PFB_UPDATE_ON_DRAW_HANDLER

#define ARM_2D_HELPER_PFB_UPDATE_ON_DRAW_HANDLER (   __CB_ADDR,
  __HANDLER,
  ... 
)
Value:
/* An optional target address */ \
arm_2d_helper_pfb_update_dependency((__CB_ADDR), \
.evtOnDrawing = { \
.fnHandler = (__HANDLER), \
.pTarget = (NULL,##__VA_ARGS__),\
}, \
}})

a macro wrapper to update the evtOnDrawring event handler

Parameters
[in]__CB_ADDRthe address of the arm_2d_helper_pfb_t object
[in]__HANDLERthe new handler
[in]...[Optional] an address (of user defined structure) passed to the event handler.
Returns
arm_2d_err_t the process result

◆ __IMPL_ARM_2D_REGION_LIST

#define __IMPL_ARM_2D_REGION_LIST (   __NAME,
  ... 
)
Value:
enum { \
__NAME##_offset = __COUNTER__, \
}; \
__VA_ARGS__ \
arm_2d_region_list_item_t __NAME[] = {

◆ __ADD_REGION_TO_LIST

#define __ADD_REGION_TO_LIST (   __NAME,
  ... 
)
Value:
{ \
.ptNext = (arm_2d_region_list_item_t *) \
&(__NAME[__COUNTER__ - __NAME##_offset]), \
.tRegion = { \
__VA_ARGS__ \
}, \
}

◆ __ADD_LAST_REGION_TO_LIST

#define __ADD_LAST_REGION_TO_LIST (   __NAME,
  ... 
)
Value:
{ \
.ptNext = NULL, \
.tRegion = { \
__VA_ARGS__ \
}, \
}

◆ IMPL_PFB_ON_DRAW

#define IMPL_PFB_ON_DRAW (   __NAME)
Value:
arm_fsm_rt_t __NAME(void *pTarget, \
const arm_2d_tile_t *ptTile, \
bool bIsNewFrame)

◆ IMPL_PFB_ON_LOW_LV_RENDERING

#define IMPL_PFB_ON_LOW_LV_RENDERING (   __NAME)
Value:
void __NAME(void *pTarget, \
const arm_2d_pfb_t *ptPFB, \
bool bIsNewFrame)

◆ init_arm_2d_helper_pfb

#define init_arm_2d_helper_pfb (   __CB_ADDR,
  __SCREEN_WIDTH,
  __SCREEN_HEIGHT,
  __PIXEL_TYPE,
  __WIDTH,
  __HEIGHT,
  __PFB_NUM,
  ... 
)
Value:
__CB_ADDR, \
__SCREEN_WIDTH, \
__SCREEN_HEIGHT, \
__PIXEL_TYPE, \
__WIDTH, \
__HEIGHT, \
__PFB_NUM, \
##__VA_ARGS__ \
)

a macro wrapper in lowercase to help initialising PFB service

Parameters
[in]__CB_ADDRthe address of the arm_2d_helper_pfb_t object
[in]__SCREEN_WIDTHthe width of the screen
[in]__SCREEN_HEIGHTthe hight of the screen
[in]__PIXEL_TYPEthe integer type of the pixel, i.e. uint8_t, uint16_t, uint32_t
[in]__WIDTHthe width of the PFB block
[in]__HEIGHTthe height of the PFB block
Note
For the same number of pixels in a PFB block, please priority the width over height, for example, 240 * 1 is better than 30 * 8
Parameters
[in]__PFB_NUMthe number of PFB blocks in the built-in PFB pool.
[in]...a code block to add additional initializer, see example below:
Returns
arm_2d_err_t the result of the initialisation process
static ARM_NOINIT arm_2d_helper_pfb_t s_tExamplePFB;
...
// initialise FPB helper
&s_tExamplePFB, // FPB Helper object
__GLCD_CFG_SCEEN_WIDTH__, // screen width
__GLCD_CFG_SCEEN_HEIGHT__, // screen height
uint16_t, // colour date type
240, // PFB block width
1, // PFB block height
1, // number of PFB in the PFB pool
{
.evtOnLowLevelRendering = {
// callback for low level rendering
.fnHandler = &__pfb_render_handler,
},
.evtOnDrawing = {
// callback for drawing GUI
.fnHandler = &__pfb_draw_background_handler,
},
},
//.FrameBuffer.bSwapRGB16 = true,
) < 0) {
//! error detected
assert(false);
}

◆ update_arm_2d_helper_pfb_on_draw_handler

#define update_arm_2d_helper_pfb_on_draw_handler (   __CB_ADDR,
  __HANDLER,
  ... 
)
Value:
/* An optional target address */ \
ARM_2D_HELPER_PFB_UPDATE_ON_DRAW_HANDLER( \
(__CB_ADDR), \
(__HANDLER),##__VA_ARGRS__)

a macro wrapper to update the evtOnDrawring event handler

Parameters
[in]__CB_ADDRthe address of the arm_2d_helper_pfb_t object
[in]__HANDLERthe new handler
[in]...[Optional] an address (of user defined structure) passed to the event handler.
Returns
arm_2d_err_t the process result

◆ arm_2d_helper_pfb_report_rendering_complete

#define arm_2d_helper_pfb_report_rendering_complete (   __PFB_HELPER_PTR,
  ... 
)
Value:
(NULL,##__VA_ARGS__))

tell PFB helper that a low level LCD flushing work is complete

Note
This function is THREAD-SAFE, You can call this function asynchronously, e.g.
  • A ISR to indicate DMA-transfer complete event or
  • A different Thread
Parameters
[in]ptThisthe PFB control block
[in]...the used PFB block.
Note
please do not use this parameter, it is only kept for backward compatability.

◆ __declare_tile

#define __declare_tile (   __name)     extern const arm_2d_tile_t __name;

Please do NOT use this macro.

◆ declare_tile

#define declare_tile (   __name)    __declare_tile(__name)

declare a tile

Parameters
__namethe name of the tile

◆ dcl_tile

#define dcl_tile (   __name)    declare_tile(__name)

declare a tile

Parameters
__namethe name of the tile

◆ dcl_fb

#define dcl_fb (   __name)    declare_tile(__name)

declare a framebuffer

Parameters
__namethe name of the framebuffer

◆ __impl_fb

#define __impl_fb (   __name,
  __width,
  __height,
  __type,
  ... 
)
Value:
ARM_NOINIT static __type \
__name##Buffer[(__width) * (__height)]; \
const arm_2d_tile_t __name = { \
.tRegion = { \
.tSize = {(__width), (__height)}, \
}, \
.tInfo.bIsRoot = true, \
.pchBuffer = (uint8_t *)__name##Buffer, \
__VA_ARGS__ \
}

Please do NOT use this macro.

◆ impl_fb

#define impl_fb (   __name,
  __width,
  __height,
  __type,
  ... 
)     __impl_fb(__name, __width, __height, __type, ##__VA_ARGS__)

implement a framebuffer

Parameters
__namethe name of the framebuffer
__widththe width
__heightthe height
__typethe type of the pixel
...an optional initialisation for other members of arm_2d_tile_t

◆ impl_heap_fb

#define impl_heap_fb (   __tile_name,
  __width,
  __height,
  __colour_type 
)
Value:
arm_2d_tile_t __tile_name = { \
.pchBuffer = malloc((__width) * (__height) * sizeof(__colour_type)),\
}, \
({__tile_name.tRegion.tSize.iWidth = (__width); \
__tile_name.tRegion.tSize.iHeight = (__height); \
__tile_name.tInfo.bIsRoot = true; \
assert(NULL != __tile_name.pchBuffer); \
}), \
({ arm_2d_op_wait_async(NULL); free(__tile_name.phwBuffer); }) )

implement a framebuffer and allocate it from the heap

Note
the framebuffer will be freed automatically when run out of the code body.
Parameters
__tile_namethe name of the framebuffer
__widththe width
__heightthe height
__colour_typethe type of the pixel

◆ get_tile_buffer_pixel_count

#define get_tile_buffer_pixel_count (   __name)
Value:
(uint32_t)( (__name.tRegion.tSize.iWidth) \
* (__name.tRegion.tSize.iHeight))

calculate the number of pixels in a given tile

Parameters
__namethe target tile
Returns
uint32_t the number of pixels

◆ get_tile_buffer_size

#define get_tile_buffer_size (   __name,
  __type 
)     (get_2d_layer_buffer_pixel_count(__name) * sizeof(__type))

calculate the size of a given framebuffer

Parameters
__namethe target tile
__typethe pixel type
Returns
uint32_t the buffer size

◆ impl_child_tile

#define impl_child_tile (   __parent,
  __x,
  __y,
  __width,
  __height,
  ... 
)
Value:
{ \
.tRegion = { \
.tLocation = { \
.iX = (__x), \
.iY = (__y), \
}, \
.tSize = { \
.iWidth = (__width), \
.iHeight = (__height), \
}, \
}, \
.tInfo.bIsRoot = false, \
.tInfo.bDerivedResource = true, \
.ptParent = (arm_2d_tile_t *)&(__parent), \
__VA_ARGS__ \
}

implement a child tile for a given parent

Parameters
__parentthe parent tile
__xthe x offset in the parent region
__ythe y offset in the parent region
__widththe width of the new tile
__heightthe height of the new tile
...an optional initialisation for other members of arm_2d_tile_t

◆ __arm_2d_align_top_left2

#define __arm_2d_align_top_left2 (   __region,
  __size 
)
Value:
for (arm_2d_region_t __top_left_region = { \
.tSize = (__size), \
.tLocation = { \
.iX = 0, \
.iY = 0, \
}, \
}, \
*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
arm_2d_op_wait_async(NULL) \
)

Please do NOT use this macro.

◆ __arm_2d_align_top_left3

#define __arm_2d_align_top_left3 (   __region,
  __width,
  __height 
)
Value:
for (arm_2d_region_t __top_left_region = { \
.tSize = { \
.iWidth = (__width), \
.iHeight = (__height), \
}, \
.tLocation = { \
.iX = 0, \
.iY = 0, \
}, \
}, \
*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
arm_2d_op_wait_async(NULL) \
)

Please do NOT use this macro.

◆ arm_2d_align_top_left

#define arm_2d_align_top_left (   ...)
Value:
ARM_CONNECT2( __arm_2d_align_top_left, \
__ARM_VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)

generate a temporary arm_2d_region_t object with use specified info for top-left alignment.

Parameters
...parameter list
Note
prototype 1: __arm_2d_align_top_left(__region, __size) { code body that can use __top_left_region }
prototype 2: __arm_2d_align_top_left(__region, __width, __height) { code body that can use __top_left_region }

◆ __arm_2d_align_top_centre2

#define __arm_2d_align_top_centre2 (   __region,
  __size 
)
Value:
for (arm_2d_region_t __top_centre_region = { \
.tSize = (__size), \
.tLocation = { \
.iX = ((__region).tSize.iWidth - (__size).iWidth) >> 1, \
.iY = 0, \
}, \
}, \
*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
arm_2d_op_wait_async(NULL) \
)

Please do NOT use this macro.

◆ __arm_2d_align_top_centre3

#define __arm_2d_align_top_centre3 (   __region,
  __width,
  __height 
)
Value:
for (arm_2d_region_t __top_centre_region = { \
.tSize = { \
.iWidth = (__width), \
.iHeight = (__height), \
}, \
.tLocation = { \
.iX = ((__region).tSize.iWidth - (__width)) >> 1, \
.iY = 0, \
}, \
}, \
*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
arm_2d_op_wait_async(NULL) \
)

Please do NOT use this macro.

◆ arm_2d_align_top_centre

#define arm_2d_align_top_centre (   ...)
Value:
ARM_CONNECT2( __arm_2d_align_top_centre, \
__ARM_VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)

generate a temporary arm_2d_region_t object with use specified info for top-central alignment.

Parameters
...parameter list
Note
prototype 1: arm_2d_align_top_centre(__region, __size) { code body that can use __top_centre_region }
prototype 2: arm_2d_align_top_centre(__region, __width, __height) { code body that can use __top_centre_region }

◆ __arm_2d_align_top_right2

#define __arm_2d_align_top_right2 (   __region,
  __size 
)
Value:
for (arm_2d_region_t __top_right_region = { \
.tSize = (__size), \
.tLocation = { \
.iX = ((__region).tSize.iWidth - (__size).iWidth), \
.iY = 0, \
}, \
}, \
*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
arm_2d_op_wait_async(NULL) \
)

Please do NOT use this macro.

◆ __arm_2d_align_top_right3

#define __arm_2d_align_top_right3 (   __region,
  __width,
  __height 
)
Value:
for (arm_2d_region_t __top_right_region = { \
.tSize = { \
.iWidth = (__width), \
.iHeight = (__height), \
}, \
.tLocation = { \
.iX = ((__region).tSize.iWidth - (__width)), \
.iY = 0, \
}, \
}, \
*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
arm_2d_op_wait_async(NULL) \
)

Please do NOT use this macro.

◆ arm_2d_align_top_right

#define arm_2d_align_top_right (   ...)
Value:
ARM_CONNECT2( __arm_2d_align_top_right, \
__ARM_VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)

generate a temporary arm_2d_region_t object with use specified info for top-right alignment.

Parameters
...parameter list
Note
prototype 1: __arm_2d_align_top_right(__region, __size) { code body that can use __top_right_region }
prototype 2: __arm_2d_align_top_right(__region, __width, __height) { code body that can use __top_right_region }

◆ __arm_2d_align_mid_left2

#define __arm_2d_align_mid_left2 (   __region,
  __size 
)
Value:
for (arm_2d_region_t __mid_left_region = { \
.tSize = (__size), \
.tLocation = { \
.iX = 0, \
.iY = ((__region).tSize.iHeight - (__size).iHeight)>> 1, \
}, \
}, \
*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
arm_2d_op_wait_async(NULL) \
)

Please do NOT use this macro.

◆ __arm_2d_align_mid_left3

#define __arm_2d_align_mid_left3 (   __region,
  __width,
  __height 
)
Value:
for (arm_2d_region_t __mid_left_region = { \
.tSize = { \
.iWidth = (__width), \
.iHeight = (__height), \
}, \
.tLocation = { \
.iX = 0, \
.iY = ((__region).tSize.iHeight - (__height))>> 1, \
}, \
}, \
*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
arm_2d_op_wait_async(NULL) \
)

Please do NOT use this macro.

◆ arm_2d_align_mid_left

#define arm_2d_align_mid_left (   ...)
Value:
ARM_CONNECT2( __arm_2d_align_mid_left, \
__ARM_VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)

generate a temporary arm_2d_region_t object with use specified info for middle-left alignment.

Parameters
...parameter list
Note
prototype 1: arm_2d_align_mid_left(__region, __size) { code body that can use __mid_left_region }
prototype 2: arm_2d_align_mid_left(__region, __width, __height) { code body that can use __mid_left_region }

◆ __arm_2d_align_centre2

#define __arm_2d_align_centre2 (   __region,
  __size 
)
Value:
for (arm_2d_region_t __centre_region = { \
.tSize = (__size), \
.tLocation = { \
.iX = ((__region).tSize.iWidth - (__size).iWidth) >> 1, \
.iY = ((__region).tSize.iHeight - (__size).iHeight)>> 1, \
}, \
}, \
*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
arm_2d_op_wait_async(NULL) \
)

Please do NOT use this macro.

◆ __arm_2d_align_centre3

#define __arm_2d_align_centre3 (   __region,
  __width,
  __height 
)
Value:
for (arm_2d_region_t __centre_region = { \
.tSize = { \
.iWidth = (__width), \
.iHeight = (__height), \
}, \
.tLocation = { \
.iX = ((__region).tSize.iWidth - (__width)) >> 1, \
.iY = ((__region).tSize.iHeight - (__height))>> 1, \
}, \
}, \
*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
arm_2d_op_wait_async(NULL) \
)

Please do NOT use this macro.

◆ arm_2d_align_centre

#define arm_2d_align_centre (   ...)
Value:
ARM_CONNECT2( __arm_2d_align_centre, \
__ARM_VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)

generate a temporary arm_2d_region_t object with use specified info for central alignment.

Parameters
...parameter list
Note
prototype 1: arm_2d_align_centre(__region, __size) { code body that can use __centre_region }
prototype 2: arm_2d_align_centre(__region, __width, __height) { code body that can use __centre_region }

◆ __arm_2d_align_mid_right2

#define __arm_2d_align_mid_right2 (   __region,
  __size 
)
Value:
for (arm_2d_region_t __mid_right_region = { \
.tSize = (__size), \
.tLocation = { \
.iX = ((__region).tSize.iWidth - (__size).iWidth), \
.iY = ((__region).tSize.iHeight - (__size).iHeight)>> 1, \
}, \
}, \
*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
arm_2d_op_wait_async(NULL) \
)

Please do NOT use this macro.

◆ __arm_2d_align_mid_right3

#define __arm_2d_align_mid_right3 (   __region,
  __width,
  __height 
)
Value:
for (arm_2d_region_t __mid_right_region = { \
.tSize = { \
.iWidth = (__width), \
.iHeight = (__height), \
}, \
.tLocation = { \
.iX = ((__region).tSize.iWidth - (__width)), \
.iY = ((__region).tSize.iHeight - (__height))>> 1, \
}, \
}, \
*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
arm_2d_op_wait_async(NULL) \
)

Please do NOT use this macro.

◆ arm_2d_align_mid_right

#define arm_2d_align_mid_right (   ...)
Value:
ARM_CONNECT2( __arm_2d_align_mid_right, \
__ARM_VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)

generate a temporary arm_2d_region_t object with use specified info for middle-right alignment.

Parameters
...parameter list
Note
prototype 1: arm_2d_align_mid_right(__region, __size) { code body that can use __mid_right_region }
prototype 2: arm_2d_align_mid_right(__region, __width, __height) { code body that can use __mid_right_region }

◆ __arm_2d_align_bottom_left2

#define __arm_2d_align_bottom_left2 (   __region,
  __size 
)
Value:
for (arm_2d_region_t __bottom_left_region = { \
.tSize = (__size), \
.tLocation = { \
.iX = 0, \
.iY = ((__region).tSize.iHeight - (__size).iHeight), \
}, \
}, \
*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
arm_2d_op_wait_async(NULL) \
)

Please do NOT use this macro.

◆ __arm_2d_align_bottom_left3

#define __arm_2d_align_bottom_left3 (   __region,
  __width,
  __height 
)
Value:
for (arm_2d_region_t __bottom_left_region = { \
.tSize = { \
.iWidth = (__width), \
.iHeight = (__height), \
}, \
.tLocation = { \
.iX = 0, \
.iY = ((__region).tSize.iHeight - (__height)), \
}, \
}, \
*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
arm_2d_op_wait_async(NULL) \
)

Please do NOT use this macro.

◆ arm_2d_align_bottom_left

#define arm_2d_align_bottom_left (   ...)
Value:
ARM_CONNECT2( __arm_2d_align_bottom_left, \
__ARM_VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)

generate a temporary arm_2d_region_t object with use specified info for bottom-left alignment.

Parameters
...parameter list
Note
prototype 1: __arm_2d_align_bottom_left(__region, __size) { code body that can use __bottom_left_region }
prototype 2: __arm_2d_align_bottom_left(__region, __width, __height) { code body that can use __bottom_left_region }

◆ __arm_2d_align_bottom_centre2

#define __arm_2d_align_bottom_centre2 (   __region,
  __size 
)
Value:
for (arm_2d_region_t __bottom_centre_region = { \
.tSize = (__size), \
.tLocation = { \
.iX = ((__region).tSize.iWidth - (__size).iWidth) >> 1, \
.iY = ((__region).tSize.iHeight - (__size).iHeight), \
}, \
}, \
*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
arm_2d_op_wait_async(NULL) \
)

Please do NOT use this macro.

◆ __arm_2d_align_bottom_centre3

#define __arm_2d_align_bottom_centre3 (   __region,
  __width,
  __height 
)
Value:
for (arm_2d_region_t __bottom_centre_region = { \
.tSize = { \
.iWidth = (__width), \
.iHeight = (__height), \
}, \
.tLocation = { \
.iX = ((__region).tSize.iWidth - (__width)) >> 1, \
.iY = ((__region).tSize.iHeight - (__height)), \
}, \
}, \
*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
arm_2d_op_wait_async(NULL) \
)

Please do NOT use this macro.

◆ arm_2d_align_bottom_centre

#define arm_2d_align_bottom_centre (   ...)
Value:
ARM_CONNECT2( __arm_2d_align_bottom_centre, \
__ARM_VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)

generate a temporary arm_2d_region_t object with use specified info for bottom-central alignment.

Parameters
...parameter list
Note
prototype 1: arm_2d_align_bottom_centre(__region, __size) { code body that can use __bottom_centre_region }
prototype 2: arm_2d_align_bottom_centre(__region, __width, __height) { code body that can use __bottom_centre_region }

◆ __arm_2d_align_bottom_right2

#define __arm_2d_align_bottom_right2 (   __region,
  __size 
)
Value:
for (arm_2d_region_t __bottom_right_region = { \
.tSize = (__size), \
.tLocation = { \
.iX = ((__region).tSize.iWidth - (__size).iWidth), \
.iY = ((__region).tSize.iHeight - (__size).iHeight), \
}, \
}, \
*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
arm_2d_op_wait_async(NULL) \
)

Please do NOT use this macro.

◆ __arm_2d_align_bottom_right3

#define __arm_2d_align_bottom_right3 (   __region,
  __width,
  __height 
)
Value:
for (arm_2d_region_t __bottom_right_region = { \
.tSize = { \
.iWidth = (__width), \
.iHeight = (__height), \
}, \
.tLocation = { \
.iX = ((__region).tSize.iWidth - (__width)), \
.iY = ((__region).tSize.iHeight - (__height)), \
}, \
}, \
*ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr) = NULL; \
ARM_CONNECT3(__ARM_USING_, __LINE__,_ptr)++ == NULL; \
arm_2d_op_wait_async(NULL) \
)

Please do NOT use this macro.

◆ arm_2d_align_bottom_right

#define arm_2d_align_bottom_right (   ...)
Value:
ARM_CONNECT2( __arm_2d_align_bottom_right, \
__ARM_VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__)

generate a temporary arm_2d_region_t object with use specified info for bottom-right alignment.

Parameters
...parameter list
Note
prototype 1: __arm_2d_align_bottom_right(__region, __size) { code body that can use __bottom_right_region }
prototype 2: __arm_2d_align_bottom_right(__region, __width, __height) { code body that can use __bottom_right_region }

◆ arm_2d_helper_is_time_out

#define arm_2d_helper_is_time_out (   __ms,
  ... 
)
Value:
({ static int64_t arm_2d_safe_name(s_lTimestamp); \
__arm_2d_helper_is_time_out(arm_2d_helper_convert_ms_to_ticks(__ms), \
(&arm_2d_safe_name(s_lTimestamp),##__VA_ARGS__));})

set an alarm with given period and check the status

Parameters
[in]__msa time period in millisecond
[in]...an optional timestamp holder
Returns
bool whether it is timeout

◆ arm_2d_helper_time_liner_slider

#define arm_2d_helper_time_liner_slider (   __from,
  __to,
  __ms,
  __stroke_ptr,
  ... 
)
Value:
({static int64_t arm_2d_safe_name(s_lTimestamp); \
__arm_2d_helper_time_line_slider((__from), \
(__to), \
(__stroke_ptr), \
(&arm_2d_safe_name(s_lTimestamp),##__VA_ARGS__));})

calculate the stroke of a liner slider based on time

Parameters
[in]__fromthe start of the slider
[in]__tothe end of the slider
[in]__msa given period (ms) in which the slider should finish the whole stroke
[out]__stroke_ptrthe address of an int32_t stroke variable
[in]...an optional address of a timestamp variable, if you omit it, NULL will be passed, and the code that call this funtion will not be reentrant.
Return values
truethe slider has finished the whole stroke
falsethe slider hasn't reach the target end

◆ arm_2d_helper_time_cos_slider

#define arm_2d_helper_time_cos_slider (   __from,
  __to,
  __ms,
  __phase,
  __stroke_ptr,
  ... 
)
Value:
({static int64_t arm_2d_safe_name(s_lTimestamp); \
__arm_2d_helper_time_cos_slider((__from), \
(__to), \
(__phase), \
(__stroke_ptr), \
(&arm_2d_safe_name(s_lTimestamp),##__VA_ARGS__));})

calculate the stroke of a cosine slider based on time

Parameters
[in]__fromthe start of the slider
[in]__tothe end of the slider
[in]__msa given period (ms) in which the slider should finish the whole stroke
[in]__phasethe phase offset
[out]__stroke_ptrthe address of an int32_t stroke variable
[in]...an optional address of a timestamp variable, if you omit it, NULL will be passed, and the code that call this funtion will not be reentrant.
Return values
truethe slider has finished the whole stroke
falsethe slider hasn't reach the target end

◆ arm_2d_helper_time_half_cos_slider

#define arm_2d_helper_time_half_cos_slider (   __from,
  __to,
  __ms,
  __stroke_ptr,
  ... 
)
Value:
({static int64_t arm_2d_safe_name(s_lTimestamp); \
__arm_2d_helper_time_half_cos_slider((__from), \
(__to), \
(__stroke_ptr), \
(&arm_2d_safe_name(s_lTimestamp),##__VA_ARGS__));})

calculate the stroke of a cosine slider(0~pi) based on time

Parameters
[in]__fromthe start of the slider
[in]__tothe end of the slider
[in]__msa given period (ms) in which the slider should finish the whole stroke
[out]__stroke_ptrthe address of an int32_t stroke variable
[in]...an optional address of a timestamp variable, if you omit it, NULL will be passed, and the code that call this funtion will not be reentrant.
Return values
truethe slider has finished the whole stroke
falsethe slider hasn't reach the target end

Typedef Documentation

◆ arm_2d_helper_draw_handler_t

typedef arm_fsm_rt_t arm_2d_helper_draw_handler_t(void *pTarget, const arm_2d_tile_t *ptTile, bool bIsNewFrame)

the On-Drawing event handler for application layer

Parameters
[in]pTargeta user attached target address
[in]ptTilea tile for the virtual screen
[in]bIsNewFramea flag indicate the starting of a new frame
Returns
arm_fsm_rt_t the status of the FSM.

◆ arm_2d_helper_render_handler_t

typedef void arm_2d_helper_render_handler_t(void *pTarget, const arm_2d_pfb_t *ptPFB, bool bIsNewFrame)

the On Low Level Rendering event handler for the low level (LCD Driver)

Parameters
[in]pTargeta user attached target address
[in]ptPFBthe PFB block
[in]bIsNewFramea flag indicate the starting of a new frame

Enumeration Type Documentation

◆ arm_2d_scene_player_switch_mode_t

scene switching mode

Enumerator
ARM_2D_SCENE_SWITCH_CFG_NONE 

no switching visual effect

ARM_2D_SCENE_SWITCH_CFG_USER 

user defined switching visual effect

ARM_2D_SCENE_SWITCH_CFG_FADE_WHITE 

fade in fade out (white)

ARM_2D_SCENE_SWITCH_CFG_FADE_BLACK 

fade in fade out (black)

ARM_2D_SCENE_SWITCH_CFG_SLIDE_LEFT 

slide left

ARM_2D_SCENE_SWITCH_CFG_SLIDE_RIGHT 

slide right

ARM_2D_SCENE_SWITCH_CFG_SLIDE_UP 

slide up

ARM_2D_SCENE_SWITCH_CFG_SLIDE_DOWN 

slide down

ARM_2D_SCENE_SWITCH_CFG_ERASE_LEFT 

erase to the right

ARM_2D_SCENE_SWITCH_CFG_ERASE_RIGHT 

erase to the left

ARM_2D_SCENE_SWITCH_CFG_ERASE_UP 

erase to the top

ARM_2D_SCENE_SWITCH_CFG_ERASE_DOWN 

erase to the bottom

__ARM_2D_SCENE_SWITCH_CFG_VALID 

For internal user only.

ARM_2D_SCENE_SWITCH_CFG_IGNORE_OLD_BG 

ignore the background of the old scene

ARM_2D_SCENE_SWITCH_CFG_IGNORE_OLD_SCEBE 

ignore the old scene

ARM_2D_SCENE_SWITCH_CFG_IGNORE_NEW_BG 

ignore the background of the new scene

ARM_2D_SCENE_SWITCH_CFG_IGNORE_NEW_SCEBE 

ignore the new scene

ARM_2D_SCENE_SWITCH_CFG_DEFAULT_BG_WHITE 

use white as default background

ARM_2D_SCENE_SWITCH_CFG_DEFAULT_BG_BLACK 

use black as default background

ARM_2D_SCENE_SWITCH_CFG_DEFAULT_BG_USER 

use user defined default background

__ARM_2D_SCENE_SWTICH_CFG_IGNORE_msk 

For internal user only.

__ARM_2D_SCENE_SWTICH_CFG_IGNORE_pos 

For internal user only.

__ARM_2D_SCENE_SWTICH_CFG_DEFAULT_BG_msk 

For internal user only.

__ARM_2D_SCENE_SWTICH_CFG_DEFAULT_BG_pos 

For internal user only.

◆ anonymous enum

anonymous enum

the enumeration for events

Enumerator
ARM_2D_PFB_DEPEND_ON_LOW_LEVEL_RENDERING 

On Low Level Rendering Event.

ARM_2D_PFB_DEPEND_ON_DRAWING 

On Drawing Event.

ARM_2D_PFB_DEPEND_ON_LOW_LEVEL_SYNC_UP 

On Low Level Sync-up Event.

ARM_2D_PFB_DEPEND_ON_FRAME_SYNC_UP 

On Frame Sync-up Event.

ARM_2D_PFB_DEPEND_ON_EACH_FRAME_CPL 

On Each Frame Complete Event.

ARM_2D_PFB_DEPEND_ON_NAVIGATION 

On Drawing Navigation Event.

Function Documentation

◆ arm_2d_scene_player_flush_fifo()

void arm_2d_scene_player_flush_fifo ( arm_2d_scene_player_t ptThis)

flush the scene FIFO

Parameters
[in]ptThisthe target scene player

◆ arm_2d_scene_player_append_scenes()

void arm_2d_scene_player_append_scenes ( arm_2d_scene_player_t ptThis,
arm_2d_scene_t ptScenes,
int_fast16_t  hwCount 
)

append a set of scenes to a scene player

Parameters
[in]ptThisthe target scene player
[in]ptScenesa scene array
[in]hwCountthe number of scenes in the array

◆ arm_2d_scene_player_update_scene_background()

void arm_2d_scene_player_update_scene_background ( arm_2d_scene_player_t ptThis)

request updating the background of the current scene

Parameters
[in]ptThisthe target scene player

◆ arm_2d_scene_player_switch_to_next_scene()

void arm_2d_scene_player_switch_to_next_scene ( arm_2d_scene_player_t ptThis)

request switching to the next scene safely

Parameters
[in]ptThisthe target scene player
Note
Once received a request, the scene player will only switch to the next scene at the end of a frame.

◆ __arm_2d_scene_player_set_switching_mode()

void __arm_2d_scene_player_set_switching_mode ( arm_2d_scene_player_t ptThis,
arm_2d_scene_switch_mode_t ptMode,
uint16_t  hwSettings 
)

configure the scene switching mode

Parameters
[in]ptThisthe target scene player
[in]ptModea switching mode object
[in]hwSettingsconfigurations for the switching

◆ arm_2d_scene_player_get_switching_cfg()

uint16_t arm_2d_scene_player_get_switching_cfg ( arm_2d_scene_player_t ptThis)

read the current scene switching mode

Parameters
[in]ptThisthe target scene player
Returns
uint16_t the current setting value for the scene switching mode

◆ arm_2d_scene_player_set_switching_period()

void arm_2d_scene_player_set_switching_period ( arm_2d_scene_player_t ptThis,
uint_fast16_t  hwMS 
)

configure the scene switching period

Parameters
[in]ptThisthe target scene player
[in]hwMSperiod in millisecond

◆ __arm_2d_scene_player_register_on_draw_navigation_event_handler()

arm_2d_err_t __arm_2d_scene_player_register_on_draw_navigation_event_handler ( arm_2d_scene_player_t ptThis,
arm_2d_helper_draw_handler_t fnHandler,
void *  pTarget,
arm_2d_region_list_item_t ptDirtyRegions 
)

register / update the evtOnDrawNavigation event handler. You can use this event to draw an ALWAY-TOP navigation bar or title during switching period.

Parameters
[in]ptThisthe target scene player
[in]fnHandlerthe event handler to draw the navigation bar and/or titles
[in]pTargetthe address of an user specified object. If it is NULL, ptThis will be used instead.
[in]ptDirtyRegionsa dirty region list for the navigation layer.
Note
if ptDirtyRegions is NULL and the normal scene doesn't cover the region of the content in the navigation layer, you won't see the content.
Returns
arm_2d_err_t the operation result

◆ arm_2d_scene_player_task()

arm_fsm_rt_t arm_2d_scene_player_task ( arm_2d_scene_player_t ptThis)

the scene player task function

Parameters
[in]ptThisthe target scene player
Note
the event sequence of a scene:
  1. when fnBackground is valid
    • invoke fnOnBGStart when it is valid
    • invoke fnBackground
    • invoke fnOnBGComplete when it is valid
  2. invoke fnOnFrameStart when it is valid
  3. invoke fnScene
  4. invoke fnOnFrameCPL when it is valid
  5. Check bNextSceneReq
    • false (0), go back to step 2
    • true, invoke fnDepose when it is valid and switch to the next scene

◆ arm_2d_helper_pfb_init()

arm_2d_err_t arm_2d_helper_pfb_init ( arm_2d_helper_pfb_t ptThis,
arm_2d_helper_pfb_cfg_t ptCFG 
)

initialize pfb helper service

Parameters
[in]ptThisthe pfb helper control block
[in]ptCFGthe configuration
Returns
arm_2d_err_t the process result

◆ arm_2d_helper_pfb_get_display_area()

arm_2d_region_t arm_2d_helper_pfb_get_display_area ( arm_2d_helper_pfb_t ptThis)

get the display (screen) region

Parameters
[in]ptThisthe pfb helper control block
Returns
arm_2d_region_t the screen region

◆ arm_2d_helper_pfb_task()

arm_fsm_rt_t arm_2d_helper_pfb_task ( arm_2d_helper_pfb_t ptThis,
arm_2d_region_list_item_t ptDirtyRegions 
)

the task function for pfb helper

Parameters
[in]ptThisan initialised PFB control block
[in]ptDirtyRegionsa region list pending for refresh, NULL means refreshing the whole screen
Return values
arm_fsm_rt_cplcomplete refreshing one frame
arm_fsm_rt_on_goingthe refreshing work is on-going
arm_fsm_rt_wait_for_objuser's OnDrawing event handler wants to wait for some objects, e.g. semaphore etc.
<0An error is detected

◆ arm_2d_helper_pfb_flush()

void arm_2d_helper_pfb_flush ( arm_2d_helper_pfb_t ptThis)

flush the FPB FIFO

Note
This function is THREAD-SAFE
For normal usage, please DO NOT use this function unless you know what you are doing.
Parameters
[in]ptThisan initialised PFB control block

◆ arm_2d_helper_pfb_update_dependency()

arm_2d_err_t arm_2d_helper_pfb_update_dependency ( arm_2d_helper_pfb_t ptThis,
uint_fast8_t  chMask,
const arm_2d_helper_pfb_dependency_t ptDependency 
)

update PFB dependency (event handlers)

Parameters
[in]ptThisthe PFB control block
[in]chMaskthe bit mask for event handlers
[in]ptDependencythe new dependency description
Returns
arm_2d_err_t the process result

◆ __arm_2d_helper_pfb_report_rendering_complete()

void __arm_2d_helper_pfb_report_rendering_complete ( arm_2d_helper_pfb_t ptThis,
arm_2d_pfb_t ptPFB 
)

tell PFB helper that a low level LCD flushing work is complete

Note
This function is THREAD-SAFE, You can call this function asynchronously, e.g.
  • A ISR to indicate DMA-transfer complete event or
  • A different Thread
Parameters
[in]ptThisthe PFB control block
[in]ptPFBthe used PFB block

◆ arm_2d_helper_swap_rgb16()

void arm_2d_helper_swap_rgb16 ( uint16_t *  phwBuffer,
uint32_t  wCount 
)

swap the high and low bytes for each rgb16 pixel

Parameters
[in]phwBufferthe pixel buffer
Note
the phwBuffer MUST aligned to half-word addresses
Parameters
[in]wSizethe number of pixels

◆ __arm_2d_helper_pfb_new()

arm_2d_pfb_t * __arm_2d_helper_pfb_new ( arm_2d_helper_pfb_t ptThis)

try to get a PFB block from the pool

Parameters
[in]ptThisthe PFB control block
Return values
NULLthe pool is empty
!NULLa valid pfb block

◆ __arm_2d_helper_pfb_free()

void __arm_2d_helper_pfb_free ( arm_2d_helper_pfb_t ptThis,
arm_2d_pfb_t ptPFB 
)

free a PFB block to the pool

Parameters
[in]ptThisthe PFB control block
[in]ptPFBthe target PFB block

◆ arm_2d_helper_init()

void arm_2d_helper_init ( void  )

initialize helper services

◆ arm_2d_helper_convert_ticks_to_ms()

int64_t arm_2d_helper_convert_ticks_to_ms ( int64_t  lTick)

convert ticks of a reference timer to millisecond

Parameters
[in]lTickthe tick count
Returns
int64_t the millisecond

◆ arm_2d_helper_convert_ms_to_ticks()

int64_t arm_2d_helper_convert_ms_to_ticks ( uint32_t  wMS)

convert millisecond into ticks of the reference timer

Parameters
[in]wMSthe target time in millisecond
Returns
int64_t the ticks

◆ arm_2d_helper_get_reference_clock_frequency()

uint32_t arm_2d_helper_get_reference_clock_frequency ( void  )

get the reference clock frequency

Returns
uint32_t the frequency

◆ arm_2d_helper_get_system_timestamp()

int64_t arm_2d_helper_get_system_timestamp ( void  )

get the current system stamp from the reference clock

Returns
int64_t the timestamp in ticks (no overflow issue)
Note
you have to call arm_2d_helper_convert_ticks_to_ms() to convert the the timestamp into milliseconds when required.

◆ __arm_2d_helper_is_time_out()

bool __arm_2d_helper_is_time_out ( int64_t  lPeriod,
int64_t *  plTimestamp 
)

set an alarm with given period and check the status

Parameters
[in]lPerioda time period in ticks
[in]plTimestampa pointer points to an int64_t integer, if NULL is passed, an static local variable inside the function will be used
Returns
bool whether it is timeout or not

◆ __arm_2d_helper_time_liner_slider()

bool __arm_2d_helper_time_liner_slider ( int32_t  nFrom,
int32_t  nTo,
int64_t  lPeriod,
int32_t *  pnStroke,
int64_t *  plTimestamp 
)

calculate the stroke of a liner slider based on time

Parameters
[in]nFromthe start of the slider
[in]nTothe end of the slider
[in]lPerioda given period in which the slider should finish the whole stroke
[out]pnStrokethe address of an int32_t stroke variable
[in]plTimestampthe address of a timestamp variable, if you pass NULL the code that call this funtion will not be reentrant.
Return values
truethe slider has finished the whole stroke
falsethe slider hasn't reach the target end

◆ __arm_2d_helper_time_half_cos_slider()

bool __arm_2d_helper_time_half_cos_slider ( int32_t  nFrom,
int32_t  nTo,
int64_t  lPeriod,
int32_t *  pnStroke,
int64_t *  plTimestamp 
)

calculate the stroke of a cosine slider (0~pi) based on time

Parameters
[in]nFromthe start of the slider
[in]nTothe end of the slider
[in]lPerioda given period in which the slider should finish the whole stroke
[out]pnStrokethe address of an int32_t stroke variable
[in]plTimestampthe address of a timestamp variable, if you pass NULL the code that call this funtion will not be reentrant.
Return values
truethe slider has finished the whole stroke
falsethe slider hasn't reach the target end

◆ __arm_2d_helper_time_cos_slider()

bool __arm_2d_helper_time_cos_slider ( int32_t  nFrom,
int32_t  nTo,
int64_t  lPeriod,
float  fPhase,
int32_t *  pnStroke,
int64_t *  plTimestamp 
)

calculate the stroke of a consine slider (0~2pi) based on time

Parameters
[in]nFromthe start of the slider
[in]nTothe end of the slider
[in]lPerioda given period in which the slider should finish the whole stroke
[in]lPhasethe phase offset
[out]pnStrokethe address of an int32_t stroke variable
[in]plTimestampthe address of a timestamp variable, if you pass NULL the code that call this funtion will not be reentrant.
Return values
truethe slider has finished the whole stroke
falsethe slider hasn't reach the target end