29 #ifndef __STM32F4xx_DCMI_H 30 #define __STM32F4xx_DCMI_H 114 #define DCMI_CaptureMode_Continuous ((uint16_t)0x0000) 116 #define DCMI_CaptureMode_SnapShot ((uint16_t)0x0002) 118 #define IS_DCMI_CAPTURE_MODE(MODE)(((MODE) == DCMI_CaptureMode_Continuous) || \ 119 ((MODE) == DCMI_CaptureMode_SnapShot)) 128 #define DCMI_SynchroMode_Hardware ((uint16_t)0x0000) 130 #define DCMI_SynchroMode_Embedded ((uint16_t)0x0010) 132 #define IS_DCMI_SYNCHRO(MODE)(((MODE) == DCMI_SynchroMode_Hardware) || \ 133 ((MODE) == DCMI_SynchroMode_Embedded)) 142 #define DCMI_PCKPolarity_Falling ((uint16_t)0x0000) 143 #define DCMI_PCKPolarity_Rising ((uint16_t)0x0020) 144 #define IS_DCMI_PCKPOLARITY(POLARITY)(((POLARITY) == DCMI_PCKPolarity_Falling) || \ 145 ((POLARITY) == DCMI_PCKPolarity_Rising)) 154 #define DCMI_VSPolarity_Low ((uint16_t)0x0000) 155 #define DCMI_VSPolarity_High ((uint16_t)0x0080) 156 #define IS_DCMI_VSPOLARITY(POLARITY)(((POLARITY) == DCMI_VSPolarity_Low) || \ 157 ((POLARITY) == DCMI_VSPolarity_High)) 166 #define DCMI_HSPolarity_Low ((uint16_t)0x0000) 167 #define DCMI_HSPolarity_High ((uint16_t)0x0040) 168 #define IS_DCMI_HSPOLARITY(POLARITY)(((POLARITY) == DCMI_HSPolarity_Low) || \ 169 ((POLARITY) == DCMI_HSPolarity_High)) 178 #define DCMI_CaptureRate_All_Frame ((uint16_t)0x0000) 179 #define DCMI_CaptureRate_1of2_Frame ((uint16_t)0x0100) 180 #define DCMI_CaptureRate_1of4_Frame ((uint16_t)0x0200) 181 #define IS_DCMI_CAPTURE_RATE(RATE) (((RATE) == DCMI_CaptureRate_All_Frame) || \ 182 ((RATE) == DCMI_CaptureRate_1of2_Frame) ||\ 183 ((RATE) == DCMI_CaptureRate_1of4_Frame)) 192 #define DCMI_ExtendedDataMode_8b ((uint16_t)0x0000) 193 #define DCMI_ExtendedDataMode_10b ((uint16_t)0x0400) 194 #define DCMI_ExtendedDataMode_12b ((uint16_t)0x0800) 195 #define DCMI_ExtendedDataMode_14b ((uint16_t)0x0C00) 196 #define IS_DCMI_EXTENDED_DATA(DATA)(((DATA) == DCMI_ExtendedDataMode_8b) || \ 197 ((DATA) == DCMI_ExtendedDataMode_10b) ||\ 198 ((DATA) == DCMI_ExtendedDataMode_12b) ||\ 199 ((DATA) == DCMI_ExtendedDataMode_14b)) 208 #define DCMI_IT_FRAME ((uint16_t)0x0001) 209 #define DCMI_IT_OVF ((uint16_t)0x0002) 210 #define DCMI_IT_ERR ((uint16_t)0x0004) 211 #define DCMI_IT_VSYNC ((uint16_t)0x0008) 212 #define DCMI_IT_LINE ((uint16_t)0x0010) 213 #define IS_DCMI_CONFIG_IT(IT) ((((IT) & (uint16_t)0xFFE0) == 0x0000) && ((IT) != 0x0000)) 214 #define IS_DCMI_GET_IT(IT) (((IT) == DCMI_IT_FRAME) || \ 215 ((IT) == DCMI_IT_OVF) || \ 216 ((IT) == DCMI_IT_ERR) || \ 217 ((IT) == DCMI_IT_VSYNC) || \ 218 ((IT) == DCMI_IT_LINE)) 230 #define DCMI_FLAG_HSYNC ((uint16_t)0x2001) 231 #define DCMI_FLAG_VSYNC ((uint16_t)0x2002) 232 #define DCMI_FLAG_FNE ((uint16_t)0x2004) 236 #define DCMI_FLAG_FRAMERI ((uint16_t)0x0001) 237 #define DCMI_FLAG_OVFRI ((uint16_t)0x0002) 238 #define DCMI_FLAG_ERRRI ((uint16_t)0x0004) 239 #define DCMI_FLAG_VSYNCRI ((uint16_t)0x0008) 240 #define DCMI_FLAG_LINERI ((uint16_t)0x0010) 244 #define DCMI_FLAG_FRAMEMI ((uint16_t)0x1001) 245 #define DCMI_FLAG_OVFMI ((uint16_t)0x1002) 246 #define DCMI_FLAG_ERRMI ((uint16_t)0x1004) 247 #define DCMI_FLAG_VSYNCMI ((uint16_t)0x1008) 248 #define DCMI_FLAG_LINEMI ((uint16_t)0x1010) 249 #define IS_DCMI_GET_FLAG(FLAG) (((FLAG) == DCMI_FLAG_HSYNC) || \ 250 ((FLAG) == DCMI_FLAG_VSYNC) || \ 251 ((FLAG) == DCMI_FLAG_FNE) || \ 252 ((FLAG) == DCMI_FLAG_FRAMERI) || \ 253 ((FLAG) == DCMI_FLAG_OVFRI) || \ 254 ((FLAG) == DCMI_FLAG_ERRRI) || \ 255 ((FLAG) == DCMI_FLAG_VSYNCRI) || \ 256 ((FLAG) == DCMI_FLAG_LINERI) || \ 257 ((FLAG) == DCMI_FLAG_FRAMEMI) || \ 258 ((FLAG) == DCMI_FLAG_OVFMI) || \ 259 ((FLAG) == DCMI_FLAG_ERRMI) || \ 260 ((FLAG) == DCMI_FLAG_VSYNCMI) || \ 261 ((FLAG) == DCMI_FLAG_LINEMI)) 263 #define IS_DCMI_CLEAR_FLAG(FLAG) ((((FLAG) & (uint16_t)0xFFE0) == 0x0000) && ((FLAG) != 0x0000))
DCMI Init structure definition.
uint16_t DCMI_PCKPolarity
void DCMI_CROPConfig(DCMI_CROPInitTypeDef *DCMI_CROPInitStruct)
Initializes the DCMI peripheral CROP mode according to the specified parameters in the DCMI_CROPInitS...
uint16_t DCMI_CaptureCount
uint8_t DCMI_FrameEndCode
ITStatus DCMI_GetITStatus(uint16_t DCMI_IT)
Checks whether the DCMI interrupt has occurred or not.
DCMI CROP Init structure definition.
uint16_t DCMI_SynchroMode
uint16_t DCMI_CaptureRate
uint16_t DCMI_ExtendedDataMode
CMSIS Cortex-M4 Device Peripheral Access Layer Header File. This file contains all the peripheral reg...
uint8_t DCMI_FrameStartCode
void DCMI_SetEmbeddedSynchroCodes(DCMI_CodesInitTypeDef *DCMI_CodesInitStruct)
Sets the embedded synchronization codes.
uint16_t DCMI_HorizontalOffsetCount
void DCMI_ITConfig(uint16_t DCMI_IT, FunctionalState NewState)
Enables or disables the DCMI interface interrupts.
void DCMI_JPEGCmd(FunctionalState NewState)
Enables or disables the DCMI JPEG format.
void DCMI_ClearITPendingBit(uint16_t DCMI_IT)
Clears the DCMI's interrupt pending bits.
void DCMI_DeInit(void)
Deinitializes the DCMI registers to their default reset values.
FlagStatus DCMI_GetFlagStatus(uint16_t DCMI_FLAG)
Checks whether the DCMI interface flag is set or not.
DCMI Embedded Synchronisation CODE Init structure definition.
uint16_t DCMI_VerticalStartLine
uint8_t DCMI_LineStartCode
void DCMI_ClearFlag(uint16_t DCMI_FLAG)
Clears the DCMI's pending flags.
void DCMI_CaptureCmd(FunctionalState NewState)
Enables or disables the DCMI Capture.
uint16_t DCMI_VerticalLineCount
void DCMI_StructInit(DCMI_InitTypeDef *DCMI_InitStruct)
Fills each DCMI_InitStruct member with its default value.
uint32_t DCMI_ReadData(void)
Reads the data stored in the DR register.
void DCMI_Init(DCMI_InitTypeDef *DCMI_InitStruct)
Initializes the DCMI according to the specified parameters in the DCMI_InitStruct.
void DCMI_Cmd(FunctionalState NewState)
Enables or disables the DCMI interface.
uint16_t DCMI_CaptureMode
void DCMI_CROPCmd(FunctionalState NewState)
Enables or disables the DCMI Crop feature.