The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
<>
Date:
Mon Jan 16 12:05:23 2017 +0000
Revision:
134:ad3be0349dc5
Parent:
128:9bcdf88f62b0
Child:
145:64910690c574
Release 134 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

3488: Dev stm i2c v2 unitary functions https://github.com/ARMmbed/mbed-os/pull/3488
3492: Fix #3463 CAN read() return value https://github.com/ARMmbed/mbed-os/pull/3492
3503: [LPC15xx] Ensure that PWM=1 is resolved correctly https://github.com/ARMmbed/mbed-os/pull/3503
3504: [LPC15xx] CAN implementation improvements https://github.com/ARMmbed/mbed-os/pull/3504
3539: NUCLEO_F412ZG - Add support of TRNG peripheral https://github.com/ARMmbed/mbed-os/pull/3539
3540: STM: SPI: Initialize Rx in spi_master_write https://github.com/ARMmbed/mbed-os/pull/3540
3438: K64F: Add support for SERIAL ASYNCH API https://github.com/ARMmbed/mbed-os/pull/3438
3519: MCUXpresso: Fix ENET driver to enable interrupts after interrupt handler is set https://github.com/ARMmbed/mbed-os/pull/3519
3544: STM32L4 deepsleep improvement https://github.com/ARMmbed/mbed-os/pull/3544
3546: NUCLEO-F412ZG - Add CAN peripheral https://github.com/ARMmbed/mbed-os/pull/3546
3551: Fix I2C driver for RZ/A1H https://github.com/ARMmbed/mbed-os/pull/3551
3558: K64F UART Asynch API: Fix synchronization issue https://github.com/ARMmbed/mbed-os/pull/3558
3563: LPC4088 - Fix vector checksum https://github.com/ARMmbed/mbed-os/pull/3563
3567: Dev stm32 F0 v1.7.0 https://github.com/ARMmbed/mbed-os/pull/3567
3577: Fixes linking errors when building with debug profile https://github.com/ARMmbed/mbed-os/pull/3577

Who changed what in which revision?

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