annotate Common/Drivers/STM32F4xx_HAL_DRIVER_v120/Inc/stm32f4xx_hal_dma2d.h @ 56:bab006305b58

language updates
author heinrichsweikamp
date Tue, 07 Aug 2018 17:03:36 +0200
parents 5f11787b4f42
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 * @file stm32f4xx_hal_dma2d.h
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 * @author MCD Application Team
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 * @version V1.2.0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 * @date 26-December-2014
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 * @brief Header file of DMA2D HAL module.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 * @attention
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 * Redistribution and use in source and binary forms, with or without modification,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 * are permitted provided that the following conditions are met:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 * 1. Redistributions of source code must retain the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 * this list of conditions and the following disclaimer.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 * this list of conditions and the following disclaimer in the documentation
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 * and/or other materials provided with the distribution.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 * may be used to endorse or promote products derived from this software
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 * without specific prior written permission.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38 /* Define to prevent recursive inclusion -------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 #ifndef __STM32F4xx_HAL_DMA2D_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 #define __STM32F4xx_HAL_DMA2D_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43 extern "C" {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 #if defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 /* Includes ------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48 #include "stm32f4xx_hal_def.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50 /** @addtogroup STM32F4xx_HAL_Driver
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 /** @defgroup DMA2D DMA2D
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 * @brief DMA2D HAL module driver
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59 /* Exported types ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 /** @defgroup DMA2D_Exported_Types DMA2D Exported Types
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63 #define MAX_DMA2D_LAYER 2
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 * @brief DMA2D color Structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 uint32_t Blue; /*!< Configures the blue value.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73 uint32_t Green; /*!< Configures the green value.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76 uint32_t Red; /*!< Configures the red value.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF. */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78 } DMA2D_ColorTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81 * @brief DMA2D CLUT Structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85 uint32_t *pCLUT; /*!< Configures the DMA2D CLUT memory address.*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87 uint32_t CLUTColorMode; /*!< configures the DMA2D CLUT color mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88 This parameter can be one value of @ref DMA2D_CLUT_CM */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90 uint32_t Size; /*!< configures the DMA2D CLUT size.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91 This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF.*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 } DMA2D_CLUTCfgTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95 * @brief DMA2D Init structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99 uint32_t Mode; /*!< configures the DMA2D transfer mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100 This parameter can be one value of @ref DMA2D_Mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102 uint32_t ColorMode; /*!< configures the color format of the output image.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103 This parameter can be one value of @ref DMA2D_Color_Mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105 uint32_t OutputOffset; /*!< Specifies the Offset value.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106 This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0x3FFF. */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107 } DMA2D_InitTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110 * @brief DMA2D Layer structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114 uint32_t InputOffset; /*!< configures the DMA2D foreground offset.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115 This parameter must be a number between Min_Data = 0x0000 and Max_Data = 0x3FFF. */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117 uint32_t InputColorMode; /*!< configures the DMA2D foreground color mode .
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 This parameter can be one value of @ref DMA2D_Input_Color_Mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120 uint32_t AlphaMode; /*!< configures the DMA2D foreground alpha mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 This parameter can be one value of @ref DMA2D_ALPHA_MODE */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123 uint32_t InputAlpha; /*!< Specifies the DMA2D foreground alpha value and color value in case of A8 or A4 color mode.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124 This parameter must be a number between Min_Data = 0x00000000 and Max_Data = 0xFFFFFFFF
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125 in case of A8 or A4 color mode (ARGB).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126 Otherwise, This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF.*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 } DMA2D_LayerCfgTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131 * @brief HAL DMA2D State structures definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133 typedef enum
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135 HAL_DMA2D_STATE_RESET = 0x00, /*!< DMA2D not yet initialized or disabled */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136 HAL_DMA2D_STATE_READY = 0x01, /*!< Peripheral Initialized and ready for use */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 HAL_DMA2D_STATE_BUSY = 0x02, /*!< an internal process is ongoing */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138 HAL_DMA2D_STATE_TIMEOUT = 0x03, /*!< Timeout state */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139 HAL_DMA2D_STATE_ERROR = 0x04, /*!< DMA2D state error */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140 HAL_DMA2D_STATE_SUSPEND = 0x05 /*!< DMA2D process is suspended */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 }HAL_DMA2D_StateTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144 * @brief DMA2D handle Structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146 typedef struct __DMA2D_HandleTypeDef
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148 DMA2D_TypeDef *Instance; /*!< DMA2D Register base address */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150 DMA2D_InitTypeDef Init; /*!< DMA2D communication parameters */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152 void (* XferCpltCallback)(struct __DMA2D_HandleTypeDef * hdma2d); /*!< DMA2D transfer complete callback */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154 void (* XferErrorCallback)(struct __DMA2D_HandleTypeDef * hdma2d); /*!< DMA2D transfer error callback */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156 DMA2D_LayerCfgTypeDef LayerCfg[MAX_DMA2D_LAYER]; /*!< DMA2D Layers parameters */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158 HAL_LockTypeDef Lock; /*!< DMA2D Lock */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160 __IO HAL_DMA2D_StateTypeDef State; /*!< DMA2D transfer state */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162 __IO uint32_t ErrorCode; /*!< DMA2D Error code */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163 } DMA2D_HandleTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 /* Exported constants --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169 /** @defgroup DMA2D_Exported_Constants DMA2D Exported Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
173 /** @defgroup DMA2D_Error_Code DMA2D Error Code
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176 #define HAL_DMA2D_ERROR_NONE ((uint32_t)0x00000000) /*!< No error */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177 #define HAL_DMA2D_ERROR_TE ((uint32_t)0x00000001) /*!< Transfer error */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178 #define HAL_DMA2D_ERROR_CE ((uint32_t)0x00000002) /*!< Configuration error */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179 #define HAL_DMA2D_ERROR_TIMEOUT ((uint32_t)0x00000020) /*!< Timeout error */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
184 /** @defgroup DMA2D_Mode DMA2D Mode
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 #define DMA2D_M2M ((uint32_t)0x00000000) /*!< DMA2D memory to memory transfer mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188 #define DMA2D_M2M_PFC ((uint32_t)0x00010000) /*!< DMA2D memory to memory with pixel format conversion transfer mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189 #define DMA2D_M2M_BLEND ((uint32_t)0x00020000) /*!< DMA2D memory to memory with blending transfer mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190 #define DMA2D_R2M ((uint32_t)0x00030000) /*!< DMA2D register to memory transfer mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195 /** @defgroup DMA2D_Color_Mode DMA2D Color Mode
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 #define DMA2D_ARGB8888 ((uint32_t)0x00000000) /*!< ARGB8888 DMA2D color mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 #define DMA2D_RGB888 ((uint32_t)0x00000001) /*!< RGB888 DMA2D color mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200 #define DMA2D_RGB565 ((uint32_t)0x00000002) /*!< RGB565 DMA2D color mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201 #define DMA2D_ARGB1555 ((uint32_t)0x00000003) /*!< ARGB1555 DMA2D color mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 #define DMA2D_ARGB4444 ((uint32_t)0x00000004) /*!< ARGB4444 DMA2D color mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 /** @defgroup DMA2D_COLOR_VALUE DMA2D COLOR VALUE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210 #define COLOR_VALUE ((uint32_t)0x000000FF) /*!< color value mask */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
214
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 /** @defgroup DMA2D_SIZE DMA2D SIZE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218 #define DMA2D_PIXEL (DMA2D_NLR_PL >> 16) /*!< DMA2D pixel per line */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219 #define DMA2D_LINE DMA2D_NLR_NL /*!< DMA2D number of line */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
221 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
222 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224 /** @defgroup DMA2D_Offset DMA2D Offset
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227 #define DMA2D_OFFSET DMA2D_FGOR_LO /*!< Line Offset */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
232 /** @defgroup DMA2D_Input_Color_Mode DMA2D Input Color Mode
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
233 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
234 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235 #define CM_ARGB8888 ((uint32_t)0x00000000) /*!< ARGB8888 color mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
236 #define CM_RGB888 ((uint32_t)0x00000001) /*!< RGB888 color mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237 #define CM_RGB565 ((uint32_t)0x00000002) /*!< RGB565 color mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
238 #define CM_ARGB1555 ((uint32_t)0x00000003) /*!< ARGB1555 color mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 #define CM_ARGB4444 ((uint32_t)0x00000004) /*!< ARGB4444 color mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240 #define CM_L8 ((uint32_t)0x00000005) /*!< L8 color mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
241 #define CM_AL44 ((uint32_t)0x00000006) /*!< AL44 color mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242 #define CM_AL88 ((uint32_t)0x00000007) /*!< AL88 color mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243 #define CM_L4 ((uint32_t)0x00000008) /*!< L4 color mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244 #define CM_A8 ((uint32_t)0x00000009) /*!< A8 color mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245 #define CM_A4 ((uint32_t)0x0000000A) /*!< A4 color mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
246 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
247 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
248 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
249
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
250 /** @defgroup DMA2D_ALPHA_MODE DMA2D ALPHA MODE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
251 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
252 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
253 #define DMA2D_NO_MODIF_ALPHA ((uint32_t)0x00000000) /*!< No modification of the alpha channel value */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
254 #define DMA2D_REPLACE_ALPHA ((uint32_t)0x00000001) /*!< Replace original alpha channel value by programmed alpha value */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
255 #define DMA2D_COMBINE_ALPHA ((uint32_t)0x00000002) /*!< Replace original alpha channel value by programmed alpha value
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
256 with original alpha channel value */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
257 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
258 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
259 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261 /** @defgroup DMA2D_CLUT_CM DMA2D CLUT CM
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
264 #define DMA2D_CCM_ARGB8888 ((uint32_t)0x00000000) /*!< ARGB8888 DMA2D C-LUT color mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
265 #define DMA2D_CCM_RGB888 ((uint32_t)0x00000001) /*!< RGB888 DMA2D C-LUT color mode */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
266 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
267 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
268 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
269
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
270 /** @defgroup DMA2D_Size_Clut DMA2D Size Clut
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
271 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
272 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
273 #define DMA2D_CLUT_SIZE (DMA2D_FGPFCCR_CS >> 8) /*!< DMA2D C-LUT size */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
274 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
275 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
276 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
277
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
278 /** @defgroup DMA2D_DeadTime DMA2D DeadTime
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
279 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
280 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
281 #define LINE_WATERMARK DMA2D_LWR_LW
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
282 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
283 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
284 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
285
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
286 /** @defgroup DMA2D_Interrupts DMA2D Interrupts
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
287 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
288 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
289 #define DMA2D_IT_CE DMA2D_CR_CEIE /*!< Configuration Error Interrupt */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
290 #define DMA2D_IT_CTC DMA2D_CR_CTCIE /*!< C-LUT Transfer Complete Interrupt */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
291 #define DMA2D_IT_CAE DMA2D_CR_CAEIE /*!< C-LUT Access Error Interrupt */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
292 #define DMA2D_IT_TW DMA2D_CR_TWIE /*!< Transfer Watermark Interrupt */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
293 #define DMA2D_IT_TC DMA2D_CR_TCIE /*!< Transfer Complete Interrupt */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
294 #define DMA2D_IT_TE DMA2D_CR_TEIE /*!< Transfer Error Interrupt */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
295 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
296 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
297 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
298
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
299 /** @defgroup DMA2D_Flag DMA2D Flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
300 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
301 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
302 #define DMA2D_FLAG_CE DMA2D_ISR_CEIF /*!< Configuration Error Interrupt Flag */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
303 #define DMA2D_FLAG_CTC DMA2D_ISR_CTCIF /*!< C-LUT Transfer Complete Interrupt Flag */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
304 #define DMA2D_FLAG_CAE DMA2D_ISR_CAEIF /*!< C-LUT Access Error Interrupt Flag */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
305 #define DMA2D_FLAG_TW DMA2D_ISR_TWIF /*!< Transfer Watermark Interrupt Flag */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
306 #define DMA2D_FLAG_TC DMA2D_ISR_TCIF /*!< Transfer Complete Interrupt Flag */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
307 #define DMA2D_FLAG_TE DMA2D_ISR_TEIF /*!< Transfer Error Interrupt Flag */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
308 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
309 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
310 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
311
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
312 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
313 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
314 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
315 /* Exported macro ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
316 /** @defgroup DMA2D_Exported_Macros DMA2D Exported Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
317 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
318 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
319
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
320 /** @brief Reset DMA2D handle state
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
321 * @param __HANDLE__: specifies the DMA2D handle.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
322 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
323 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
324 #define __HAL_DMA2D_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DMA2D_STATE_RESET)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
325
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
326 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
327 * @brief Enable the DMA2D.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
328 * @param __HANDLE__: DMA2D handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
329 * @retval None.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
330 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
331 #define __HAL_DMA2D_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= DMA2D_CR_START)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
332
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
333 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
334 * @brief Disable the DMA2D.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
335 * @param __HANDLE__: DMA2D handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
336 * @retval None.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
337 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
338 #define __HAL_DMA2D_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~DMA2D_CR_START)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
339
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
340 /* Interrupt & Flag management */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
341 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
342 * @brief Get the DMA2D pending flags.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
343 * @param __HANDLE__: DMA2D handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
344 * @param __FLAG__: Get the specified flag.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
345 * This parameter can be any combination of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
346 * @arg DMA2D_FLAG_CE: Configuration error flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
347 * @arg DMA2D_FLAG_CTC: C-LUT transfer complete flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
348 * @arg DMA2D_FLAG_CAE: C-LUT access error flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
349 * @arg DMA2D_FLAG_TW: Transfer Watermark flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
350 * @arg DMA2D_FLAG_TC: Transfer complete flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
351 * @arg DMA2D_FLAG_TE: Transfer error flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
352 * @retval The state of FLAG.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
353 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
354 #define __HAL_DMA2D_GET_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR & (__FLAG__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
355
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
356 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
357 * @brief Clears the DMA2D pending flags.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
358 * @param __HANDLE__: DMA2D handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
359 * @param __FLAG__: specifies the flag to clear.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
360 * This parameter can be any combination of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
361 * @arg DMA2D_FLAG_CE: Configuration error flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
362 * @arg DMA2D_FLAG_CTC: C-LUT transfer complete flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
363 * @arg DMA2D_FLAG_CAE: C-LUT access error flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
364 * @arg DMA2D_FLAG_TW: Transfer Watermark flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
365 * @arg DMA2D_FLAG_TC: Transfer complete flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
366 * @arg DMA2D_FLAG_TE: Transfer error flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
367 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
368 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
369 #define __HAL_DMA2D_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->IFCR = (__FLAG__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
370
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
371 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
372 * @brief Enables the specified DMA2D interrupts.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
373 * @param __HANDLE__: DMA2D handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
374 * @param __INTERRUPT__: specifies the DMA2D interrupt sources to be enabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
375 * This parameter can be any combination of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
376 * @arg DMA2D_IT_CE: Configuration error interrupt mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
377 * @arg DMA2D_IT_CTC: C-LUT transfer complete interrupt mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
378 * @arg DMA2D_IT_CAE: C-LUT access error interrupt mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
379 * @arg DMA2D_IT_TW: Transfer Watermark interrupt mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
380 * @arg DMA2D_IT_TC: Transfer complete interrupt mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
381 * @arg DMA2D_IT_TE: Transfer error interrupt mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
382 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
383 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
384 #define __HAL_DMA2D_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR |= (__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
385
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
386 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
387 * @brief Disables the specified DMA2D interrupts.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
388 * @param __HANDLE__: DMA2D handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
389 * @param __INTERRUPT__: specifies the DMA2D interrupt sources to be disabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
390 * This parameter can be any combination of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
391 * @arg DMA2D_IT_CE: Configuration error interrupt mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
392 * @arg DMA2D_IT_CTC: C-LUT transfer complete interrupt mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
393 * @arg DMA2D_IT_CAE: C-LUT access error interrupt mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
394 * @arg DMA2D_IT_TW: Transfer Watermark interrupt mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
395 * @arg DMA2D_IT_TC: Transfer complete interrupt mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
396 * @arg DMA2D_IT_TE: Transfer error interrupt mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
397 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
398 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
399 #define __HAL_DMA2D_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR &= ~(__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
400
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
401 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
402 * @brief Checks whether the specified DMA2D interrupt has occurred or not.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
403 * @param __HANDLE__: DMA2D handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
404 * @param __INTERRUPT__: specifies the DMA2D interrupt source to check.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
405 * This parameter can be one of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
406 * @arg DMA2D_IT_CE: Configuration error interrupt mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
407 * @arg DMA2D_IT_CTC: C-LUT transfer complete interrupt mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
408 * @arg DMA2D_IT_CAE: C-LUT access error interrupt mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
409 * @arg DMA2D_IT_TW: Transfer Watermark interrupt mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
410 * @arg DMA2D_IT_TC: Transfer complete interrupt mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
411 * @arg DMA2D_IT_TE: Transfer error interrupt mask
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
412 * @retval The state of INTERRUPT.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
413 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
414 #define __HAL_DMA2D_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR & (__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
415 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
416 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
417 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
418
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
419 /* Exported functions --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
420 /** @defgroup DMA2D_Exported_Functions DMA2D Exported Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
421 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
422 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
423 /* Initialization and de-initialization functions *******************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
424 HAL_StatusTypeDef HAL_DMA2D_Init(DMA2D_HandleTypeDef *hdma2d);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
425 HAL_StatusTypeDef HAL_DMA2D_DeInit (DMA2D_HandleTypeDef *hdma2d);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
426 void HAL_DMA2D_MspInit(DMA2D_HandleTypeDef* hdma2d);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
427 void HAL_DMA2D_MspDeInit(DMA2D_HandleTypeDef* hdma2d);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
428
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
429 /* IO operation functions *******************************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
430 HAL_StatusTypeDef HAL_DMA2D_Start(DMA2D_HandleTypeDef *hdma2d, uint32_t pdata, uint32_t DstAddress, uint32_t Width, uint32_t Height);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
431 HAL_StatusTypeDef HAL_DMA2D_BlendingStart(DMA2D_HandleTypeDef *hdma2d, uint32_t SrcAddress1, uint32_t SrcAddress2, uint32_t DstAddress, uint32_t Width, uint32_t Height);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
432 HAL_StatusTypeDef HAL_DMA2D_Start_IT(DMA2D_HandleTypeDef *hdma2d, uint32_t pdata, uint32_t DstAddress, uint32_t Width, uint32_t Height);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
433 HAL_StatusTypeDef HAL_DMA2D_BlendingStart_IT(DMA2D_HandleTypeDef *hdma2d, uint32_t SrcAddress1, uint32_t SrcAddress2, uint32_t DstAddress, uint32_t Width, uint32_t Height);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
434 HAL_StatusTypeDef HAL_DMA2D_Suspend(DMA2D_HandleTypeDef *hdma2d);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
435 HAL_StatusTypeDef HAL_DMA2D_Resume(DMA2D_HandleTypeDef *hdma2d);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
436 HAL_StatusTypeDef HAL_DMA2D_Abort(DMA2D_HandleTypeDef *hdma2d);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
437 HAL_StatusTypeDef HAL_DMA2D_PollForTransfer(DMA2D_HandleTypeDef *hdma2d, uint32_t Timeout);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
438 void HAL_DMA2D_IRQHandler(DMA2D_HandleTypeDef *hdma2d);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
439
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
440 /* Peripheral Control functions *************************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
441 HAL_StatusTypeDef HAL_DMA2D_ConfigLayer(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
442 HAL_StatusTypeDef HAL_DMA2D_ConfigCLUT(DMA2D_HandleTypeDef *hdma2d, DMA2D_CLUTCfgTypeDef CLUTCfg, uint32_t LayerIdx);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
443 HAL_StatusTypeDef HAL_DMA2D_EnableCLUT(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
444 HAL_StatusTypeDef HAL_DMA2D_DisableCLUT(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
445 HAL_StatusTypeDef HAL_DMA2D_ProgramLineEvent(DMA2D_HandleTypeDef *hdma2d, uint32_t Line);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
446
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
447 /* Peripheral State functions ***************************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
448 HAL_DMA2D_StateTypeDef HAL_DMA2D_GetState(DMA2D_HandleTypeDef *hdma2d);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
449 uint32_t HAL_DMA2D_GetError(DMA2D_HandleTypeDef *hdma2d);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
450 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
451 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
452 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
453
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
454 /* Private types -------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
455 /** @defgroup DMA2D_Private_Types DMA2D Private Types
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
456 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
457 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
458
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
459 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
460 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
461 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
462
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
463 /* Private defines -------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
464 /** @defgroup DMA2D_Private_Defines DMA2D Private Defines
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
465 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
466 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
467
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
468 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
469 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
470 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
471
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
472 /* Private variables ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
473 /** @defgroup DMA2D_Private_Variables DMA2D Private Variables
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
474 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
475 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
476
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
477 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
478 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
479 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
480
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
481 /* Private constants ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
482 /** @defgroup DMA2D_Private_Constants DMA2D Private Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
483 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
484 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
485
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
486 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
487 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
488 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
489
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
490 /* Private macros ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
491 /** @defgroup DMA2D_Private_Macros DMA2D Private Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
492 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
493 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
494 #define IS_DMA2D_LAYER(LAYER) ((LAYER) <= MAX_DMA2D_LAYER)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
495 #define IS_DMA2D_MODE(MODE) (((MODE) == DMA2D_M2M) || ((MODE) == DMA2D_M2M_PFC) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
496 ((MODE) == DMA2D_M2M_BLEND) || ((MODE) == DMA2D_R2M))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
497 #define IS_DMA2D_CMODE(MODE_ARGB) (((MODE_ARGB) == DMA2D_ARGB8888) || ((MODE_ARGB) == DMA2D_RGB888) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
498 ((MODE_ARGB) == DMA2D_RGB565) || ((MODE_ARGB) == DMA2D_ARGB1555) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
499 ((MODE_ARGB) == DMA2D_ARGB4444))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
500 #define IS_DMA2D_COLOR(COLOR) ((COLOR) <= COLOR_VALUE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
501 #define IS_DMA2D_LINE(LINE) ((LINE) <= DMA2D_LINE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
502 #define IS_DMA2D_PIXEL(PIXEL) ((PIXEL) <= DMA2D_PIXEL)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
503 #define IS_DMA2D_OFFSET(OOFFSET) ((OOFFSET) <= DMA2D_OFFSET)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
504 #define IS_DMA2D_INPUT_COLOR_MODE(INPUT_CM) (((INPUT_CM) == CM_ARGB8888) || ((INPUT_CM) == CM_RGB888) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
505 ((INPUT_CM) == CM_RGB565) || ((INPUT_CM) == CM_ARGB1555) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
506 ((INPUT_CM) == CM_ARGB4444) || ((INPUT_CM) == CM_L8) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
507 ((INPUT_CM) == CM_AL44) || ((INPUT_CM) == CM_AL88) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
508 ((INPUT_CM) == CM_L4) || ((INPUT_CM) == CM_A8) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
509 ((INPUT_CM) == CM_A4))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
510 #define IS_DMA2D_ALPHA_MODE(AlphaMode) (((AlphaMode) == DMA2D_NO_MODIF_ALPHA) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
511 ((AlphaMode) == DMA2D_REPLACE_ALPHA) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
512 ((AlphaMode) == DMA2D_COMBINE_ALPHA))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
513 #define IS_DMA2D_CLUT_CM(CLUT_CM) (((CLUT_CM) == DMA2D_CCM_ARGB8888) || ((CLUT_CM) == DMA2D_CCM_RGB888))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
514 #define IS_DMA2D_CLUT_SIZE(CLUT_SIZE) ((CLUT_SIZE) <= DMA2D_CLUT_SIZE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
515 #define IS_DMA2D_LineWatermark(LineWatermark) ((LineWatermark) <= LINE_WATERMARK)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
516 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
517 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
518 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
519
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
520 /* Private functions prototypes ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
521 /** @defgroup DMA2D_Private_Functions_Prototypes DMA2D Private Functions Prototypes
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
522 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
523 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
524
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
525 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
526 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
527 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
528
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
529 /* Private functions ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
530 /** @defgroup DMA2D_Private_Functions DMA2D Private Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
531 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
532 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
533
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
534 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
535 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
536 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
537
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
538 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
539 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
540 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
541
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
542 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
543 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
544 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
545
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
546 #endif /* STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
547
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
548 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
549 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
550 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
551
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
552 #endif /* __STM32F4xx_HAL_DMA2D_H */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
553
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
554 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/