aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/ext/mcux-sdk/components/video/display/dc/fsl_dc_fb.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios-contrib/ext/mcux-sdk/components/video/display/dc/fsl_dc_fb.h')
-rw-r--r--lib/chibios-contrib/ext/mcux-sdk/components/video/display/dc/fsl_dc_fb.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/lib/chibios-contrib/ext/mcux-sdk/components/video/display/dc/fsl_dc_fb.h b/lib/chibios-contrib/ext/mcux-sdk/components/video/display/dc/fsl_dc_fb.h
new file mode 100644
index 000000000..a81b15b93
--- /dev/null
+++ b/lib/chibios-contrib/ext/mcux-sdk/components/video/display/dc/fsl_dc_fb.h
@@ -0,0 +1,80 @@
1/*
2 * Copyright 2019 NXP
3 * All rights reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
8#ifndef _FSL_DC_FB_H_
9#define _FSL_DC_FB_H_
10
11#include "fsl_video_common.h"
12
13/*!
14 * @addtogroup dc_fb
15 * @{
16 */
17
18/*******************************************************************************
19 * Definitions
20 ******************************************************************************/
21/*! @brief frame buffer information. */
22typedef struct _dc_fb_info
23{
24 uint16_t startX; /*!< The start position in the panel. */
25 uint16_t startY; /*!< The start position in the panel. */
26 uint16_t width; /*!< How many pixels in one line of the frame buffer.*/
27 uint16_t height; /*!< How many lines in one frame buffer. */
28 uint16_t strideBytes; /*!< Stride of the frame buffer */
29 video_pixel_format_t pixelFormat; /*!< Pixel format of the frame buffer */
30} dc_fb_info_t;
31
32/*! @brief Display controller frame callback. */
33typedef void (*dc_fb_callback_t)(void *param, void *inactiveBuffer);
34
35/*! @brief Display controller. */
36typedef struct _dc_fb dc_fb_t;
37
38/*! @brief Display controller operations. */
39typedef struct _dc_fb_ops
40{
41 status_t (*init)(const dc_fb_t *dc);
42 status_t (*deinit)(const dc_fb_t *dc);
43 status_t (*enableLayer)(const dc_fb_t *dc, uint8_t layer);
44 status_t (*disableLayer)(const dc_fb_t *dc, uint8_t layer);
45 status_t (*setLayerConfig)(const dc_fb_t *dc, uint8_t layer, dc_fb_info_t *fbInfo);
46 status_t (*getLayerDefaultConfig)(const dc_fb_t *dc, uint8_t layer, dc_fb_info_t *fbInfo);
47 status_t (*setFrameBuffer)(const dc_fb_t *dc, uint8_t layer, void *frameBuffer);
48 uint32_t (*getProperty)(const dc_fb_t *dc);
49 void (*setCallback)(const dc_fb_t *dc, uint8_t layer, dc_fb_callback_t callback, void *param);
50} dc_fb_ops_t;
51
52/*! @brief Display controller property. */
53enum _dc_fb_property
54{
55 kDC_FB_ReserveFrameBuffer = (1 << 0), /*< One frame buffer is always used as the DC active buffer. */
56};
57
58/*! @brief Display controller driver handle. */
59struct _dc_fb
60{
61 const dc_fb_ops_t *ops; /* Display controller operations. */
62 void *prvData; /* Private data for the display controller. */
63 const void *config; /* Configuration for the display controller. */
64};
65
66/*******************************************************************************
67 * API
68 ******************************************************************************/
69
70#if defined(__cplusplus)
71extern "C" {
72#endif
73
74#if defined(__cplusplus)
75}
76#endif
77
78/*! @} */
79
80#endif /* _FSL_DC_FB_H_ */