1 /**
2  * @file lv_gpu_swm341_dma2d.h
3  *
4  */
5 
6 #ifndef LV_GPU_SWM341_DMA2D_H
7 #define LV_GPU_SWM341_DMA2D_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 #include "../../misc/lv_color.h"
17 #include "../../hal/lv_hal_disp.h"
18 #include "../sw/lv_draw_sw.h"
19 
20 #if LV_USE_GPU_SWM341_DMA2D
21 
22 /*********************
23  *      DEFINES
24  *********************/
25 
26 #define LV_SWM341_DMA2D_ARGB8888 0
27 #define LV_SWM341_DMA2D_RGB888 1
28 #define LV_SWM341_DMA2D_RGB565 2
29 
30 /**********************
31  *      TYPEDEFS
32  **********************/
33 typedef lv_draw_sw_ctx_t lv_draw_swm341_dma2d_ctx_t;
34 
35 struct _lv_disp_drv_t;
36 
37 /**********************
38  * GLOBAL PROTOTYPES
39  **********************/
40 
41 /**
42  * Turn on the peripheral and set output color mode, this only needs to be done once
43  */
44 void lv_draw_swm341_dma2d_init(void);
45 
46 void lv_draw_swm341_dma2d_ctx_init(struct _lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx);
47 
48 void lv_draw_swm341_dma2d_ctx_deinit(struct _lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx);
49 
50 void lv_draw_swm341_dma2d_blend(lv_draw_ctx_t * draw_ctx, const lv_draw_sw_blend_dsc_t * dsc);
51 
52 void lv_gpu_swm341_dma2d_wait_cb(lv_draw_ctx_t * draw_ctx);
53 
54 /**********************
55  *      MACROS
56  **********************/
57 
58 #endif  /*LV_USE_GPU_SWM341_DMA2D*/
59 
60 #ifdef __cplusplus
61 } /*extern "C"*/
62 #endif
63 
64 #endif /*LV_GPU_SWM341_DMA2D_H*/
65