Macros | |
#define | arm_2d_scene_player_register_on_draw_navigation_event_handler( __SCENE_PLAYER_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(__SCENE_PLAYER_PTR, __SWITCH_MODE, ...) |
configure the scene switching mode More... | |
#define | arm_2d_scene_player_register_before_switching_event_handler( __SCENE_PLAYER_PTR, __HANDLER, ...) |
register / update the evtBeforeSwitching event handler. You can use this event to prepare next scenes. More... | |
#define | ARM_2D_FPS_MODE_RENDER_ONLY 0 |
#define | ARM_2D_FPS_MODE_REAL 1 |
#define | ARM_2D_HELPER_PFB_INIT(__CB_ADDR, __SCREEN_WIDTH, __SCREEN_HEIGHT, __PIXEL_TYPE, __PFB_WIDTH, __PFB_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) IMPL_ON_DRAW_EVT(__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 | ARM_2D_3FB_INVALID_IDX 3 |
#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... | |
#define | impl_film( __sprites_tile, __width, __height, __column, __frame_count, __period) |
initialize/implement a given film (arm_2d_helper_file_t) object at compile-time. More... | |
Typedefs | |
typedef void | arm_2d_scene_before_scene_switching_handler_t(void *pTarget, arm_2d_scene_player_t *ptPlayer, arm_2d_scene_t *ptScene) |
the scene player event handler More... | |
typedef bool | arm_2d_helper_2d_copy_handler_t(arm_2d_helper_3fb_t *ptThis, void *pObj, uintptr_t pnSource, uint32_t wSourceStride, uintptr_t pnTarget, uint32_t wTargetStride, int16_t iWidth, int16_t iHeight, uint_fast8_t chBytePerPixel) |
An interface for 2D-Copy. More... | |
typedef void | arm_2d_helper_dma_copy_handler_t(arm_2d_helper_3fb_t *ptThis, void *pObj, uintptr_t pnSource, uintptr_t pnTarget, uint32_t nDataItemCount, uint_fast8_t chDataItemSize) |
An interface for DMA memory-to-memory copy. If you have a DMA, you can implement this function by using __OVERRIDE_WEAK. You should implement an ISR for copy-complete event and call arm_2d_helper_3fb_report_dma_copy_complete() to notify the 3FB (direct mode) helper service. 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... | |
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... | |
void | arm_2d_scene_player_hide_navigation_layer (arm_2d_scene_player_t *ptThis) |
hide the navigation layer More... | |
void | arm_2d_scene_player_show_navigation_layer (arm_2d_scene_player_t *ptThis) |
show the navigation layer if there is a valid one More... | |
arm_2d_err_t | __arm_2d_scene_player_register_before_switching_event_handler (arm_2d_scene_player_t *ptThis, arm_2d_scene_before_scene_switching_handler_t *fnHandler, void *pTarget) |
register / update the evtBeforeSwitching event handler. You can use this event to prepare next scenes. 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... | |
void | arm_2d_helper_pfb_deinit (arm_2d_helper_pfb_t *ptThis) |
uninitialize 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_2d_location_t | arm_2d_helper_pfb_get_absolute_location (arm_2d_tile_t *ptTile, arm_2d_location_t tLocation) |
get the absolute location for a given location on the target tile canvas More... | |
arm_2d_size_t | arm_2d_helper_pfb_get_pfb_size (arm_2d_helper_pfb_t *ptThis) |
get the inital PFB size 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... | |
void | arm_2d_helper_hide_navigation_layer (arm_2d_helper_pfb_t *ptThis) |
hide the navigation layer More... | |
void | arm_2d_helper_show_navigation_layer (arm_2d_helper_pfb_t *ptThis) |
show the navigation layer if there is a valid one More... | |
void | arm_2d_helper_ignore_low_level_flush (arm_2d_helper_pfb_t *ptThis) |
ignore the low level PFB flushing only More... | |
void | arm_2d_helper_resume_low_level_flush (arm_2d_helper_pfb_t *ptThis) |
resume the low level PFB flushing 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... | |
void | arm_2d_helper_pfb_enable_dirty_region_optimization (arm_2d_helper_pfb_t *ptThis, arm_2d_region_list_item_t *ptRegions, uint_fast8_t chCount) |
enable dirty region optimization service More... | |
void | arm_2d_helper_pfb_disable_dirty_region_optimization (arm_2d_helper_pfb_t *ptThis) |
disable dirty region optimization service More... | |
void | arm_2d_helper_transform_init (arm_2d_helper_transform_t *ptThis, arm_2d_op_t *ptTransformOP, float fAngleStep, float fScaleStep, arm_2d_region_list_item_t **ppDirtyRegionList) |
initialize a given transform helper More... | |
void | arm_2d_helper_transform_depose (arm_2d_helper_transform_t *ptThis) |
depose a given transform helper More... | |
void | arm_2d_helper_transform_on_frame_begin (arm_2d_helper_transform_t *ptThis) |
the on-frame-begin event handler for a given transform helper More... | |
void | arm_2d_helper_transform_force_update (arm_2d_helper_transform_t *ptThis) |
force transform helper to update dirty region More... | |
void | arm_2d_helper_transform_update_value (arm_2d_helper_transform_t *ptThis, float fAngle, float fScale) |
update a given transform helper with new values More... | |
void | arm_2d_helper_transform_update_dirty_regions (arm_2d_helper_transform_t *ptThis, const arm_2d_region_t *ptCanvas, bool bIsNewFrame) |
update the dirty region after a transform operation More... | |
void | arm_2d_helper_3fb_init (arm_2d_helper_3fb_t *ptThis, const arm_2d_helper_3fb_cfg_t *ptCFG) |
initialize the 3FB (direct mode) service More... | |
void | arm_2d_helper_3fb_report_dma_copy_complete (arm_2d_helper_3fb_t *ptThis) |
report the copy-completion event to the 3FB (direct mode) service More... | |
void * | arm_2d_helper_3fb_get_flush_pointer (arm_2d_helper_3fb_t *ptThis) |
get a pointer for flushing More... | |
bool | __arm_2d_helper_3fb_draw_bitmap (arm_2d_helper_3fb_t *ptThis, const arm_2d_pfb_t *ptPFB) |
please do NOT use this function. It is used by the display adapter. More... | |
void | arm_2d_helper_init (void) |
initialize helper services More... | |
void | arm_2d_helper_backend_task (void) |
backend task for asynchronose mode 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... | |
uintptr_t | arm_2d_port_new_semaphore (void) |
get a new semaphore from host RTOS More... | |
void | arm_2d_port_free_semaphore (uintptr_t pSemaphore) |
free a semaphore More... | |
bool | arm_2d_port_wait_for_semaphore (uintptr_t pSemaphore) |
wait for a semaphore More... | |
void | arm_2d_port_set_semaphore (uintptr_t pSemaphore) |
set a semaphore 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... | |
uint32_t | __arm_2d_helper_colour_slider (uint32_t wFrom, uint32_t wTo, int32_t nDistance, int32_t nOffset) |
arm_2d_helper_pi_slider_t * | arm_2d_helper_pi_slider_init (arm_2d_helper_pi_slider_t *ptThis, arm_2d_helper_pi_slider_cfg_t *ptCFG, int32_t nStartPosition) |
initialize the Proportional-Integral Control helper More... | |
bool | arm_2d_helper_pi_slider (arm_2d_helper_pi_slider_t *ptThis, int32_t nTargetPosition, int32_t *pnResult) |
A helper function for Proportional-Integral Control. More... | |
void | arm_2d_helper_draw_box (const arm_2d_tile_t *ptTarget, const arm_2d_region_t *ptRegion, int16_t iBorderWidth, COLOUR_INT tColour, uint8_t chOpacity) |
void | arm_2d_helper_film_next_frame (arm_2d_helper_film_t *ptThis) |
void | arm_2d_helper_film_reset (arm_2d_helper_film_t *ptThis) |
void | arm_2d_helper_film_set_frame (arm_2d_helper_film_t *ptThis, int32_t nIndex) |
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 |
union __arm_2d_helper_scene_switch_t |
an internal data structure for scene switching
Data Fields | ||
---|---|---|
struct __arm_2d_helper_scene_switch_t.Feature | Feature | |
uint16_t | hwSetting | the setting value |
struct arm_2d_scene_switch_mode_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_t * | ptNext |
next scene More... | |
arm_2d_scene_player_t * | ptPlayer |
points to the host scene player More... | |
arm_2d_helper_draw_handler_t * | fnBackground |
arm_2d_region_list_item_t * | ptDirtyRegion |
dirty region list for the scene More... | |
arm_2d_helper_draw_handler_t * | fnScene |
the function pointer for the scene 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(* | fnBeforeSwitchOut )(arm_2d_scene_t *ptThis) |
before-scene-switch-out 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... | |
}; | |
arm_2d_scene_t* arm_2d_scene_t::ptNext |
next scene
arm_2d_scene_player_t* arm_2d_scene_t::ptPlayer |
points to the host scene player
arm_2d_helper_draw_handler_t* arm_2d_scene_t::fnBackground |
arm_2d_region_list_item_t* arm_2d_scene_t::ptDirtyRegion |
dirty region list for the scene
arm_2d_helper_draw_handler_t* arm_2d_scene_t::fnScene |
the function pointer for the scene
void(* arm_2d_scene_t::fnOnBGStart) (arm_2d_scene_t *ptThis) |
on-start-drawing-background event handler
void(* arm_2d_scene_t::fnOnBGComplete) (arm_2d_scene_t *ptThis) |
on-complete-drawing-background event handler
void(* arm_2d_scene_t::fnOnFrameStart) (arm_2d_scene_t *ptThis) |
on-frame-start event handler
void(* arm_2d_scene_t::fnOnFrameCPL) (arm_2d_scene_t *ptThis) |
on-frame-complete event handler
void(* arm_2d_scene_t::fnBeforeSwitchOut) (arm_2d_scene_t *ptThis) |
before-scene-switch-out event handler
void(* arm_2d_scene_t::fnDepose) (arm_2d_scene_t *ptThis) |
on-scene-depose event handler
struct arm_2d_scene_before_scene_switching_evt_t |
on low level render event
Data Fields | ||
---|---|---|
arm_2d_scene_before_scene_switching_handler_t * | fnHandler | event handler function |
void * | pTarget | user attached target |
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 | |
struct arm_2d_scene_player_t.Benchmark | Benchmark |
the switching mode 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 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.__unnamed124__ | __unnamed__ |
< before-scene-switch-out event handler
|
struct arm_2d_helper_2d_copy_evt_t |
Data Fields | ||
---|---|---|
arm_2d_helper_2d_copy_handler_t * | fnHandler | |
void * | pObj |
struct arm_2d_helper_dma_copy_evt_t |
Data Fields | ||
---|---|---|
arm_2d_helper_dma_copy_handler_t * | fnHandler | |
void * | pObj |
struct arm_2d_helper_3fb_cfg_t |
configuration structure for the 3fb (direct mode) helper service
Data Fields | ||
---|---|---|
arm_2d_size_t | tScreenSize | the screen size |
uint8_t | chPixelBits | the number of bits in one pixel |
uintptr_t | pnAddress[3] | addresses of the 3 full-frame-buffer |
arm_2d_helper_2d_copy_evt_t | evtOn2DCopy | |
arm_2d_helper_dma_copy_evt_t | evtOnDMACopy |
struct arm_2d_helper_3fb_t |
the control block of the 3FB (direct mode) service
Data Fields | ||
---|---|---|
struct arm_2d_helper_3fb_t.__unnamed137__ | __unnamed__ |
< FB pointer for drawing FB pointer for flushing FB pointer of ready to flush FB pointer of ready to draw < semaphore for async access a flag to indicate the completion of a DMA copy |
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 |
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 |
uint8_t | bIgnore: 1 | ignore this region |
uint8_t | bUpdated: 1 | this region item has been updated, PFB helper should refresh it again. |
struct arm_2d_region_list_item_t.__unnamed140__ | __unnamed__ |
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 |
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 |
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 |
struct arm_2d_helper_pfb_cfg_t.DirtyRegion | DirtyRegion | |
arm_2d_helper_pfb_dependency_t | Dependency | user registered dependency |
struct arm_2d_helper_pfb_t |
the PFB helper control block
Data Fields | ||
---|---|---|
struct arm_2d_helper_pfb_t.__unnamed145__ | __unnamed__ |
< user configuration < A flag to indicate whether the first iteration was a dry run |
struct arm_2d_helper_pfb_t.Statistics | Statistics | performance statistics |
struct arm_2d_helper_transform_t |
the Transform helper control block
Data Fields | ||
---|---|---|
float | fAngle | |
float | fScale | |
struct arm_2d_helper_transform_t.__unnamed153__ | __unnamed__ |
struct arm_2d_helper_film_t |
a helper class to represent a GIF-like resource
Public Member Functions | |
implement (arm_2d_tile_t) | |
Data Fields | |
uint16_t | hwColumn |
uint16_t | hwFrameNum |
uint16_t | hwPeriodPerFrame |
uint16_t | hwFrameIndex |
arm_2d_helper_film_t::implement | ( | arm_2d_tile_t | ) |
derived from arm_2d_tile_t
uint16_t arm_2d_helper_film_t::hwColumn |
number of frames per row in a sprite tile
uint16_t arm_2d_helper_film_t::hwFrameNum |
the total number of frames
uint16_t arm_2d_helper_film_t::hwPeriodPerFrame |
the period per frame (optional, used as a reference)
uint16_t arm_2d_helper_film_t::hwFrameIndex |
the frame index used at runtime
struct arm_2d_helper_pi_slider_cfg_t |
struct arm_2d_helper_pi_slider_t |
a helper class for Proportional-Integral Control
Data Fields | ||
---|---|---|
struct arm_2d_helper_pi_slider_t.__unnamed157__ | __unnamed__ |
struct __arm_2d_helper_scene_switch_t.Feature |
struct arm_2d_scene_t.__unnamed121__ |
struct arm_2d_scene_player_t.Benchmark |
struct arm_2d_scene_player_t.__unnamed124__ |
< before-scene-switch-out event handler
Data Fields | ||
---|---|---|
struct arm_2d_scene_player_t.__unnamed124__.SceneFIFO | SceneFIFO | |
struct arm_2d_scene_player_t.__unnamed124__.Runtime | Runtime | |
struct arm_2d_scene_player_t.__unnamed124__.Switch | Switch | |
struct arm_2d_scene_player_t.__unnamed124__.Events | Events |
struct arm_2d_scene_player_t.__unnamed124__.SceneFIFO |
Data Fields | ||
---|---|---|
arm_2d_scene_t * | ptHead | |
arm_2d_scene_t * | ptTail |
struct arm_2d_scene_player_t.__unnamed124__.Runtime |
struct arm_2d_scene_player_t.__unnamed124__.Switch |
Data Fields | ||
---|---|---|
arm_2d_scene_switch_mode_t * | ptMode | |
union arm_2d_scene_player_t.__unnamed124__.Switch.__unnamed130__ | __unnamed__ | |
__arm_2d_helper_scene_switch_t | tConfig | |
uint16_t | hwPeriod | |
int64_t | lTimeStamp |
union arm_2d_scene_player_t.__unnamed124__.Switch.__unnamed130__ |
Data Fields | ||
---|---|---|
uint8_t | chState | |
struct arm_2d_scene_player_t.__unnamed124__.Switch.__unnamed130__.Fade | Fade | |
struct arm_2d_scene_player_t.__unnamed124__.Switch.__unnamed130__.Erase | Erase | |
struct arm_2d_scene_player_t.__unnamed124__.Switch.__unnamed130__.Slide | Slide |
struct arm_2d_scene_player_t.__unnamed124__.Switch.__unnamed130__.Fade |
struct arm_2d_scene_player_t.__unnamed124__.Switch.__unnamed130__.Erase |
Data Fields | ||
---|---|---|
uint8_t | chState | |
arm_2d_tile_t | tSceneWindow | |
arm_2d_tile_t | tTemp | |
int16_t | iOffset |
struct arm_2d_scene_player_t.__unnamed124__.Switch.__unnamed130__.Slide |
Data Fields | ||
---|---|---|
uint8_t | chState | |
arm_2d_tile_t | tSceneWindow | |
int16_t | iOffset |
struct arm_2d_scene_player_t.__unnamed124__.Events |
Data Fields | ||
---|---|---|
arm_2d_scene_before_scene_switching_evt_t | evtBeforeSwitching |
struct arm_2d_helper_3fb_t.__unnamed137__ |
< FB pointer for drawing FB pointer for flushing FB pointer of ready to flush FB pointer of ready to draw < semaphore for async access a flag to indicate the completion of a DMA copy
Data Fields | ||
---|---|---|
arm_2d_helper_3fb_cfg_t | tCFG | |
struct arm_2d_helper_3fb_t.__unnamed137__.Runtime | Runtime |
struct arm_2d_helper_3fb_t.__unnamed137__.Runtime |
struct arm_2d_region_list_item_t.__unnamed140__ |
Data Fields | ||
---|---|---|
struct arm_2d_region_list_item_t * | ptInternalNext | |
uint8_t | bFromInternalPool: 1 | |
uint8_t | bFromHeap: 1 |
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 |
struct arm_2d_helper_pfb_cfg_t.FrameBuffer |
Data Fields | ||
---|---|---|
arm_2d_pfb_t * | ptPFBs | PFB blocks for the internal PFB pool. |
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 | bDebugDirtyRegions: 1 | A flag to show dirty regions on screen for debug. |
uint16_t | u3PixelWidthAlign: 3 | Pixel alignment in Width for dirty region (2^n) |
uint16_t | u3PixelHeightAlign: 3 | Pixel alignment in Height for dirty region (2^n) |
uint16_t | u4PoolReserve: 4 | reserve specific number of PFB for other helper services |
struct arm_2d_helper_pfb_cfg_t.DirtyRegion |
Data Fields | ||
---|---|---|
arm_2d_region_list_item_t * | ptRegions | dirty region list item for internal pool |
uint8_t | chCount | number of dirty region list items |
struct arm_2d_helper_pfb_t.__unnamed145__ |
< user configuration
< A flag to indicate whether the first iteration was a dry run
Data Fields | ||
---|---|---|
arm_2d_helper_pfb_cfg_t | tCFG | |
struct arm_2d_helper_pfb_t.__unnamed145__.Adapter | Adapter |
struct arm_2d_helper_pfb_t.__unnamed145__.Adapter |
Data Fields | ||
---|---|---|
arm_2d_region_t | tDrawRegion | |
arm_2d_region_t | tTargetRegion | |
arm_2d_region_list_item_t * | ptDirtyRegion | |
struct arm_2d_helper_pfb_t.__unnamed145__.Adapter.OptimizedDirtyRegions | OptimizedDirtyRegions | |
arm_2d_tile_t | tPFBTile | |
arm_2d_size_t | tFrameSize | |
uint32_t | wPFBPixelCount | |
uint8_t | chPT | |
uint8_t | chFreePFBCount | |
struct arm_2d_helper_pfb_t.__unnamed145__.Adapter.__unnamed150__ | __unnamed__ | |
uintptr_t | pFPBPoolAvailable | |
arm_2d_pfb_t * | ptCurrent | |
arm_2d_pfb_t * | ptFreeList | |
arm_2d_pfb_t * | ptFlushing | |
struct arm_2d_helper_pfb_t.__unnamed145__.Adapter.FlushFIFO | FlushFIFO | |
arm_2d_tile_t * | ptFrameBuffer |
struct arm_2d_helper_pfb_t.__unnamed145__.Adapter.OptimizedDirtyRegions |
Data Fields | ||
---|---|---|
arm_2d_region_list_item_t * | ptWorkingList | |
arm_2d_region_list_item_t * | ptOriginalList | |
arm_2d_region_list_item_t * | ptCandidateList | |
arm_2d_region_list_item_t * | ptFreeList | |
arm_2d_region_list_item_t | tWorkingItem | |
int16_t | iFreeCount |
struct arm_2d_helper_pfb_t.__unnamed145__.Adapter.__unnamed150__ |
struct arm_2d_helper_pfb_t.__unnamed145__.Adapter.FlushFIFO |
Data Fields | ||
---|---|---|
arm_2d_pfb_t * | ptHead | |
arm_2d_pfb_t * | ptTail |
struct arm_2d_helper_pfb_t.Statistics |
struct arm_2d_helper_transform_t.__unnamed153__ |
Data Fields | ||
---|---|---|
arm_2d_region_list_item_t | tDirtyRegions[2] | |
arm_2d_op_t * | ptTransformOP | |
arm_2d_region_list_item_t ** | ppDirtyRegionList | |
struct arm_2d_helper_transform_t.__unnamed153__.Angle | Angle | |
struct arm_2d_helper_transform_t.__unnamed153__.Scale | Scale | |
bool | bNeedUpdate |
struct arm_2d_helper_pi_slider_t.__unnamed157__ |
Data Fields | ||
---|---|---|
arm_2d_helper_pi_slider_cfg_t | tCFG | |
int64_t | lTimestamp | |
int32_t | nTimeResidual | |
int32_t | iCurrent | |
float | fOP |
#define arm_2d_scene_player_register_on_draw_navigation_event_handler | ( | __SCENE_PLAYER_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.
[in] | __DISP_ADAPTER_PTR | the target scene player |
[in] | __DRAW_HANDLER | the event handler to draw the navigation bar and/or titles |
[in] | __USER_TARGET_PTR | the 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. |
#define arm_2d_scene_player_set_switching_mode | ( | __SCENE_PLAYER_PTR, | |
__SWITCH_MODE, | |||
... | |||
) |
configure the scene switching mode
[in] | __DISP_ADAPTER_PTR | the target scene player |
[in] | __SWITCH_MODE | a switching mode object |
[in] | ... | an optional configurations for the switching |
#define arm_2d_scene_player_register_before_switching_event_handler | ( | __SCENE_PLAYER_PTR, | |
__HANDLER, | |||
... | |||
) |
register / update the evtBeforeSwitching event handler. You can use this event to prepare next scenes.
[in] | ptThis | the target scene player |
[in] | fnHandler | the event handler |
[in] | ... | optional, the address of an user specified object. |
#define ARM_2D_HELPER_PFB_INIT | ( | __CB_ADDR, | |
__SCREEN_WIDTH, | |||
__SCREEN_HEIGHT, | |||
__PIXEL_TYPE, | |||
__PFB_WIDTH, | |||
__PFB_HEIGHT, | |||
__PFB_NUM, | |||
... | |||
) |
a macro wrapper in uppercase to help initialising PFB service
[in] | __CB_ADDR | the address of the arm_2d_helper_pfb_t object |
[in] | __SCREEN_WIDTH | the width of the screen |
[in] | __SCREEN_HEIGHT | the hight of the screen |
[in] | __PIXEL_TYPE | the integer type of the pixel, i.e. uint8_t, uint16_t, uint32_t |
[in] | __WIDTH | the width of the PFB block |
[in] | __HEIGHT | the height of the PFB block |
[in] | __PFB_NUM | the number of PFB blocks in the built-in PFB pool. |
[in] | ... | a code block to add additional initializer, see example below: |
#define ARM_2D_HELPER_PFB_UPDATE_ON_DRAW_HANDLER | ( | __CB_ADDR, | |
__HANDLER, | |||
... | |||
) |
a macro wrapper to update the evtOnDrawring event handler
[in] | __CB_ADDR | the address of the arm_2d_helper_pfb_t object |
[in] | __HANDLER | the new handler |
[in] | ... | [Optional] an address (of user defined structure) passed to the event handler. |
#define __IMPL_ARM_2D_REGION_LIST | ( | __NAME, | |
... | |||
) |
#define __ADD_REGION_TO_LIST | ( | __NAME, | |
... | |||
) |
#define __ADD_LAST_REGION_TO_LIST | ( | __NAME, | |
... | |||
) |
#define IMPL_PFB_ON_LOW_LV_RENDERING | ( | __NAME | ) |
#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
[in] | __CB_ADDR | the address of the arm_2d_helper_pfb_t object |
[in] | __SCREEN_WIDTH | the width of the screen |
[in] | __SCREEN_HEIGHT | the hight of the screen |
[in] | __PIXEL_TYPE | the integer type of the pixel, i.e. uint8_t, uint16_t, uint32_t |
[in] | __WIDTH | the width of the PFB block |
[in] | __HEIGHT | the height of the PFB block |
[in] | __PFB_NUM | the number of PFB blocks in the built-in PFB pool. |
[in] | ... | a code block to add additional initializer, see example below: |
#define update_arm_2d_helper_pfb_on_draw_handler | ( | __CB_ADDR, | |
__HANDLER, | |||
... | |||
) |
a macro wrapper to update the evtOnDrawring event handler
[in] | __CB_ADDR | the address of the arm_2d_helper_pfb_t object |
[in] | __HANDLER | the new handler |
[in] | ... | [Optional] an address (of user defined structure) passed to the event handler. |
#define arm_2d_helper_pfb_report_rendering_complete | ( | __PFB_HELPER_PTR, | |
... | |||
) |
tell PFB helper that a low level LCD flushing work is complete
[in] | ptThis | the PFB helper control block |
[in] | ... | the used PFB block. |
#define arm_2d_helper_is_time_out | ( | __ms, | |
... | |||
) |
set an alarm with given period and check the status
[in] | __ms | a time period in millisecond |
[in] | ... | an optional timestamp holder |
#define arm_2d_helper_time_liner_slider | ( | __from, | |
__to, | |||
__ms, | |||
__stroke_ptr, | |||
... | |||
) |
calculate the stroke of a liner slider based on time
[in] | __from | the start of the slider |
[in] | __to | the end of the slider |
[in] | __ms | a given period (ms) in which the slider should finish the whole stroke |
[out] | __stroke_ptr | the 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. |
true | the slider has finished the whole stroke |
false | the slider hasn't reach the target end |
#define arm_2d_helper_time_cos_slider | ( | __from, | |
__to, | |||
__ms, | |||
__phase, | |||
__stroke_ptr, | |||
... | |||
) |
calculate the stroke of a cosine slider based on time
[in] | __from | the start of the slider |
[in] | __to | the end of the slider |
[in] | __ms | a given period (ms) in which the slider should finish the whole stroke |
[in] | __phase | the phase offset |
[out] | __stroke_ptr | the 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. |
true | the slider has finished the whole stroke |
false | the slider hasn't reach the target end |
#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
[in] | __from | the start of the slider |
[in] | __to | the end of the slider |
[in] | __ms | a given period (ms) in which the slider should finish the whole stroke |
[out] | __stroke_ptr | the 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. |
true | the slider has finished the whole stroke |
false | the slider hasn't reach the target end |
#define impl_film | ( | __sprites_tile, | |
__width, | |||
__height, | |||
__column, | |||
__frame_count, | |||
__period | |||
) |
initialize/implement a given film (arm_2d_helper_file_t) object at compile-time.
[in] | __sprites_tile | the sprites tile |
[in] | __width | the width of each frame |
[in] | __height | the height of each frame |
[in] | __column | the number of frames per row in the sprite tile |
[in] | __frame_count | the total number of frames in the sprite tile |
[in] | __period | the period per-frame |
typedef void arm_2d_scene_before_scene_switching_handler_t(void *pTarget, arm_2d_scene_player_t *ptPlayer, arm_2d_scene_t *ptScene) |
the scene player event handler
[in] | pTarget | a user attached target address |
[in] | ptPlayer | the scene player |
[in] | ptScene | the old scene that is to be switched out |
typedef bool arm_2d_helper_2d_copy_handler_t(arm_2d_helper_3fb_t *ptThis, void *pObj, uintptr_t pnSource, uint32_t wSourceStride, uintptr_t pnTarget, uint32_t wTargetStride, int16_t iWidth, int16_t iHeight, uint_fast8_t chBytePerPixel) |
An interface for 2D-Copy.
[in] | pnSource | the source image address |
[in] | wSourceStride | the stride of the source image |
[in] | pnTarget | the address in the target framebuffer |
[in] | wTargetStride | the stride of the target framebuffer |
[in] | iWidth | the safe width of the source image |
[in] | iHeight | the safe height of the source image |
true | the 2D copy is complete when leaving this function |
false | An async 2D copy request is sent to the DMA |
typedef void arm_2d_helper_dma_copy_handler_t(arm_2d_helper_3fb_t *ptThis, void *pObj, uintptr_t pnSource, uintptr_t pnTarget, uint32_t nDataItemCount, uint_fast8_t chDataItemSize) |
An interface for DMA memory-to-memory copy. If you have a DMA, you can implement this function by using __OVERRIDE_WEAK. You should implement an ISR for copy-complete event and call arm_2d_helper_3fb_report_dma_copy_complete() to notify the 3FB (direct mode) helper service.
[in] | ptThis | the helper service control block |
[in] | pObj | the address of the user object |
[in] | pnSource | the source address of the memory block |
[in] | pnTarget | the target address |
[in] | nDataItemCount | the number of date items |
[in] | chDataItemSize | the size of each data item |
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)
[in] | pTarget | a user attached target address |
[in] | ptPFB | the PFB block |
[in] | bIsNewFrame | a flag indicate the starting of a new frame |
scene switching mode
anonymous enum |
direct mode helper service frame-buffer control block states
anonymous enum |
the enumeration for events
enum arm_2d_perfc_type_t |
the type of perf counter
void arm_2d_scene_player_flush_fifo | ( | arm_2d_scene_player_t * | ptThis | ) |
flush the scene FIFO
[in] | ptThis | the target scene player |
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
[in] | ptThis | the target scene player |
[in] | ptScenes | a scene array |
[in] | hwCount | the number of scenes in the array |
void arm_2d_scene_player_update_scene_background | ( | arm_2d_scene_player_t * | ptThis | ) |
request updating the background of the current scene
[in] | ptThis | the target scene player |
void arm_2d_scene_player_switch_to_next_scene | ( | arm_2d_scene_player_t * | ptThis | ) |
request switching to the next scene safely
[in] | ptThis | the target scene player |
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
[in] | ptThis | the target scene player |
[in] | ptMode | a switching mode object |
[in] | hwSettings | configurations for the switching |
uint16_t arm_2d_scene_player_get_switching_cfg | ( | arm_2d_scene_player_t * | ptThis | ) |
read the current scene switching mode
[in] | ptThis | the target scene player |
void arm_2d_scene_player_set_switching_period | ( | arm_2d_scene_player_t * | ptThis, |
uint_fast16_t | hwMS | ||
) |
configure the scene switching period
[in] | ptThis | the target scene player |
[in] | hwMS | period in millisecond |
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.
[in] | ptThis | the target scene player |
[in] | fnHandler | the event handler to draw the navigation bar and/or titles |
[in] | pTarget | the address of an user specified object. If it is NULL, ptThis will be used instead. |
[in] | ptDirtyRegions | a dirty region list for the navigation layer. |
void arm_2d_scene_player_hide_navigation_layer | ( | arm_2d_scene_player_t * | ptThis | ) |
hide the navigation layer
[in] | ptThis | an initialised scene player |
void arm_2d_scene_player_show_navigation_layer | ( | arm_2d_scene_player_t * | ptThis | ) |
show the navigation layer if there is a valid one
[in] | ptThis | an initialised scene player |
arm_2d_err_t __arm_2d_scene_player_register_before_switching_event_handler | ( | arm_2d_scene_player_t * | ptThis, |
arm_2d_scene_before_scene_switching_handler_t * | fnHandler, | ||
void * | pTarget | ||
) |
register / update the evtBeforeSwitching event handler. You can use this event to prepare next scenes.
[in] | ptThis | the target scene player |
[in] | fnHandler | the event handler |
[in] | pTarget | the address of an user specified object. |
arm_fsm_rt_t arm_2d_scene_player_task | ( | arm_2d_scene_player_t * | ptThis | ) |
the scene player task function
[in] | ptThis | the target scene player |
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
[in] | ptThis | the pfb helper control block |
[in] | ptCFG | the configuration |
void arm_2d_helper_pfb_deinit | ( | arm_2d_helper_pfb_t * | ptThis | ) |
uninitialize pfb helper service
[in] | ptThis | the pfb helper control block |
arm_2d_region_t arm_2d_helper_pfb_get_display_area | ( | arm_2d_helper_pfb_t * | ptThis | ) |
get the display (screen) region
[in] | ptThis | the pfb helper control block |
arm_2d_location_t arm_2d_helper_pfb_get_absolute_location | ( | arm_2d_tile_t * | ptTile, |
arm_2d_location_t | tLocation | ||
) |
get the absolute location for a given location on the target tile canvas
[in] | ptTile | the target tile |
[in] | tLocation | the location on the target tile canvas |
arm_2d_size_t arm_2d_helper_pfb_get_pfb_size | ( | arm_2d_helper_pfb_t * | ptThis | ) |
get the inital PFB size
[in] | ptThis | the pfb helper control block |
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
[in] | ptThis | an initialised PFB helper control block |
[in] | ptDirtyRegions | a region list pending for refresh, NULL means refreshing the whole screen |
arm_fsm_rt_cpl | complete refreshing one frame |
arm_fsm_rt_on_going | the refreshing work is on-going |
arm_fsm_rt_wait_for_obj | user's OnDrawing event handler wants to wait for some objects, e.g. semaphore etc. |
<0 | An error is detected |
void arm_2d_helper_pfb_flush | ( | arm_2d_helper_pfb_t * | ptThis | ) |
flush the FPB FIFO
[in] | ptThis | an initialised PFB helper control block |
void arm_2d_helper_hide_navigation_layer | ( | arm_2d_helper_pfb_t * | ptThis | ) |
hide the navigation layer
[in] | ptThis | an initialised PFB helper control block |
void arm_2d_helper_show_navigation_layer | ( | arm_2d_helper_pfb_t * | ptThis | ) |
show the navigation layer if there is a valid one
[in] | ptThis | an initialised PFB helper control block |
void arm_2d_helper_ignore_low_level_flush | ( | arm_2d_helper_pfb_t * | ptThis | ) |
ignore the low level PFB flushing only
[in] | ptThis | an initialised PFB helper control block |
void arm_2d_helper_resume_low_level_flush | ( | arm_2d_helper_pfb_t * | ptThis | ) |
resume the low level PFB flushing
[in] | ptThis | an initialised PFB helper control block |
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)
[in] | ptThis | the PFB helper control block |
[in] | chMask | the bit mask for event handlers |
[in] | ptDependency | the new dependency description |
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
[in] | ptThis | the PFB helper control block |
[in] | ptPFB | the used PFB block |
void arm_2d_helper_swap_rgb16 | ( | uint16_t * | phwBuffer, |
uint32_t | wCount | ||
) |
swap the high and low bytes for each rgb16 pixel
[in] | phwBuffer | the pixel buffer |
[in] | wSize | the number of pixels |
arm_2d_pfb_t * __arm_2d_helper_pfb_new | ( | arm_2d_helper_pfb_t * | ptThis | ) |
try to get a PFB block from the pool
[in] | ptThis | the PFB helper control block |
NULL | the pool is empty |
!NULL | a valid pfb block |
void __arm_2d_helper_pfb_free | ( | arm_2d_helper_pfb_t * | ptThis, |
arm_2d_pfb_t * | ptPFB | ||
) |
free a PFB block to the pool
[in] | ptThis | the PFB helper control block |
[in] | ptPFB | the target PFB block |
void arm_2d_helper_pfb_enable_dirty_region_optimization | ( | arm_2d_helper_pfb_t * | ptThis, |
arm_2d_region_list_item_t * | ptRegions, | ||
uint_fast8_t | chCount | ||
) |
enable dirty region optimization service
[in] | ptThis | the PFB helper control block |
[in] | ptRegions | an optional array of dirty region items, which will be added to the dirty region item pool. NULL is acceptable. |
[in] | chCount | the number of items in the array. |
void arm_2d_helper_pfb_disable_dirty_region_optimization | ( | arm_2d_helper_pfb_t * | ptThis | ) |
disable dirty region optimization service
[in] | ptThis | the PFB helper control block |
void arm_2d_helper_transform_init | ( | arm_2d_helper_transform_t * | ptThis, |
arm_2d_op_t * | ptTransformOP, | ||
float | fAngleStep, | ||
float | fScaleStep, | ||
arm_2d_region_list_item_t ** | ppDirtyRegionList | ||
) |
initialize a given transform helper
[in] | ptThis | the target helper |
[in] | ptTransformOP | the target transform OP, NULL is not accepted. |
[in] | fAngleStep | the minimal acceptable angle change. |
[in] | fScaleStep | the minimal acceptable scale ratio change. |
[in] | ppDirtyRegionList | the address of the dirty region list |
void arm_2d_helper_transform_depose | ( | arm_2d_helper_transform_t * | ptThis | ) |
depose a given transform helper
[in] | ptThis | the target helper |
void arm_2d_helper_transform_on_frame_begin | ( | arm_2d_helper_transform_t * | ptThis | ) |
the on-frame-begin event handler for a given transform helper
[in] | ptThis | the target helper |
void arm_2d_helper_transform_force_update | ( | arm_2d_helper_transform_t * | ptThis | ) |
force transform helper to update dirty region
[in] | ptThis | the target helper |
void arm_2d_helper_transform_update_value | ( | arm_2d_helper_transform_t * | ptThis, |
float | fAngle, | ||
float | fScale | ||
) |
update a given transform helper with new values
[in] | ptThis | the target helper |
[in] | fAngle | the new angle value |
[in] | fScale | the new scale ratio |
void arm_2d_helper_transform_update_dirty_regions | ( | arm_2d_helper_transform_t * | ptThis, |
const arm_2d_region_t * | ptCanvas, | ||
bool | bIsNewFrame | ||
) |
update the dirty region after a transform operation
[in] | ptThis | the target helper |
[in] | ptCanvas | the canvas |
[in] | bIsNewFrame | whether this is a new frame |
void arm_2d_helper_3fb_init | ( | arm_2d_helper_3fb_t * | ptThis, |
const arm_2d_helper_3fb_cfg_t * | ptCFG | ||
) |
initialize the 3FB (direct mode) service
[in] | ptThis | the helper service control block |
[in] | ptCFG | the configuration structure |
void arm_2d_helper_3fb_report_dma_copy_complete | ( | arm_2d_helper_3fb_t * | ptThis | ) |
report the copy-completion event to the 3FB (direct mode) service
[in] | ptThis | the helper service control block |
void * arm_2d_helper_3fb_get_flush_pointer | ( | arm_2d_helper_3fb_t * | ptThis | ) |
get a pointer for flushing
[in] | ptThis | the helper service control block |
bool __arm_2d_helper_3fb_draw_bitmap | ( | arm_2d_helper_3fb_t * | ptThis, |
const arm_2d_pfb_t * | ptPFB | ||
) |
please do NOT use this function. It is used by the display adapter.
void arm_2d_helper_init | ( | void | ) |
initialize helper services
void arm_2d_helper_backend_task | ( | void | ) |
backend task for asynchronose mode
int64_t arm_2d_helper_convert_ticks_to_ms | ( | int64_t | lTick | ) |
convert ticks of a reference timer to millisecond
[in] | lTick | the tick count |
int64_t arm_2d_helper_convert_ms_to_ticks | ( | uint32_t | wMS | ) |
convert millisecond into ticks of the reference timer
[in] | wMS | the target time in millisecond |
uint32_t arm_2d_helper_get_reference_clock_frequency | ( | void | ) |
get the reference clock frequency
int64_t arm_2d_helper_get_system_timestamp | ( | void | ) |
get the current system stamp from the reference clock
bool __arm_2d_helper_is_time_out | ( | int64_t | lPeriod, |
int64_t * | plTimestamp | ||
) |
set an alarm with given period and check the status
[in] | lPeriod | a time period in ticks |
[in] | plTimestamp | a pointer points to an int64_t integer, if NULL is passed, an static local variable inside the function will be used |
uintptr_t arm_2d_port_new_semaphore | ( | void | ) |
get a new semaphore from host RTOS
void arm_2d_port_free_semaphore | ( | uintptr_t | pSemaphore | ) |
free a semaphore
[in] | pSemaphore | the target semaphore |
bool arm_2d_port_wait_for_semaphore | ( | uintptr_t | pSemaphore | ) |
wait for a semaphore
[in] | pSemaphore | the target semaphore |
true | we get the semaphore |
false | we haven't get the sempahore |
void arm_2d_port_set_semaphore | ( | uintptr_t | pSemaphore | ) |
set a semaphore
[in] | pSemaphore | the target semaphore |
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
[in] | nFrom | the start of the slider |
[in] | nTo | the end of the slider |
[in] | lPeriod | a given period in which the slider should finish the whole stroke |
[out] | pnStroke | the address of an int32_t stroke variable |
[in] | plTimestamp | the address of a timestamp variable, if you pass NULL the code that call this funtion will not be reentrant. |
true | the slider has finished the whole stroke |
false | the slider hasn't reach the target end |
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
[in] | nFrom | the start of the slider |
[in] | nTo | the end of the slider |
[in] | lPeriod | a given period in which the slider should finish the whole stroke |
[out] | pnStroke | the address of an int32_t stroke variable |
[in] | plTimestamp | the address of a timestamp variable, if you pass NULL the code that call this funtion will not be reentrant. |
true | the slider has finished the whole stroke |
false | the slider hasn't reach the target end |
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
[in] | nFrom | the start of the slider |
[in] | nTo | the end of the slider |
[in] | lPeriod | a given period in which the slider should finish the whole stroke |
[in] | lPhase | the phase offset |
[out] | pnStroke | the address of an int32_t stroke variable |
[in] | plTimestamp | the address of a timestamp variable, if you pass NULL the code that call this funtion will not be reentrant. |
true | the slider has finished the whole stroke |
false | the slider hasn't reach the target end |
uint32_t __arm_2d_helper_colour_slider | ( | uint32_t | wFrom, |
uint32_t | wTo, | ||
int32_t | nDistance, | ||
int32_t | nOffset | ||
) |
\brier colour intrapolation
[in] | wFrom | a 32bit colour (4 8bit colour channels) on the start |
[in] | wTo | a 32bit colour (4 8bit colour channels) on the end |
[in] | nDistance | the reference full distance between two end points |
[in] | nOffset | the offset from the start |
arm_2d_helper_pi_slider_t * arm_2d_helper_pi_slider_init | ( | arm_2d_helper_pi_slider_t * | ptThis, |
arm_2d_helper_pi_slider_cfg_t * | ptCFG, | ||
int32_t | nStartPosition | ||
) |
initialize the Proportional-Integral Control helper
[in] | the | target helper control block |
[in] | the | configuration structure, NULL means using the default parameters, i.e P = 5.0f, I = 3.0f and Interval = 20ms |
[in] | nStartPosition | the start postion |
bool arm_2d_helper_pi_slider | ( | arm_2d_helper_pi_slider_t * | ptThis, |
int32_t | nTargetPosition, | ||
int32_t * | pnResult | ||
) |
A helper function for Proportional-Integral Control.
[in] | ptThis | the control block (arm_2d_helper_pi_slider_t) |
[in] | nTargetPosition | the new target position |
[in] | pnResult | a int32_t buffer for reading the current postion |
true | the slider has reached the target postion |
false | the slider is still moving |
void arm_2d_helper_draw_box | ( | const arm_2d_tile_t * | ptTarget, |
const arm_2d_region_t * | ptRegion, | ||
int16_t | iBorderWidth, | ||
COLOUR_INT | tColour, | ||
uint8_t | chOpacity | ||
) |
\brier draw a box with specified colour, border width and opacity
[in] | ptTarget | the target tile |
[in] | ptRegion | the target region |
[in] | iBorderWidth | the border width |
[in] | tColour | the target colour |
[in] | chOpacity | the opacity |
void arm_2d_helper_film_next_frame | ( | arm_2d_helper_film_t * | ptThis | ) |
\brier move to the next frame of a given film
[in] | ptThis | the target film |
void arm_2d_helper_film_reset | ( | arm_2d_helper_film_t * | ptThis | ) |
\brier reset the frame index to zero
[in] | ptThis | the target film |
void arm_2d_helper_film_set_frame | ( | arm_2d_helper_film_t * | ptThis, |
int32_t | nIndex | ||
) |
\brier reset the frame index to a specified value and wrap around if the index number is out of range.
[in] | ptThis | the target film |
[in] | nIndex | the given index |