STM CMSIS
stm32f4xx_hal_dcmi_ex.h
Go to the documentation of this file.
1 
38 /* Define to prevent recursive inclusion -------------------------------------*/
39 #ifndef __STM32F4xx_HAL_DCMI_EX_H
40 #define __STM32F4xx_HAL_DCMI_EX_H
41 
42 #ifdef __cplusplus
43  extern "C" {
44 #endif
45 
46 #if defined(STM32F407xx) || defined(STM32F417xx) || defined(STM32F427xx) || defined(STM32F437xx) ||\
47  defined(STM32F429xx) || defined(STM32F439xx) || defined(STM32F446xx) || defined(STM32F469xx) ||\
48  defined(STM32F479xx)
49 
50 /* Includes ------------------------------------------------------------------*/
51 #include "stm32f4xx_hal_def.h"
52 
53 
63 /* Exported types ------------------------------------------------------------*/
70 typedef struct
71 {
72  uint8_t FrameStartCode;
73  uint8_t LineStartCode;
74  uint8_t LineEndCode;
75  uint8_t FrameEndCode;
76 }DCMI_CodesInitTypeDef;
77 
81 typedef struct
82 {
83  uint32_t SynchroMode;
86  uint32_t PCKPolarity;
89  uint32_t VSPolarity;
92  uint32_t HSPolarity;
95  uint32_t CaptureRate;
98  uint32_t ExtendedDataMode;
101  DCMI_CodesInitTypeDef SyncroCode;
103  uint32_t JPEGMode;
105 #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
106  uint32_t ByteSelectMode;
109  uint32_t ByteSelectStart;
112  uint32_t LineSelectMode;
115  uint32_t LineSelectStart;
118 #endif /* STM32F446xx || STM32F469xx || STM32F479xx */
119 }DCMI_InitTypeDef;
120 
125 /* Exported constants --------------------------------------------------------*/
126 #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
127 
134 #define DCMI_BSM_ALL ((uint32_t)0x00000000U)
135 #define DCMI_BSM_OTHER ((uint32_t)DCMI_CR_BSM_0)
136 #define DCMI_BSM_ALTERNATE_4 ((uint32_t)DCMI_CR_BSM_1)
137 #define DCMI_BSM_ALTERNATE_2 ((uint32_t)(DCMI_CR_BSM_0 | DCMI_CR_BSM_1))
146 #define DCMI_OEBS_ODD ((uint32_t)0x00000000U)
147 #define DCMI_OEBS_EVEN ((uint32_t)DCMI_CR_OEBS)
156 #define DCMI_LSM_ALL ((uint32_t)0x00000000U)
157 #define DCMI_LSM_ALTERNATE_2 ((uint32_t)DCMI_CR_LSM)
166 #define DCMI_OELS_ODD ((uint32_t)0x00000000U)
167 #define DCMI_OELS_EVEN ((uint32_t)DCMI_CR_OELS)
176 #endif /* STM32F446xx || STM32F469xx || STM32F479xx */
177 
178 /* Exported macro ------------------------------------------------------------*/
179 /* Exported functions --------------------------------------------------------*/
180 /* Private types -------------------------------------------------------------*/
181 /* Private variables ---------------------------------------------------------*/
182 /* Private constants ---------------------------------------------------------*/
183 #define DCMI_POSITION_ESCR_LSC (uint32_t)POSITION_VAL(DCMI_ESCR_LSC)
184 #define DCMI_POSITION_ESCR_LEC (uint32_t)POSITION_VAL(DCMI_ESCR_LEC)
185 #define DCMI_POSITION_ESCR_FEC (uint32_t)POSITION_VAL(DCMI_ESCR_FEC)
187 /* Private macro -------------------------------------------------------------*/
188 #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx)
189 
192 #define IS_DCMI_BYTE_SELECT_MODE(MODE)(((MODE) == DCMI_BSM_ALL) || \
193  ((MODE) == DCMI_BSM_OTHER) || \
194  ((MODE) == DCMI_BSM_ALTERNATE_4) || \
195  ((MODE) == DCMI_BSM_ALTERNATE_2))
196 
197 #define IS_DCMI_BYTE_SELECT_START(POLARITY)(((POLARITY) == DCMI_OEBS_ODD) || \
198  ((POLARITY) == DCMI_OEBS_EVEN))
199 
200 #define IS_DCMI_LINE_SELECT_MODE(MODE)(((MODE) == DCMI_LSM_ALL) || \
201  ((MODE) == DCMI_LSM_ALTERNATE_2))
202 
203 #define IS_DCMI_LINE_SELECT_START(POLARITY)(((POLARITY) == DCMI_OELS_ODD) || \
204  ((POLARITY) == DCMI_OELS_EVEN))
205 #endif /* STM32F446xx || STM32F469xx || STM32F479xx */
206 
210 /* Private functions ---------------------------------------------------------*/
211 #endif /* STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\
212  STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx ||\
213  STM32F479xx */
214 
215 
224 #ifdef __cplusplus
225 }
226 #endif
227 
228 #endif /* __STM32F4xx_HAL_DCMI_H */
229 
230 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
This file contains HAL common defines, enumeration, macros and structures definitions.