]> git.donarmstrong.com Git - qmk_firmware.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F4/stm32f4xx_hal_dcmi.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[qmk_firmware.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / cmsis / TARGET_STM / TARGET_STM32F4 / stm32f4xx_hal_dcmi.h
1 /**
2   ******************************************************************************
3   * @file    stm32f4xx_hal_dcmi.h
4   * @author  MCD Application Team
5   * @version V1.1.0
6   * @date    19-June-2014
7   * @brief   Header file of DCMI HAL module.
8   ******************************************************************************
9   * @attention
10   *
11   * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
12   *
13   * Redistribution and use in source and binary forms, with or without modification,
14   * are permitted provided that the following conditions are met:
15   *   1. Redistributions of source code must retain the above copyright notice,
16   *      this list of conditions and the following disclaimer.
17   *   2. Redistributions in binary form must reproduce the above copyright notice,
18   *      this list of conditions and the following disclaimer in the documentation
19   *      and/or other materials provided with the distribution.
20   *   3. Neither the name of STMicroelectronics nor the names of its contributors
21   *      may be used to endorse or promote products derived from this software
22   *      without specific prior written permission.
23   *
24   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27   * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
28   * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33   * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34   *
35   ******************************************************************************
36   */ 
37
38 /* Define to prevent recursive inclusion -------------------------------------*/
39 #ifndef __STM32F4xx_HAL_DCMI_H
40 #define __STM32F4xx_HAL_DCMI_H
41
42 #ifdef __cplusplus
43  extern "C" {
44 #endif
45
46 #if defined(STM32F407xx) || defined(STM32F417xx) || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)
47 /* Includes ------------------------------------------------------------------*/
48 #include "stm32f4xx_hal_def.h"
49
50
51 /** @addtogroup STM32F4xx_HAL_Driver
52   * @{
53   */
54
55 /** @addtogroup DCMI
56   * @{
57   */  
58
59 /* Exported types ------------------------------------------------------------*/
60
61 /** 
62   * @brief DCMI Error source
63   */
64 typedef enum
65
66   DCMI_ERROR_SYNC = 1,     /*!< Synchronisation error */
67   DCMI_OVERRUN   = 2,      /*!< DCMI Overrun */
68 }DCMI_ErrorTypeDef;
69
70 /** 
71   * @brief   DCMI Embedded Synchronisation CODE Init structure definition
72   */ 
73 typedef struct
74 {
75   uint8_t FrameStartCode; /*!< Specifies the code of the frame start delimiter. */
76   uint8_t LineStartCode;  /*!< Specifies the code of the line start delimiter.  */
77   uint8_t LineEndCode;    /*!< Specifies the code of the line end delimiter.    */
78   uint8_t FrameEndCode;   /*!< Specifies the code of the frame end delimiter.   */
79 }DCMI_CodesInitTypeDef;
80
81 /** 
82   * @brief   DCMI Init structure definition
83   */ 
84 typedef struct
85 {
86   uint32_t  SynchroMode;                /*!< Specifies the Synchronization Mode: Hardware or Embedded.
87                                              This parameter can be a value of @ref DCMI_Synchronization_Mode */
88
89   uint32_t  PCKPolarity;                /*!< Specifies the Pixel clock polarity: Falling or Rising.
90                                              This parameter can be a value of @ref DCMI_PIXCK_Polarity       */
91
92   uint32_t  VSPolarity;                 /*!< Specifies the Vertical synchronization polarity: High or Low.
93                                              This parameter can be a value of @ref DCMI_VSYNC_Polarity       */
94
95   uint32_t  HSPolarity;                 /*!< Specifies the Horizontal synchronization polarity: High or Low.
96                                              This parameter can be a value of @ref DCMI_HSYNC_Polarity       */
97
98   uint32_t  CaptureRate;                /*!< Specifies the frequency of frame capture: All, 1/2 or 1/4.
99                                              This parameter can be a value of @ref DCMI_Capture_Rate         */
100
101   uint32_t  ExtendedDataMode;           /*!< Specifies the data width: 8-bit, 10-bit, 12-bit or 14-bit.
102                                              This parameter can be a value of @ref DCMI_Extended_Data_Mode   */
103
104   DCMI_CodesInitTypeDef SyncroCode;     /*!< Specifies the code of the frame start delimiter.                */
105
106   uint32_t JPEGMode;                    /*!< Enable or Disable the JPEG mode.                                
107                                              This parameter can be a value of @ref DCMI_MODE_JPEG            */
108
109 }DCMI_InitTypeDef;
110
111 /** 
112   * @brief  HAL DCMI State structures definition
113   */ 
114 typedef enum
115 {
116   HAL_DCMI_STATE_RESET             = 0x00,  /*!< DCMI not yet initialized or disabled  */
117   HAL_DCMI_STATE_READY             = 0x01,  /*!< DCMI initialized and ready for use    */
118   HAL_DCMI_STATE_BUSY              = 0x02,  /*!< DCMI internal processing is ongoing   */
119   HAL_DCMI_STATE_TIMEOUT           = 0x03,  /*!< DCMI timeout state                    */
120   HAL_DCMI_STATE_ERROR             = 0x04   /*!< DCMI error state                      */
121 }HAL_DCMI_StateTypeDef;
122
123 /** 
124   * @brief  DCMI handle Structure definition
125   */
126 typedef struct
127 {
128   DCMI_TypeDef                  *Instance;           /*!< DCMI Register base address   */
129
130   DCMI_InitTypeDef              Init;                /*!< DCMI parameters              */
131
132   HAL_LockTypeDef               Lock;                /*!< DCMI locking object          */
133
134   __IO HAL_DCMI_StateTypeDef    State;               /*!< DCMI state                   */
135
136   __IO uint32_t                 XferCount;           /*!< DMA transfer counter         */
137
138   __IO uint32_t                 XferSize;            /*!< DMA transfer size            */
139
140   uint32_t                      XferTransferNumber;  /*!< DMA transfer number          */
141
142   uint32_t                      pBuffPtr;            /*!< Pointer to DMA output buffer */
143
144   DMA_HandleTypeDef             *DMA_Handle;         /*!< Pointer to the DMA handler   */
145
146   __IO uint32_t                 ErrorCode;           /*!< DCMI Error code              */
147
148 }DCMI_HandleTypeDef;
149
150 /* Exported constants --------------------------------------------------------*/
151
152 /** @defgroup DCMI_Exported_Constants
153   * @{
154   */
155
156 /** @defgroup DCMI_Error_Code
157   * @{
158   */
159 #define HAL_DCMI_ERROR_NONE      ((uint32_t)0x00000000)    /*!< No error              */
160 #define HAL_DCMI_ERROR_OVF       ((uint32_t)0x00000001)    /*!< Overflow error        */
161 #define HAL_DCMI_ERROR_SYNC      ((uint32_t)0x00000002)    /*!< Synchronization error */
162 #define HAL_DCMI_ERROR_TIMEOUT   ((uint32_t)0x00000020)    /*!< Timeout error         */
163 /**
164   * @}
165   */
166
167 /** @defgroup DCMI_Capture_Mode
168   * @{
169   */ 
170 #define DCMI_MODE_CONTINUOUS           ((uint32_t)0x00000000)  /*!< The received data are transferred continuously 
171                                                                     into the destination memory through the DMA             */
172 #define DCMI_MODE_SNAPSHOT             ((uint32_t)DCMI_CR_CM)  /*!< Once activated, the interface waits for the start of 
173                                                                     frame and then transfers a single frame through the DMA */
174
175 #define IS_DCMI_CAPTURE_MODE(MODE)(((MODE) == DCMI_MODE_CONTINUOUS) || \
176                                    ((MODE) == DCMI_MODE_SNAPSHOT))
177 /**
178   * @}
179   */
180
181 /** @defgroup DCMI_Synchronization_Mode
182   * @{
183   */ 
184 #define DCMI_SYNCHRO_HARDWARE        ((uint32_t)0x00000000)   /*!< Hardware synchronization data capture (frame/line start/stop)
185                                                                    is synchronized with the HSYNC/VSYNC signals                  */
186 #define DCMI_SYNCHRO_EMBEDDED        ((uint32_t)DCMI_CR_ESS)  /*!< Embedded synchronization data capture is synchronized with 
187                                                                    synchronization codes embedded in the data flow               */
188
189 #define IS_DCMI_SYNCHRO(MODE)(((MODE) == DCMI_SYNCHRO_HARDWARE) || \
190                               ((MODE) == DCMI_SYNCHRO_EMBEDDED))
191 /**
192   * @}
193   */
194
195 /** @defgroup DCMI_PIXCK_Polarity
196   * @{
197   */
198 #define DCMI_PCKPOLARITY_FALLING    ((uint32_t)0x00000000)      /*!< Pixel clock active on Falling edge */
199 #define DCMI_PCKPOLARITY_RISING     ((uint32_t)DCMI_CR_PCKPOL)  /*!< Pixel clock active on Rising edge  */
200
201 #define IS_DCMI_PCKPOLARITY(POLARITY)(((POLARITY) == DCMI_PCKPOLARITY_FALLING) || \
202                                       ((POLARITY) == DCMI_PCKPOLARITY_RISING))
203 /**
204   * @}
205   */
206
207 /** @defgroup DCMI_VSYNC_Polarity
208   * @{
209   */
210 #define DCMI_VSPOLARITY_LOW     ((uint32_t)0x00000000)     /*!< Vertical synchronization active Low  */
211 #define DCMI_VSPOLARITY_HIGH    ((uint32_t)DCMI_CR_VSPOL)  /*!< Vertical synchronization active High */
212
213 #define IS_DCMI_VSPOLARITY(POLARITY)(((POLARITY) == DCMI_VSPOLARITY_LOW) || \
214                                      ((POLARITY) == DCMI_VSPOLARITY_HIGH))
215 /**
216   * @}
217   */
218
219 /** @defgroup DCMI_HSYNC_Polarity
220   * @{
221   */ 
222 #define DCMI_HSPOLARITY_LOW     ((uint32_t)0x00000000)     /*!< Horizontal synchronization active Low  */
223 #define DCMI_HSPOLARITY_HIGH    ((uint32_t)DCMI_CR_HSPOL)  /*!< Horizontal synchronization active High */
224
225 #define IS_DCMI_HSPOLARITY(POLARITY)(((POLARITY) == DCMI_HSPOLARITY_LOW) || \
226                                      ((POLARITY) == DCMI_HSPOLARITY_HIGH))
227 /**
228   * @}
229   */
230
231 /** @defgroup DCMI_MODE_JPEG 
232   * @{
233   */
234 #define DCMI_JPEG_DISABLE   ((uint32_t)0x00000000)    /*!< Mode JPEG Disabled  */
235 #define DCMI_JPEG_ENABLE    ((uint32_t)DCMI_CR_JPEG)  /*!< Mode JPEG Enabled   */
236
237 #define IS_DCMI_MODE_JPEG(JPEG_MODE)(((JPEG_MODE) == DCMI_JPEG_DISABLE) || \
238                                      ((JPEG_MODE) == DCMI_JPEG_ENABLE))
239 /**
240   * @}
241   */
242
243 /** @defgroup DCMI_Capture_Rate 
244   * @{
245   */
246 #define DCMI_CR_ALL_FRAME            ((uint32_t)0x00000000)      /*!< All frames are captured        */
247 #define DCMI_CR_ALTERNATE_2_FRAME    ((uint32_t)DCMI_CR_FCRC_0)  /*!< Every alternate frame captured */
248 #define DCMI_CR_ALTERNATE_4_FRAME    ((uint32_t)DCMI_CR_FCRC_1)  /*!< One frame in 4 frames captured */
249
250 #define IS_DCMI_CAPTURE_RATE(RATE) (((RATE) == DCMI_CR_ALL_FRAME)         || \
251                                     ((RATE) == DCMI_CR_ALTERNATE_2_FRAME) || \
252                                     ((RATE) == DCMI_CR_ALTERNATE_4_FRAME))
253 /**
254   * @}
255   */
256
257 /** @defgroup DCMI_Extended_Data_Mode 
258   * @{
259   */
260 #define DCMI_EXTEND_DATA_8B     ((uint32_t)0x00000000)                       /*!< Interface captures 8-bit data on every pixel clock  */
261 #define DCMI_EXTEND_DATA_10B    ((uint32_t)DCMI_CR_EDM_0)                    /*!< Interface captures 10-bit data on every pixel clock */
262 #define DCMI_EXTEND_DATA_12B    ((uint32_t)DCMI_CR_EDM_1)                    /*!< Interface captures 12-bit data on every pixel clock */
263 #define DCMI_EXTEND_DATA_14B    ((uint32_t)(DCMI_CR_EDM_0 | DCMI_CR_EDM_1))  /*!< Interface captures 14-bit data on every pixel clock */
264
265 #define IS_DCMI_EXTENDED_DATA(DATA)(((DATA) == DCMI_EXTEND_DATA_8B)  || \
266                                     ((DATA) == DCMI_EXTEND_DATA_10B) || \
267                                     ((DATA) == DCMI_EXTEND_DATA_12B) || \
268                                     ((DATA) == DCMI_EXTEND_DATA_14B))
269 /**
270   * @}
271   */
272
273 /** @defgroup DCMI_Window_Coordinate 
274   * @{
275   */
276 #define DCMI_WINDOW_COORDINATE    ((uint32_t)0x3FFF)  /*!< Window coordinate */
277
278 #define IS_DCMI_WINDOW_COORDINATE(COORDINATE) ((COORDINATE) <= DCMI_WINDOW_COORDINATE)
279 /**
280   * @}
281   */
282
283 /** @defgroup DCMI_Window_Height 
284   * @{
285   */ 
286 #define DCMI_WINDOW_HEIGHT    ((uint32_t)0x1FFF)  /*!< Window Height */
287
288 #define IS_DCMI_WINDOW_HEIGHT(HEIGHT) ((HEIGHT) <= DCMI_WINDOW_HEIGHT)
289 /**
290   * @}
291   */
292
293 /** @defgroup DCMI_interrupt_sources
294   * @{
295   */
296 #define DCMI_IT_FRAME    ((uint32_t)DCMI_IER_FRAME_IE)
297 #define DCMI_IT_OVF      ((uint32_t)DCMI_IER_OVF_IE)
298 #define DCMI_IT_ERR      ((uint32_t)DCMI_IER_ERR_IE)
299 #define DCMI_IT_VSYNC    ((uint32_t)DCMI_IER_VSYNC_IE)
300 #define DCMI_IT_LINE     ((uint32_t)DCMI_IER_LINE_IE)
301
302 #define IS_DCMI_CONFIG_IT(IT) ((((IT) & (uint16_t)0xFFE0) == 0x0000) && ((IT) != 0x0000))
303
304 #define IS_DCMI_GET_IT(IT) (((IT) == DCMI_IT_FRAME) || \
305                             ((IT) == DCMI_IT_OVF)   || \
306                             ((IT) == DCMI_IT_ERR)   || \
307                             ((IT) == DCMI_IT_VSYNC) || \
308                             ((IT) == DCMI_IT_LINE))
309 /**
310   * @}
311   */
312
313 /** @defgroup DCMI_Flags
314   * @{
315   */
316
317 /** 
318   * @brief   DCMI SR register
319   */ 
320 #define DCMI_FLAG_HSYNC     ((uint32_t)0x2001)
321 #define DCMI_FLAG_VSYNC     ((uint32_t)0x2002)
322 #define DCMI_FLAG_FNE       ((uint32_t)0x2004)
323 /** 
324   * @brief   DCMI RISR register  
325   */ 
326 #define DCMI_FLAG_FRAMERI    ((uint32_t)DCMI_RISR_FRAME_RIS)
327 #define DCMI_FLAG_OVFRI      ((uint32_t)DCMI_RISR_OVF_RIS)
328 #define DCMI_FLAG_ERRRI      ((uint32_t)DCMI_RISR_ERR_RIS)
329 #define DCMI_FLAG_VSYNCRI    ((uint32_t)DCMI_RISR_VSYNC_RIS)
330 #define DCMI_FLAG_LINERI     ((uint32_t)DCMI_RISR_LINE_RIS)
331 /** 
332   * @brief   DCMI MISR register  
333   */ 
334 #define DCMI_FLAG_FRAMEMI    ((uint32_t)0x1001)
335 #define DCMI_FLAG_OVFMI      ((uint32_t)0x1002)
336 #define DCMI_FLAG_ERRMI      ((uint32_t)0x1004)
337 #define DCMI_FLAG_VSYNCMI    ((uint32_t)0x1008)
338 #define DCMI_FLAG_LINEMI     ((uint32_t)0x1010)
339 #define IS_DCMI_GET_FLAG(FLAG) (((FLAG) == DCMI_FLAG_HSYNC)   || \
340                                 ((FLAG) == DCMI_FLAG_VSYNC)   || \
341                                 ((FLAG) == DCMI_FLAG_FNE)     || \
342                                 ((FLAG) == DCMI_FLAG_FRAMERI) || \
343                                 ((FLAG) == DCMI_FLAG_OVFRI)   || \
344                                 ((FLAG) == DCMI_FLAG_ERRRI)   || \
345                                 ((FLAG) == DCMI_FLAG_VSYNCRI) || \
346                                 ((FLAG) == DCMI_FLAG_LINERI)  || \
347                                 ((FLAG) == DCMI_FLAG_FRAMEMI) || \
348                                 ((FLAG) == DCMI_FLAG_OVFMI)   || \
349                                 ((FLAG) == DCMI_FLAG_ERRMI)   || \
350                                 ((FLAG) == DCMI_FLAG_VSYNCMI) || \
351                                 ((FLAG) == DCMI_FLAG_LINEMI))
352                                 
353 #define IS_DCMI_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFFE0) == 0x0000) && ((FLAG) != 0x0000))
354 /**
355   * @}
356   */ 
357
358 /**
359   * @}
360   */
361   
362 /* Exported macro ------------------------------------------------------------*/
363
364 /** @brief Reset DCMI handle state
365   * @param  __HANDLE__: specifies the DCMI handle.
366   * @retval None
367   */
368 #define __HAL_DCMI_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DCMI_STATE_RESET)
369
370 /**
371   * @brief  Enable the DCMI.
372   * @param  __HANDLE__: DCMI handle
373   * @retval None
374   */
375 #define __HAL_DCMI_ENABLE(__HANDLE__)    ((__HANDLE__)->Instance->CR |= DCMI_CR_ENABLE)
376
377 /**
378   * @brief  Disable the DCMI.
379   * @param  __HANDLE__: DCMI handle
380   * @retval None
381   */
382 #define __HAL_DCMI_DISABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR &= ~(DCMI_CR_ENABLE))
383
384 /* Interrupt & Flag management */
385 /**
386   * @brief  Get the DCMI pending flags.
387   * @param  __HANDLE__: DCMI handle
388   * @param  __FLAG__: Get the specified flag.
389   *         This parameter can be any combination of the following values:
390   *            @arg DCMI_FLAG_FRAMERI: Frame capture complete flag mask
391   *            @arg DCMI_FLAG_OVFRI: Overflow flag mask
392   *            @arg DCMI_FLAG_ERRRI: Synchronization error flag mask
393   *            @arg DCMI_FLAG_VSYNCRI: VSYNC flag mask
394   *            @arg DCMI_FLAG_LINERI: Line flag mask
395   * @retval The state of FLAG.
396   */
397 #define __HAL_DCMI_GET_FLAG(__HANDLE__, __FLAG__)\
398 ((((__FLAG__) & 0x3000) == 0x0)? ((__HANDLE__)->Instance->RISR & (__FLAG__)) :\
399  (((__FLAG__) & 0x2000) == 0x0)? ((__HANDLE__)->Instance->MISR & (__FLAG__)) : ((__HANDLE__)->Instance->SR & (__FLAG__)))
400
401 /**
402   * @brief  Clear the DCMI pending flags.
403   * @param  __HANDLE__: DCMI handle
404   * @param  __FLAG__: specifies the flag to clear.
405   *         This parameter can be any combination of the following values:
406   *            @arg DCMI_FLAG_FRAMERI: Frame capture complete flag mask
407   *            @arg DCMI_FLAG_OVFRI: Overflow flag mask
408   *            @arg DCMI_FLAG_ERRRI: Synchronization error flag mask
409   *            @arg DCMI_FLAG_VSYNCRI: VSYNC flag mask
410   *            @arg DCMI_FLAG_LINERI: Line flag mask
411   * @retval None
412   */
413 #define __HAL_DCMI_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__))
414
415 /**
416   * @brief  Enable the specified DCMI interrupts.
417   * @param  __HANDLE__:    DCMI handle
418   * @param  __INTERRUPT__: specifies the DCMI interrupt sources to be enabled. 
419   *         This parameter can be any combination of the following values:
420   *            @arg DCMI_IT_FRAME: Frame capture complete interrupt mask
421   *            @arg DCMI_IT_OVF: Overflow interrupt mask
422   *            @arg DCMI_IT_ERR: Synchronization error interrupt mask
423   *            @arg DCMI_IT_VSYNC: VSYNC interrupt mask
424   *            @arg DCMI_IT_LINE: Line interrupt mask
425   * @retval None
426   */
427 #define __HAL_DCMI_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER |= (__INTERRUPT__))
428
429 /**
430   * @brief  Disable the specified DCMI interrupts.
431   * @param  __HANDLE__: DCMI handle
432   * @param  __INTERRUPT__: specifies the DCMI interrupt sources to be enabled. 
433   *         This parameter can be any combination of the following values:
434   *            @arg DCMI_IT_FRAME: Frame capture complete interrupt mask
435   *            @arg DCMI_IT_OVF: Overflow interrupt mask
436   *            @arg DCMI_IT_ERR: Synchronization error interrupt mask
437   *            @arg DCMI_IT_VSYNC: VSYNC interrupt mask
438   *            @arg DCMI_IT_LINE: Line interrupt mask
439   * @retval None
440   */
441 #define __HAL_DCMI_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER &= ~(__INTERRUPT__))
442
443 /**
444   * @brief  Check whether the specified DCMI interrupt has occurred or not.
445   * @param  __HANDLE__: DCMI handle
446   * @param  __INTERRUPT__: specifies the DCMI interrupt source to check.
447   *         This parameter can be one of the following values:
448   *            @arg DCMI_IT_FRAME: Frame capture complete interrupt mask
449   *            @arg DCMI_IT_OVF: Overflow interrupt mask
450   *            @arg DCMI_IT_ERR: Synchronization error interrupt mask
451   *            @arg DCMI_IT_VSYNC: VSYNC interrupt mask
452   *            @arg DCMI_IT_LINE: Line interrupt mask
453   * @retval The state of INTERRUPT.
454   */
455 #define __HAL_DCMI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->MISR & (__INTERRUPT__))
456     
457 /* Exported functions --------------------------------------------------------*/
458
459 /* Initialization and de-initialization functions *****************************/
460 HAL_StatusTypeDef HAL_DCMI_Init(DCMI_HandleTypeDef *hdcmi);
461 HAL_StatusTypeDef HAL_DCMI_DeInit(DCMI_HandleTypeDef *hdcmi);
462 void       HAL_DCMI_MspInit(DCMI_HandleTypeDef* hdcmi);
463 void       HAL_DCMI_MspDeInit(DCMI_HandleTypeDef* hdcmi);
464
465 /* IO operation functions *****************************************************/
466 HAL_StatusTypeDef HAL_DCMI_Start_DMA(DCMI_HandleTypeDef* hdcmi, uint32_t DCMI_Mode, uint32_t pData, uint32_t Length);
467 HAL_StatusTypeDef HAL_DCMI_Stop(DCMI_HandleTypeDef* hdcmi);
468 void       HAL_DCMI_ErrorCallback(DCMI_HandleTypeDef *hdcmi);
469 void       HAL_DCMI_LineEventCallback(DCMI_HandleTypeDef *hdcmi);
470 void       HAL_DCMI_FrameEventCallback(DCMI_HandleTypeDef *hdcmi);
471 void       HAL_DCMI_VsyncEventCallback(DCMI_HandleTypeDef *hdcmi);
472 void              HAL_DCMI_IRQHandler(DCMI_HandleTypeDef *hdcmi);
473
474 /* Peripheral Control functions ***********************************************/
475 HAL_StatusTypeDef     HAL_DCMI_ConfigCROP(DCMI_HandleTypeDef *hdcmi, uint32_t X0, uint32_t Y0, uint32_t XSize, uint32_t YSize);
476 HAL_StatusTypeDef     HAL_DCMI_EnableCROP(DCMI_HandleTypeDef *hdcmi);
477 HAL_StatusTypeDef     HAL_DCMI_DisableCROP(DCMI_HandleTypeDef *hdcmi);
478
479 /* Peripheral State functions *************************************************/
480 HAL_DCMI_StateTypeDef HAL_DCMI_GetState(DCMI_HandleTypeDef *hdcmi);
481 uint32_t              HAL_DCMI_GetError(DCMI_HandleTypeDef *hdcmi);
482
483 #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
484 /**
485   * @}
486   */ 
487
488 /**
489   * @}
490   */ 
491
492 #ifdef __cplusplus
493 }
494 #endif
495
496 #endif /* __STM32F4xx_HAL_DCMI_H */
497
498 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/