1 /**
2  * @file lv_draw_pxp.h
3  *
4  */
5 
6 /**
7  * Copyright 2022-2024 NXP
8  *
9  * SPDX-License-Identifier: MIT
10  */
11 
12 #ifndef LV_DRAW_PXP_H
13 #define LV_DRAW_PXP_H
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 /*********************
20  *      INCLUDES
21  *********************/
22 
23 #include "../../../lv_conf_internal.h"
24 
25 #if LV_USE_PXP
26 #if LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP
27 #include "../../lv_draw_private.h"
28 #include "../../../display/lv_display_private.h"
29 #include "../../../misc/lv_area_private.h"
30 
31 /*********************
32  *      DEFINES
33  *********************/
34 
35 /**********************
36  *      TYPEDEFS
37  **********************/
38 
39 typedef struct lv_draw_pxp_unit_t {
40     lv_draw_unit_t base_unit;
41     lv_draw_task_t * task_act;
42 #if LV_USE_OS
43     lv_thread_sync_t sync;
44     lv_thread_t thread;
45     volatile bool inited;
46     volatile bool exit_status;
47 #endif
48 } lv_draw_pxp_unit_t;
49 
50 /**********************
51  * GLOBAL PROTOTYPES
52  **********************/
53 
54 void lv_draw_pxp_init(void);
55 
56 void lv_draw_pxp_deinit(void);
57 
58 void lv_draw_pxp_rotate(const void * src_buf, void * dest_buf, int32_t src_width, int32_t src_height,
59                         int32_t src_stride, int32_t dest_stride, lv_display_rotation_t rotation,
60                         lv_color_format_t cf);
61 
62 #if LV_USE_DRAW_PXP
63 void lv_draw_buf_pxp_init_handlers(void);
64 
65 void lv_draw_pxp_fill(lv_draw_unit_t * draw_unit, const lv_draw_fill_dsc_t * dsc,
66                       const lv_area_t * coords);
67 
68 void lv_draw_pxp_img(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * dsc,
69                      const lv_area_t * coords);
70 
71 void lv_draw_pxp_layer(lv_draw_unit_t * draw_unit, const lv_draw_image_dsc_t * draw_dsc,
72                        const lv_area_t * coords);
73 
74 /**********************
75  *      MACROS
76  **********************/
77 #endif /*LV_USE_DRAW_PXP*/
78 #endif /*LV_USE_DRAW_PXP || LV_USE_ROTATE_PXP*/
79 #endif /*LV_USE_PXP*/
80 
81 #ifdef __cplusplus
82 } /*extern "C"*/
83 #endif
84 
85 #endif /*LV_DRAW_PXP_H*/
86