Arm-2D  
2D Image Processing Library for Cortex-M Processors
arm_2d_helper_scene.h
1/*
2 * Copyright (C) 2022 Arm Limited or its affiliates. All rights reserved.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 *
6 * Licensed under the Apache License, Version 2.0 (the License); you may
7 * not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
14 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19/* ----------------------------------------------------------------------
20 * Project: Arm-2D Library
21 * Title: #include "arm_2d_helper_scene.h"
22 * Description: Public header file for the scene service
23 *
24 * $Date: 22. June 2022
25 * $Revision: V.1.0.0
26 *
27 * Target Processor: Cortex-M cores
28 * -------------------------------------------------------------------- */
29
30#ifndef __ARM_2D_HELPER_SCENE_H__
31#define __ARM_2D_HELPER_SCENE_H__
32
33/*============================ INCLUDES ======================================*/
34#include "arm_2d_helper_pfb.h"
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40#if defined(__clang__)
41# pragma clang diagnostic push
42# pragma clang diagnostic ignored "-Wunknown-warning-option"
43# pragma clang diagnostic ignored "-Wreserved-identifier"
44# pragma clang diagnostic ignored "-Wdeclaration-after-statement"
45# pragma clang diagnostic ignored "-Wpadded"
46#endif
47
48/*============================ MACROS ========================================*/
49/*============================ MACROFIED FUNCTIONS ===========================*/
50/*============================ TYPES =========================================*/
51
52typedef struct arm_2d_scene_t arm_2d_scene_t;
53
55 arm_2d_scene_t *ptNext;
56 arm_2d_region_list_item_t *ptDirtyRegion;
57 arm_2d_helper_draw_handler_t *fnBackground;
59 void (*fnOnBGStart)(arm_2d_scene_t *ptThis);
60 void (*fnOnBGComplete)(arm_2d_scene_t *ptThis);
61 void (*fnOnFrameStart)(arm_2d_scene_t *ptThis);
62 void (*fnOnFrameCPL)(arm_2d_scene_t *ptThis);
63 void (*fnDepose)(arm_2d_scene_t *ptThis);
64};
65
66typedef struct arm_2d_scene_player_t {
67 inherit(arm_2d_helper_pfb_t);
68
69 ARM_PRIVATE(
70 struct {
71 arm_2d_scene_t *ptHead;
72 arm_2d_scene_t *ptTail;
73 } SceneFIFO;
74
75 struct {
76 uint8_t bNextSceneReq : 1;
77 uint8_t : 7;
78 uint8_t chState;
79 } Runtime;
80 )
82
83/*============================ GLOBAL VARIABLES ==============================*/
84/*============================ LOCAL VARIABLES ===============================*/
85/*============================ PROTOTYPES ====================================*/
86
87extern
88ARM_NONNULL(1)
89void arm_2d_user_scene_player_set_scenes( arm_2d_scene_player_t *ptThis,
90 arm_2d_scene_t *ptSceneList);
91
92extern
93ARM_NONNULL(1)
94void arm_2d_user_scene_player_append_scenes(arm_2d_scene_player_t *ptThis,
95 arm_2d_scene_t *ptSceneList);
96
97extern
98ARM_NONNULL(1)
99void arm_2d_user_scene_player_next_scene(arm_2d_scene_player_t *ptThis);
100
101extern
102ARM_NONNULL(1)
103arm_fsm_rt_t arm_2d_user_scene_player_task(arm_2d_scene_player_t *ptThis);
104
105#if defined(__clang__)
106# pragma clang diagnostic pop
107#endif
108
109#ifdef __cplusplus
110}
111#endif
112
113#endif