diff options
Diffstat (limited to 'lib/chibios-contrib/ext/mcux-sdk/components/video/display/dbi/fsl_dbi.h')
-rw-r--r-- | lib/chibios-contrib/ext/mcux-sdk/components/video/display/dbi/fsl_dbi.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/lib/chibios-contrib/ext/mcux-sdk/components/video/display/dbi/fsl_dbi.h b/lib/chibios-contrib/ext/mcux-sdk/components/video/display/dbi/fsl_dbi.h new file mode 100644 index 000000000..549e2ffaa --- /dev/null +++ b/lib/chibios-contrib/ext/mcux-sdk/components/video/display/dbi/fsl_dbi.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | * Copyright 2019 NXP | ||
3 | * All rights reserved. | ||
4 | * | ||
5 | * SPDX-License-Identifier: BSD-3-Clause | ||
6 | */ | ||
7 | |||
8 | #ifndef _FSL_DBI_H_ | ||
9 | #define _FSL_DBI_H_ | ||
10 | |||
11 | #include "fsl_common.h" | ||
12 | |||
13 | /*! | ||
14 | * @addtogroup dbi | ||
15 | * @{ | ||
16 | */ | ||
17 | |||
18 | /******************************************************************************* | ||
19 | * Definitions | ||
20 | ******************************************************************************/ | ||
21 | /*! | ||
22 | * @brief Callback function when the writeMemory or readMemory finished. | ||
23 | * | ||
24 | * If transfer done successfully, the @p status is kStatus_Success. | ||
25 | */ | ||
26 | typedef void (*dbi_mem_done_callback_t)(status_t status, void *userData); | ||
27 | |||
28 | /*! | ||
29 | * @brief DBI interface (MCU LCD) transfer operation. | ||
30 | * | ||
31 | * The API @ref writeCommand and @ref writeData are blocking method, they returns | ||
32 | * only when transfer finished. They are usually used to transfer small data, for | ||
33 | * example, sending the cofigurations. | ||
34 | * | ||
35 | * The API @ref writeMemory and @ref readMemory are non-blocking method, they are | ||
36 | * used to write or read the LCD contoller video memory. These APIs start transfer | ||
37 | * and return directly, upper layer could be notified by callback when transfer | ||
38 | * done. The callback function is set by @ref setMemoryDoneCallback. | ||
39 | */ | ||
40 | typedef struct _dbi_xfer_ops | ||
41 | { | ||
42 | status_t (*writeCommand)(void *dbiXferHandle, uint32_t command); /*!< Write command. */ | ||
43 | status_t (*writeData)(void *dbiXferHandle, void *data, uint32_t len_byte); /*!< Write data. */ | ||
44 | status_t (*writeMemory)(void *dbiXferHandle, | ||
45 | uint32_t command, | ||
46 | const void *data, | ||
47 | uint32_t len_byte); /*!< Write to the memory. */ | ||
48 | status_t (*readMemory)(void *dbiXferHandle, | ||
49 | uint32_t command, | ||
50 | void *data, | ||
51 | uint32_t len_byte); /*!< Read from the memory. */ | ||
52 | void (*setMemoryDoneCallback)(void *dbiXferHandle, | ||
53 | dbi_mem_done_callback_t callback, | ||
54 | void *userData); /*!< Set the memory access done callback. */ | ||
55 | } dbi_xfer_ops_t; | ||
56 | |||
57 | /******************************************************************************* | ||
58 | * API | ||
59 | ******************************************************************************/ | ||
60 | #if defined(__cplusplus) | ||
61 | extern "C" { | ||
62 | #endif | ||
63 | |||
64 | #if defined(__cplusplus) | ||
65 | } | ||
66 | #endif | ||
67 | |||
68 | /*! @} */ | ||
69 | |||
70 | #endif /* _FSL_DBI_H_ */ | ||