1 /**
2  * @file lv_st_ltdc.h
3  *
4  */
5 
6 #ifndef LV_ST_LTDC_H
7 #define LV_ST_LTDC_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 
17 #include "../../../lv_conf_internal.h"
18 #if LV_USE_ST_LTDC
19 
20 #include "../../../display/lv_display.h"
21 
22 /*********************
23  *      DEFINES
24  *********************/
25 
26 /**********************
27  *      TYPEDEFS
28  **********************/
29 
30 /**********************
31  * GLOBAL PROTOTYPES
32  **********************/
33 
34 /**
35  * Create a direct render mode display bound to a LTDC layer.
36  * @param fb_adr_1      The LTDC layer's framebuffer memory address.
37  * @param fb_adr_2      An additional framebuffer-sized buffer to use for double buffering, or `NULL`.
38  * @param layer_idx     The LTDC layer number to bind the display to. Typically 0 or 1.
39  * @return              The display.
40  */
41 lv_display_t * lv_st_ltdc_create_direct(void * fb_adr_1, void * fb_adr_2, uint32_t layer_idx);
42 
43 /**
44  * Create a partial render mode display bound to a LTDC layer. The layer's framebuffer is flushed to internally.
45  * Enable `LV_ST_LTDC_USE_DMA2D_FLUSH` for parallel flushing.
46  * @param render_buf_1  A render buffer.
47  * @param render_buf_2  An additional render buffer for double-buffering, or `NULL`.
48  * @param buf_size      The size of the buffer(s) in bytes.
49  * @param layer_idx     The LTDC layer number to bind the display to. Typically 0 or 1.
50  * @return              The display.
51  */
52 lv_display_t * lv_st_ltdc_create_partial(void * render_buf_1, void * render_buf_2, uint32_t buf_size,
53                                          uint32_t layer_idx);
54 
55 /**********************
56  *      MACROS
57  **********************/
58 
59 #endif /*LV_USE_ST_LTDC*/
60 
61 #ifdef __cplusplus
62 } /*extern "C"*/
63 #endif
64 
65 #endif /*LV_ST_LTDC_H*/
66