1 /**
2  * @file lv_gpu_stm32_dma2d.h
3  *
4  */
5 
6 #ifndef LV_GPU_STM32_DMA2D_H
7 #define LV_GPU_STM32_DMA2D_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 #include "../../misc/lv_color.h"
14 #include "../../hal/lv_hal_disp.h"
15 #include "../sw/lv_draw_sw.h"
16 
17 #if LV_USE_GPU_STM32_DMA2D
18 
19 /*********************
20  *      INCLUDES
21  *********************/
22 #include LV_GPU_DMA2D_CMSIS_INCLUDE
23 
24 /*********************
25  *      DEFINES
26  *********************/
27 #if defined(LV_STM32_DMA2D_TEST)
28 // removes "static" modifier for some internal methods in order to test them
29 #define LV_STM32_DMA2D_STATIC
30 #else
31 #define LV_STM32_DMA2D_STATIC static
32 #endif
33 
34 /**********************
35  *      TYPEDEFS
36  **********************/
37 enum dma2d_color_format {
38     ARGB8888 = 0x0,
39     RGB888 = 0x01,
40     RGB565 = 0x02,
41     ARGB1555 = 0x03,
42     ARGB4444 = 0x04,
43     A8 = 0x09,
44     UNSUPPORTED = 0xff,
45 };
46 typedef enum dma2d_color_format dma2d_color_format_t;
47 typedef lv_draw_sw_ctx_t lv_draw_stm32_dma2d_ctx_t;
48 struct _lv_disp_drv_t;
49 
50 /**********************
51  * GLOBAL PROTOTYPES
52  **********************/
53 void lv_draw_stm32_dma2d_init(void);
54 void lv_draw_stm32_dma2d_ctx_init(struct _lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx);
55 void lv_draw_stm32_dma2d_ctx_deinit(struct _lv_disp_drv_t * drv, lv_draw_ctx_t * draw_ctx);
56 
57 /**********************
58  *      MACROS
59  **********************/
60 
61 #endif  /*LV_USE_GPU_STM32_DMA2D*/
62 
63 #ifdef __cplusplus
64 } /*extern "C"*/
65 #endif
66 
67 #endif /*LV_GPU_STM32_DMA2D_H*/
68