Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
mbed-os/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_dcmi.h@0:fbdae7e6d805, 2018-05-14 (annotated)
- Committer:
- borlanic
- Date:
- Mon May 14 11:29:06 2018 +0000
- Revision:
- 0:fbdae7e6d805
BBR
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| borlanic | 0:fbdae7e6d805 | 1 | /** |
| borlanic | 0:fbdae7e6d805 | 2 | ****************************************************************************** |
| borlanic | 0:fbdae7e6d805 | 3 | * @file stm32f7xx_hal_dcmi.h |
| borlanic | 0:fbdae7e6d805 | 4 | * @author MCD Application Team |
| borlanic | 0:fbdae7e6d805 | 5 | * @brief Header file of DCMI HAL module. |
| borlanic | 0:fbdae7e6d805 | 6 | ****************************************************************************** |
| borlanic | 0:fbdae7e6d805 | 7 | * @attention |
| borlanic | 0:fbdae7e6d805 | 8 | * |
| borlanic | 0:fbdae7e6d805 | 9 | * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> |
| borlanic | 0:fbdae7e6d805 | 10 | * |
| borlanic | 0:fbdae7e6d805 | 11 | * Redistribution and use in source and binary forms, with or without modification, |
| borlanic | 0:fbdae7e6d805 | 12 | * are permitted provided that the following conditions are met: |
| borlanic | 0:fbdae7e6d805 | 13 | * 1. Redistributions of source code must retain the above copyright notice, |
| borlanic | 0:fbdae7e6d805 | 14 | * this list of conditions and the following disclaimer. |
| borlanic | 0:fbdae7e6d805 | 15 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
| borlanic | 0:fbdae7e6d805 | 16 | * this list of conditions and the following disclaimer in the documentation |
| borlanic | 0:fbdae7e6d805 | 17 | * and/or other materials provided with the distribution. |
| borlanic | 0:fbdae7e6d805 | 18 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
| borlanic | 0:fbdae7e6d805 | 19 | * may be used to endorse or promote products derived from this software |
| borlanic | 0:fbdae7e6d805 | 20 | * without specific prior written permission. |
| borlanic | 0:fbdae7e6d805 | 21 | * |
| borlanic | 0:fbdae7e6d805 | 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| borlanic | 0:fbdae7e6d805 | 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| borlanic | 0:fbdae7e6d805 | 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| borlanic | 0:fbdae7e6d805 | 25 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| borlanic | 0:fbdae7e6d805 | 26 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| borlanic | 0:fbdae7e6d805 | 27 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| borlanic | 0:fbdae7e6d805 | 28 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| borlanic | 0:fbdae7e6d805 | 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| borlanic | 0:fbdae7e6d805 | 30 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| borlanic | 0:fbdae7e6d805 | 31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| borlanic | 0:fbdae7e6d805 | 32 | * |
| borlanic | 0:fbdae7e6d805 | 33 | ****************************************************************************** |
| borlanic | 0:fbdae7e6d805 | 34 | */ |
| borlanic | 0:fbdae7e6d805 | 35 | |
| borlanic | 0:fbdae7e6d805 | 36 | /* Define to prevent recursive inclusion -------------------------------------*/ |
| borlanic | 0:fbdae7e6d805 | 37 | #ifndef __STM32F7xx_HAL_DCMI_H |
| borlanic | 0:fbdae7e6d805 | 38 | #define __STM32F7xx_HAL_DCMI_H |
| borlanic | 0:fbdae7e6d805 | 39 | |
| borlanic | 0:fbdae7e6d805 | 40 | #ifdef __cplusplus |
| borlanic | 0:fbdae7e6d805 | 41 | extern "C" { |
| borlanic | 0:fbdae7e6d805 | 42 | #endif |
| borlanic | 0:fbdae7e6d805 | 43 | |
| borlanic | 0:fbdae7e6d805 | 44 | /* Includes ------------------------------------------------------------------*/ |
| borlanic | 0:fbdae7e6d805 | 45 | #include "stm32f7xx_hal_def.h" |
| borlanic | 0:fbdae7e6d805 | 46 | |
| borlanic | 0:fbdae7e6d805 | 47 | #if defined (DCMI) |
| borlanic | 0:fbdae7e6d805 | 48 | |
| borlanic | 0:fbdae7e6d805 | 49 | /** @addtogroup STM32F7xx_HAL_Driver |
| borlanic | 0:fbdae7e6d805 | 50 | * @{ |
| borlanic | 0:fbdae7e6d805 | 51 | */ |
| borlanic | 0:fbdae7e6d805 | 52 | |
| borlanic | 0:fbdae7e6d805 | 53 | /** @addtogroup DCMI DCMI |
| borlanic | 0:fbdae7e6d805 | 54 | * @brief DCMI HAL module driver |
| borlanic | 0:fbdae7e6d805 | 55 | * @{ |
| borlanic | 0:fbdae7e6d805 | 56 | */ |
| borlanic | 0:fbdae7e6d805 | 57 | |
| borlanic | 0:fbdae7e6d805 | 58 | /* Exported types ------------------------------------------------------------*/ |
| borlanic | 0:fbdae7e6d805 | 59 | /** @defgroup DCMI_Exported_Types DCMI Exported Types |
| borlanic | 0:fbdae7e6d805 | 60 | * @{ |
| borlanic | 0:fbdae7e6d805 | 61 | */ |
| borlanic | 0:fbdae7e6d805 | 62 | /** |
| borlanic | 0:fbdae7e6d805 | 63 | * @brief HAL DCMI State structures definition |
| borlanic | 0:fbdae7e6d805 | 64 | */ |
| borlanic | 0:fbdae7e6d805 | 65 | typedef enum |
| borlanic | 0:fbdae7e6d805 | 66 | { |
| borlanic | 0:fbdae7e6d805 | 67 | HAL_DCMI_STATE_RESET = 0x00U, /*!< DCMI not yet initialized or disabled */ |
| borlanic | 0:fbdae7e6d805 | 68 | HAL_DCMI_STATE_READY = 0x01U, /*!< DCMI initialized and ready for use */ |
| borlanic | 0:fbdae7e6d805 | 69 | HAL_DCMI_STATE_BUSY = 0x02U, /*!< DCMI internal processing is ongoing */ |
| borlanic | 0:fbdae7e6d805 | 70 | HAL_DCMI_STATE_TIMEOUT = 0x03U, /*!< DCMI timeout state */ |
| borlanic | 0:fbdae7e6d805 | 71 | HAL_DCMI_STATE_ERROR = 0x04U, /*!< DCMI error state */ |
| borlanic | 0:fbdae7e6d805 | 72 | HAL_DCMI_STATE_SUSPENDED = 0x05U /*!< DCMI suspend state */ |
| borlanic | 0:fbdae7e6d805 | 73 | }HAL_DCMI_StateTypeDef; |
| borlanic | 0:fbdae7e6d805 | 74 | |
| borlanic | 0:fbdae7e6d805 | 75 | /** |
| borlanic | 0:fbdae7e6d805 | 76 | * @brief DCMIEx Embedded Synchronisation CODE Init structure definition |
| borlanic | 0:fbdae7e6d805 | 77 | */ |
| borlanic | 0:fbdae7e6d805 | 78 | typedef struct |
| borlanic | 0:fbdae7e6d805 | 79 | { |
| borlanic | 0:fbdae7e6d805 | 80 | uint8_t FrameStartCode; /*!< Specifies the code of the frame start delimiter. */ |
| borlanic | 0:fbdae7e6d805 | 81 | uint8_t LineStartCode; /*!< Specifies the code of the line start delimiter. */ |
| borlanic | 0:fbdae7e6d805 | 82 | uint8_t LineEndCode; /*!< Specifies the code of the line end delimiter. */ |
| borlanic | 0:fbdae7e6d805 | 83 | uint8_t FrameEndCode; /*!< Specifies the code of the frame end delimiter. */ |
| borlanic | 0:fbdae7e6d805 | 84 | }DCMI_CodesInitTypeDef; |
| borlanic | 0:fbdae7e6d805 | 85 | |
| borlanic | 0:fbdae7e6d805 | 86 | /** |
| borlanic | 0:fbdae7e6d805 | 87 | * @brief DCMI Init structure definition |
| borlanic | 0:fbdae7e6d805 | 88 | */ |
| borlanic | 0:fbdae7e6d805 | 89 | typedef struct |
| borlanic | 0:fbdae7e6d805 | 90 | { |
| borlanic | 0:fbdae7e6d805 | 91 | uint32_t SynchroMode; /*!< Specifies the Synchronization Mode: Hardware or Embedded. |
| borlanic | 0:fbdae7e6d805 | 92 | This parameter can be a value of @ref DCMI_Synchronization_Mode */ |
| borlanic | 0:fbdae7e6d805 | 93 | |
| borlanic | 0:fbdae7e6d805 | 94 | uint32_t PCKPolarity; /*!< Specifies the Pixel clock polarity: Falling or Rising. |
| borlanic | 0:fbdae7e6d805 | 95 | This parameter can be a value of @ref DCMI_PIXCK_Polarity */ |
| borlanic | 0:fbdae7e6d805 | 96 | |
| borlanic | 0:fbdae7e6d805 | 97 | uint32_t VSPolarity; /*!< Specifies the Vertical synchronization polarity: High or Low. |
| borlanic | 0:fbdae7e6d805 | 98 | This parameter can be a value of @ref DCMI_VSYNC_Polarity */ |
| borlanic | 0:fbdae7e6d805 | 99 | |
| borlanic | 0:fbdae7e6d805 | 100 | uint32_t HSPolarity; /*!< Specifies the Horizontal synchronization polarity: High or Low. |
| borlanic | 0:fbdae7e6d805 | 101 | This parameter can be a value of @ref DCMI_HSYNC_Polarity */ |
| borlanic | 0:fbdae7e6d805 | 102 | |
| borlanic | 0:fbdae7e6d805 | 103 | uint32_t CaptureRate; /*!< Specifies the frequency of frame capture: All, 1/2 or 1/4. |
| borlanic | 0:fbdae7e6d805 | 104 | This parameter can be a value of @ref DCMI_Capture_Rate */ |
| borlanic | 0:fbdae7e6d805 | 105 | |
| borlanic | 0:fbdae7e6d805 | 106 | uint32_t ExtendedDataMode; /*!< Specifies the data width: 8-bit, 10-bit, 12-bit or 14-bit. |
| borlanic | 0:fbdae7e6d805 | 107 | This parameter can be a value of @ref DCMI_Extended_Data_Mode */ |
| borlanic | 0:fbdae7e6d805 | 108 | |
| borlanic | 0:fbdae7e6d805 | 109 | DCMI_CodesInitTypeDef SyncroCode; /*!< Specifies the code of the line/frame start delimiter and the |
| borlanic | 0:fbdae7e6d805 | 110 | line/frame end delimiter */ |
| borlanic | 0:fbdae7e6d805 | 111 | |
| borlanic | 0:fbdae7e6d805 | 112 | uint32_t JPEGMode; /*!< Enable or Disable the JPEG mode. |
| borlanic | 0:fbdae7e6d805 | 113 | This parameter can be a value of @ref DCMI_MODE_JPEG */ |
| borlanic | 0:fbdae7e6d805 | 114 | |
| borlanic | 0:fbdae7e6d805 | 115 | uint32_t ByteSelectMode; /*!< Specifies the data to be captured by the interface |
| borlanic | 0:fbdae7e6d805 | 116 | This parameter can be a value of @ref DCMI_Byte_Select_Mode */ |
| borlanic | 0:fbdae7e6d805 | 117 | |
| borlanic | 0:fbdae7e6d805 | 118 | uint32_t ByteSelectStart; /*!< Specifies if the data to be captured by the interface is even or odd |
| borlanic | 0:fbdae7e6d805 | 119 | This parameter can be a value of @ref DCMI_Byte_Select_Start */ |
| borlanic | 0:fbdae7e6d805 | 120 | |
| borlanic | 0:fbdae7e6d805 | 121 | uint32_t LineSelectMode; /*!< Specifies the line of data to be captured by the interface |
| borlanic | 0:fbdae7e6d805 | 122 | This parameter can be a value of @ref DCMI_Line_Select_Mode */ |
| borlanic | 0:fbdae7e6d805 | 123 | |
| borlanic | 0:fbdae7e6d805 | 124 | uint32_t LineSelectStart; /*!< Specifies if the line of data to be captured by the interface is even or odd |
| borlanic | 0:fbdae7e6d805 | 125 | This parameter can be a value of @ref DCMI_Line_Select_Start */ |
| borlanic | 0:fbdae7e6d805 | 126 | }DCMI_InitTypeDef; |
| borlanic | 0:fbdae7e6d805 | 127 | |
| borlanic | 0:fbdae7e6d805 | 128 | /** |
| borlanic | 0:fbdae7e6d805 | 129 | * @brief DCMI handle Structure definition |
| borlanic | 0:fbdae7e6d805 | 130 | */ |
| borlanic | 0:fbdae7e6d805 | 131 | typedef struct |
| borlanic | 0:fbdae7e6d805 | 132 | { |
| borlanic | 0:fbdae7e6d805 | 133 | DCMI_TypeDef *Instance; /*!< DCMI Register base address */ |
| borlanic | 0:fbdae7e6d805 | 134 | |
| borlanic | 0:fbdae7e6d805 | 135 | DCMI_InitTypeDef Init; /*!< DCMI parameters */ |
| borlanic | 0:fbdae7e6d805 | 136 | |
| borlanic | 0:fbdae7e6d805 | 137 | HAL_LockTypeDef Lock; /*!< DCMI locking object */ |
| borlanic | 0:fbdae7e6d805 | 138 | |
| borlanic | 0:fbdae7e6d805 | 139 | __IO HAL_DCMI_StateTypeDef State; /*!< DCMI state */ |
| borlanic | 0:fbdae7e6d805 | 140 | |
| borlanic | 0:fbdae7e6d805 | 141 | __IO uint32_t XferCount; /*!< DMA transfer counter */ |
| borlanic | 0:fbdae7e6d805 | 142 | |
| borlanic | 0:fbdae7e6d805 | 143 | __IO uint32_t XferSize; /*!< DMA transfer size */ |
| borlanic | 0:fbdae7e6d805 | 144 | |
| borlanic | 0:fbdae7e6d805 | 145 | uint32_t XferTransferNumber; /*!< DMA transfer number */ |
| borlanic | 0:fbdae7e6d805 | 146 | |
| borlanic | 0:fbdae7e6d805 | 147 | uint32_t pBuffPtr; /*!< Pointer to DMA output buffer */ |
| borlanic | 0:fbdae7e6d805 | 148 | |
| borlanic | 0:fbdae7e6d805 | 149 | DMA_HandleTypeDef *DMA_Handle; /*!< Pointer to the DMA handler */ |
| borlanic | 0:fbdae7e6d805 | 150 | |
| borlanic | 0:fbdae7e6d805 | 151 | __IO uint32_t ErrorCode; /*!< DCMI Error code */ |
| borlanic | 0:fbdae7e6d805 | 152 | |
| borlanic | 0:fbdae7e6d805 | 153 | }DCMI_HandleTypeDef; |
| borlanic | 0:fbdae7e6d805 | 154 | /** |
| borlanic | 0:fbdae7e6d805 | 155 | * @} |
| borlanic | 0:fbdae7e6d805 | 156 | */ |
| borlanic | 0:fbdae7e6d805 | 157 | /* Exported constants --------------------------------------------------------*/ |
| borlanic | 0:fbdae7e6d805 | 158 | |
| borlanic | 0:fbdae7e6d805 | 159 | /** @defgroup DCMI_Exported_Constants DCMI Exported Constants |
| borlanic | 0:fbdae7e6d805 | 160 | * @{ |
| borlanic | 0:fbdae7e6d805 | 161 | */ |
| borlanic | 0:fbdae7e6d805 | 162 | |
| borlanic | 0:fbdae7e6d805 | 163 | /** @defgroup DCMI_Error_Code DCMI Error Code |
| borlanic | 0:fbdae7e6d805 | 164 | * @{ |
| borlanic | 0:fbdae7e6d805 | 165 | */ |
| borlanic | 0:fbdae7e6d805 | 166 | #define HAL_DCMI_ERROR_NONE ((uint32_t)0x00000000U) /*!< No error */ |
| borlanic | 0:fbdae7e6d805 | 167 | #define HAL_DCMI_ERROR_OVR ((uint32_t)0x00000001U) /*!< Overrun error */ |
| borlanic | 0:fbdae7e6d805 | 168 | #define HAL_DCMI_ERROR_SYNC ((uint32_t)0x00000002U) /*!< Synchronization error */ |
| borlanic | 0:fbdae7e6d805 | 169 | #define HAL_DCMI_ERROR_TIMEOUT ((uint32_t)0x00000020U) /*!< Timeout error */ |
| borlanic | 0:fbdae7e6d805 | 170 | #define HAL_DCMI_ERROR_DMA ((uint32_t)0x00000040U) /*!< DMA error */ |
| borlanic | 0:fbdae7e6d805 | 171 | /** |
| borlanic | 0:fbdae7e6d805 | 172 | * @} |
| borlanic | 0:fbdae7e6d805 | 173 | */ |
| borlanic | 0:fbdae7e6d805 | 174 | |
| borlanic | 0:fbdae7e6d805 | 175 | /** @defgroup DCMI_Capture_Mode DCMI Capture Mode |
| borlanic | 0:fbdae7e6d805 | 176 | * @{ |
| borlanic | 0:fbdae7e6d805 | 177 | */ |
| borlanic | 0:fbdae7e6d805 | 178 | #define DCMI_MODE_CONTINUOUS ((uint32_t)0x00000000U) /*!< The received data are transferred continuously |
| borlanic | 0:fbdae7e6d805 | 179 | into the destination memory through the DMA */ |
| borlanic | 0:fbdae7e6d805 | 180 | #define DCMI_MODE_SNAPSHOT ((uint32_t)DCMI_CR_CM) /*!< Once activated, the interface waits for the start of |
| borlanic | 0:fbdae7e6d805 | 181 | frame and then transfers a single frame through the DMA */ |
| borlanic | 0:fbdae7e6d805 | 182 | /** |
| borlanic | 0:fbdae7e6d805 | 183 | * @} |
| borlanic | 0:fbdae7e6d805 | 184 | */ |
| borlanic | 0:fbdae7e6d805 | 185 | |
| borlanic | 0:fbdae7e6d805 | 186 | /** @defgroup DCMI_Synchronization_Mode DCMI Synchronization Mode |
| borlanic | 0:fbdae7e6d805 | 187 | * @{ |
| borlanic | 0:fbdae7e6d805 | 188 | */ |
| borlanic | 0:fbdae7e6d805 | 189 | #define DCMI_SYNCHRO_HARDWARE ((uint32_t)0x00000000U) /*!< Hardware synchronization data capture (frame/line start/stop) |
| borlanic | 0:fbdae7e6d805 | 190 | is synchronized with the HSYNC/VSYNC signals */ |
| borlanic | 0:fbdae7e6d805 | 191 | #define DCMI_SYNCHRO_EMBEDDED ((uint32_t)DCMI_CR_ESS) /*!< Embedded synchronization data capture is synchronized with |
| borlanic | 0:fbdae7e6d805 | 192 | synchronization codes embedded in the data flow */ |
| borlanic | 0:fbdae7e6d805 | 193 | |
| borlanic | 0:fbdae7e6d805 | 194 | /** |
| borlanic | 0:fbdae7e6d805 | 195 | * @} |
| borlanic | 0:fbdae7e6d805 | 196 | */ |
| borlanic | 0:fbdae7e6d805 | 197 | |
| borlanic | 0:fbdae7e6d805 | 198 | /** @defgroup DCMI_PIXCK_Polarity DCMI PIXCK Polarity |
| borlanic | 0:fbdae7e6d805 | 199 | * @{ |
| borlanic | 0:fbdae7e6d805 | 200 | */ |
| borlanic | 0:fbdae7e6d805 | 201 | #define DCMI_PCKPOLARITY_FALLING ((uint32_t)0x00000000U) /*!< Pixel clock active on Falling edge */ |
| borlanic | 0:fbdae7e6d805 | 202 | #define DCMI_PCKPOLARITY_RISING ((uint32_t)DCMI_CR_PCKPOL) /*!< Pixel clock active on Rising edge */ |
| borlanic | 0:fbdae7e6d805 | 203 | |
| borlanic | 0:fbdae7e6d805 | 204 | /** |
| borlanic | 0:fbdae7e6d805 | 205 | * @} |
| borlanic | 0:fbdae7e6d805 | 206 | */ |
| borlanic | 0:fbdae7e6d805 | 207 | |
| borlanic | 0:fbdae7e6d805 | 208 | /** @defgroup DCMI_VSYNC_Polarity DCMI VSYNC Polarity |
| borlanic | 0:fbdae7e6d805 | 209 | * @{ |
| borlanic | 0:fbdae7e6d805 | 210 | */ |
| borlanic | 0:fbdae7e6d805 | 211 | #define DCMI_VSPOLARITY_LOW ((uint32_t)0x00000000U) /*!< Vertical synchronization active Low */ |
| borlanic | 0:fbdae7e6d805 | 212 | #define DCMI_VSPOLARITY_HIGH ((uint32_t)DCMI_CR_VSPOL) /*!< Vertical synchronization active High */ |
| borlanic | 0:fbdae7e6d805 | 213 | |
| borlanic | 0:fbdae7e6d805 | 214 | /** |
| borlanic | 0:fbdae7e6d805 | 215 | * @} |
| borlanic | 0:fbdae7e6d805 | 216 | */ |
| borlanic | 0:fbdae7e6d805 | 217 | |
| borlanic | 0:fbdae7e6d805 | 218 | /** @defgroup DCMI_HSYNC_Polarity DCMI HSYNC Polarity |
| borlanic | 0:fbdae7e6d805 | 219 | * @{ |
| borlanic | 0:fbdae7e6d805 | 220 | */ |
| borlanic | 0:fbdae7e6d805 | 221 | #define DCMI_HSPOLARITY_LOW ((uint32_t)0x00000000U) /*!< Horizontal synchronization active Low */ |
| borlanic | 0:fbdae7e6d805 | 222 | #define DCMI_HSPOLARITY_HIGH ((uint32_t)DCMI_CR_HSPOL) /*!< Horizontal synchronization active High */ |
| borlanic | 0:fbdae7e6d805 | 223 | |
| borlanic | 0:fbdae7e6d805 | 224 | /** |
| borlanic | 0:fbdae7e6d805 | 225 | * @} |
| borlanic | 0:fbdae7e6d805 | 226 | */ |
| borlanic | 0:fbdae7e6d805 | 227 | |
| borlanic | 0:fbdae7e6d805 | 228 | /** @defgroup DCMI_MODE_JPEG DCMI MODE JPEG |
| borlanic | 0:fbdae7e6d805 | 229 | * @{ |
| borlanic | 0:fbdae7e6d805 | 230 | */ |
| borlanic | 0:fbdae7e6d805 | 231 | #define DCMI_JPEG_DISABLE ((uint32_t)0x00000000U) /*!< Mode JPEG Disabled */ |
| borlanic | 0:fbdae7e6d805 | 232 | #define DCMI_JPEG_ENABLE ((uint32_t)DCMI_CR_JPEG) /*!< Mode JPEG Enabled */ |
| borlanic | 0:fbdae7e6d805 | 233 | |
| borlanic | 0:fbdae7e6d805 | 234 | /** |
| borlanic | 0:fbdae7e6d805 | 235 | * @} |
| borlanic | 0:fbdae7e6d805 | 236 | */ |
| borlanic | 0:fbdae7e6d805 | 237 | |
| borlanic | 0:fbdae7e6d805 | 238 | /** @defgroup DCMI_Capture_Rate DCMI Capture Rate |
| borlanic | 0:fbdae7e6d805 | 239 | * @{ |
| borlanic | 0:fbdae7e6d805 | 240 | */ |
| borlanic | 0:fbdae7e6d805 | 241 | #define DCMI_CR_ALL_FRAME ((uint32_t)0x00000000U) /*!< All frames are captured */ |
| borlanic | 0:fbdae7e6d805 | 242 | #define DCMI_CR_ALTERNATE_2_FRAME ((uint32_t)DCMI_CR_FCRC_0) /*!< Every alternate frame captured */ |
| borlanic | 0:fbdae7e6d805 | 243 | #define DCMI_CR_ALTERNATE_4_FRAME ((uint32_t)DCMI_CR_FCRC_1) /*!< One frame in 4 frames captured */ |
| borlanic | 0:fbdae7e6d805 | 244 | |
| borlanic | 0:fbdae7e6d805 | 245 | /** |
| borlanic | 0:fbdae7e6d805 | 246 | * @} |
| borlanic | 0:fbdae7e6d805 | 247 | */ |
| borlanic | 0:fbdae7e6d805 | 248 | |
| borlanic | 0:fbdae7e6d805 | 249 | /** @defgroup DCMI_Extended_Data_Mode DCMI Extended Data Mode |
| borlanic | 0:fbdae7e6d805 | 250 | * @{ |
| borlanic | 0:fbdae7e6d805 | 251 | */ |
| borlanic | 0:fbdae7e6d805 | 252 | #define DCMI_EXTEND_DATA_8B ((uint32_t)0x00000000U) /*!< Interface captures 8-bit data on every pixel clock */ |
| borlanic | 0:fbdae7e6d805 | 253 | #define DCMI_EXTEND_DATA_10B ((uint32_t)DCMI_CR_EDM_0) /*!< Interface captures 10-bit data on every pixel clock */ |
| borlanic | 0:fbdae7e6d805 | 254 | #define DCMI_EXTEND_DATA_12B ((uint32_t)DCMI_CR_EDM_1) /*!< Interface captures 12-bit data on every pixel clock */ |
| borlanic | 0:fbdae7e6d805 | 255 | #define DCMI_EXTEND_DATA_14B ((uint32_t)(DCMI_CR_EDM_0 | DCMI_CR_EDM_1)) /*!< Interface captures 14-bit data on every pixel clock */ |
| borlanic | 0:fbdae7e6d805 | 256 | |
| borlanic | 0:fbdae7e6d805 | 257 | /** |
| borlanic | 0:fbdae7e6d805 | 258 | * @} |
| borlanic | 0:fbdae7e6d805 | 259 | */ |
| borlanic | 0:fbdae7e6d805 | 260 | |
| borlanic | 0:fbdae7e6d805 | 261 | /** @defgroup DCMI_Window_Coordinate DCMI Window Coordinate |
| borlanic | 0:fbdae7e6d805 | 262 | * @{ |
| borlanic | 0:fbdae7e6d805 | 263 | */ |
| borlanic | 0:fbdae7e6d805 | 264 | #define DCMI_WINDOW_COORDINATE ((uint32_t)0x3FFFU) /*!< Window coordinate */ |
| borlanic | 0:fbdae7e6d805 | 265 | |
| borlanic | 0:fbdae7e6d805 | 266 | /** |
| borlanic | 0:fbdae7e6d805 | 267 | * @} |
| borlanic | 0:fbdae7e6d805 | 268 | */ |
| borlanic | 0:fbdae7e6d805 | 269 | |
| borlanic | 0:fbdae7e6d805 | 270 | /** @defgroup DCMI_Window_Height DCMI Window Height |
| borlanic | 0:fbdae7e6d805 | 271 | * @{ |
| borlanic | 0:fbdae7e6d805 | 272 | */ |
| borlanic | 0:fbdae7e6d805 | 273 | #define DCMI_WINDOW_HEIGHT ((uint32_t)0x1FFFU) /*!< Window Height */ |
| borlanic | 0:fbdae7e6d805 | 274 | |
| borlanic | 0:fbdae7e6d805 | 275 | /** |
| borlanic | 0:fbdae7e6d805 | 276 | * @} |
| borlanic | 0:fbdae7e6d805 | 277 | */ |
| borlanic | 0:fbdae7e6d805 | 278 | |
| borlanic | 0:fbdae7e6d805 | 279 | /** @defgroup DCMI_interrupt_sources DCMI interrupt sources |
| borlanic | 0:fbdae7e6d805 | 280 | * @{ |
| borlanic | 0:fbdae7e6d805 | 281 | */ |
| borlanic | 0:fbdae7e6d805 | 282 | #define DCMI_IT_FRAME ((uint32_t)DCMI_IER_FRAME_IE) /*!< Capture complete interrupt */ |
| borlanic | 0:fbdae7e6d805 | 283 | #define DCMI_IT_OVR ((uint32_t)DCMI_IER_OVR_IE) /*!< Overrun interrupt */ |
| borlanic | 0:fbdae7e6d805 | 284 | #define DCMI_IT_ERR ((uint32_t)DCMI_IER_ERR_IE) /*!< Synchronization error interrupt */ |
| borlanic | 0:fbdae7e6d805 | 285 | #define DCMI_IT_VSYNC ((uint32_t)DCMI_IER_VSYNC_IE) /*!< VSYNC interrupt */ |
| borlanic | 0:fbdae7e6d805 | 286 | #define DCMI_IT_LINE ((uint32_t)DCMI_IER_LINE_IE) /*!< Line interrupt */ |
| borlanic | 0:fbdae7e6d805 | 287 | /** |
| borlanic | 0:fbdae7e6d805 | 288 | * @} |
| borlanic | 0:fbdae7e6d805 | 289 | */ |
| borlanic | 0:fbdae7e6d805 | 290 | |
| borlanic | 0:fbdae7e6d805 | 291 | /** @defgroup DCMI_Flags DCMI Flags |
| borlanic | 0:fbdae7e6d805 | 292 | * @{ |
| borlanic | 0:fbdae7e6d805 | 293 | */ |
| borlanic | 0:fbdae7e6d805 | 294 | |
| borlanic | 0:fbdae7e6d805 | 295 | /** |
| borlanic | 0:fbdae7e6d805 | 296 | * @brief DCMI SR register |
| borlanic | 0:fbdae7e6d805 | 297 | */ |
| borlanic | 0:fbdae7e6d805 | 298 | #define DCMI_FLAG_HSYNC ((uint32_t)DCMI_SR_INDEX|DCMI_SR_HSYNC) /*!< HSYNC pin state (active line / synchronization between lines) */ |
| borlanic | 0:fbdae7e6d805 | 299 | #define DCMI_FLAG_VSYNC ((uint32_t)DCMI_SR_INDEX|DCMI_SR_VSYNC) /*!< VSYNC pin state (active frame / synchronization between frames) */ |
| borlanic | 0:fbdae7e6d805 | 300 | #define DCMI_FLAG_FNE ((uint32_t)DCMI_SR_INDEX|DCMI_SR_FNE) /*!< FIFO not empty flag */ |
| borlanic | 0:fbdae7e6d805 | 301 | /** |
| borlanic | 0:fbdae7e6d805 | 302 | * @brief DCMI RIS register |
| borlanic | 0:fbdae7e6d805 | 303 | */ |
| borlanic | 0:fbdae7e6d805 | 304 | #define DCMI_FLAG_FRAMERI ((uint32_t)DCMI_RIS_FRAME_RIS) /*!< Frame capture complete interrupt flag */ |
| borlanic | 0:fbdae7e6d805 | 305 | #define DCMI_FLAG_OVRRI ((uint32_t)DCMI_RIS_OVR_RIS) /*!< Overrun interrupt flag */ |
| borlanic | 0:fbdae7e6d805 | 306 | #define DCMI_FLAG_ERRRI ((uint32_t)DCMI_RIS_ERR_RIS) /*!< Synchronization error interrupt flag */ |
| borlanic | 0:fbdae7e6d805 | 307 | #define DCMI_FLAG_VSYNCRI ((uint32_t)DCMI_RIS_VSYNC_RIS) /*!< VSYNC interrupt flag */ |
| borlanic | 0:fbdae7e6d805 | 308 | #define DCMI_FLAG_LINERI ((uint32_t)DCMI_RIS_LINE_RIS) /*!< Line interrupt flag */ |
| borlanic | 0:fbdae7e6d805 | 309 | /** |
| borlanic | 0:fbdae7e6d805 | 310 | * @brief DCMI MIS register |
| borlanic | 0:fbdae7e6d805 | 311 | */ |
| borlanic | 0:fbdae7e6d805 | 312 | #define DCMI_FLAG_FRAMEMI ((uint32_t)DCMI_MIS_INDEX|DCMI_MIS_FRAME_MIS) /*!< DCMI Frame capture complete masked interrupt status */ |
| borlanic | 0:fbdae7e6d805 | 313 | #define DCMI_FLAG_OVRMI ((uint32_t)DCMI_MIS_INDEX|DCMI_MIS_OVR_MIS ) /*!< DCMI Overrun masked interrupt status */ |
| borlanic | 0:fbdae7e6d805 | 314 | #define DCMI_FLAG_ERRMI ((uint32_t)DCMI_MIS_INDEX|DCMI_MIS_ERR_MIS ) /*!< DCMI Synchronization error masked interrupt status */ |
| borlanic | 0:fbdae7e6d805 | 315 | #define DCMI_FLAG_VSYNCMI ((uint32_t)DCMI_MIS_INDEX|DCMI_MIS_VSYNC_MIS) /*!< DCMI VSYNC masked interrupt status */ |
| borlanic | 0:fbdae7e6d805 | 316 | #define DCMI_FLAG_LINEMI ((uint32_t)DCMI_MIS_INDEX|DCMI_MIS_LINE_MIS ) /*!< DCMI Line masked interrupt status */ |
| borlanic | 0:fbdae7e6d805 | 317 | /** |
| borlanic | 0:fbdae7e6d805 | 318 | * @} |
| borlanic | 0:fbdae7e6d805 | 319 | */ |
| borlanic | 0:fbdae7e6d805 | 320 | |
| borlanic | 0:fbdae7e6d805 | 321 | /** @defgroup DCMI_Byte_Select_Mode DCMI Byte Select Mode |
| borlanic | 0:fbdae7e6d805 | 322 | * @{ |
| borlanic | 0:fbdae7e6d805 | 323 | */ |
| borlanic | 0:fbdae7e6d805 | 324 | #define DCMI_BSM_ALL ((uint32_t)0x00000000U) /*!< Interface captures all received data */ |
| borlanic | 0:fbdae7e6d805 | 325 | #define DCMI_BSM_OTHER ((uint32_t)DCMI_CR_BSM_0) /*!< Interface captures every other byte from the received data */ |
| borlanic | 0:fbdae7e6d805 | 326 | #define DCMI_BSM_ALTERNATE_4 ((uint32_t)DCMI_CR_BSM_1) /*!< Interface captures one byte out of four */ |
| borlanic | 0:fbdae7e6d805 | 327 | #define DCMI_BSM_ALTERNATE_2 ((uint32_t)(DCMI_CR_BSM_0 | DCMI_CR_BSM_1)) /*!< Interface captures two bytes out of four */ |
| borlanic | 0:fbdae7e6d805 | 328 | |
| borlanic | 0:fbdae7e6d805 | 329 | /** |
| borlanic | 0:fbdae7e6d805 | 330 | * @} |
| borlanic | 0:fbdae7e6d805 | 331 | */ |
| borlanic | 0:fbdae7e6d805 | 332 | |
| borlanic | 0:fbdae7e6d805 | 333 | /** @defgroup DCMI_Byte_Select_Start DCMI Byte Select Start |
| borlanic | 0:fbdae7e6d805 | 334 | * @{ |
| borlanic | 0:fbdae7e6d805 | 335 | */ |
| borlanic | 0:fbdae7e6d805 | 336 | #define DCMI_OEBS_ODD ((uint32_t)0x00000000U) /*!< Interface captures first data from the frame/line start, second one being dropped */ |
| borlanic | 0:fbdae7e6d805 | 337 | #define DCMI_OEBS_EVEN ((uint32_t)DCMI_CR_OEBS) /*!< Interface captures second data from the frame/line start, first one being dropped */ |
| borlanic | 0:fbdae7e6d805 | 338 | |
| borlanic | 0:fbdae7e6d805 | 339 | /** |
| borlanic | 0:fbdae7e6d805 | 340 | * @} |
| borlanic | 0:fbdae7e6d805 | 341 | */ |
| borlanic | 0:fbdae7e6d805 | 342 | |
| borlanic | 0:fbdae7e6d805 | 343 | /** @defgroup DCMI_Line_Select_Mode DCMI Line Select Mode |
| borlanic | 0:fbdae7e6d805 | 344 | * @{ |
| borlanic | 0:fbdae7e6d805 | 345 | */ |
| borlanic | 0:fbdae7e6d805 | 346 | #define DCMI_LSM_ALL ((uint32_t)0x00000000U) /*!< Interface captures all received lines */ |
| borlanic | 0:fbdae7e6d805 | 347 | #define DCMI_LSM_ALTERNATE_2 ((uint32_t)DCMI_CR_LSM) /*!< Interface captures one line out of two */ |
| borlanic | 0:fbdae7e6d805 | 348 | |
| borlanic | 0:fbdae7e6d805 | 349 | /** |
| borlanic | 0:fbdae7e6d805 | 350 | * @} |
| borlanic | 0:fbdae7e6d805 | 351 | */ |
| borlanic | 0:fbdae7e6d805 | 352 | |
| borlanic | 0:fbdae7e6d805 | 353 | /** @defgroup DCMI_Line_Select_Start DCMI Line Select Start |
| borlanic | 0:fbdae7e6d805 | 354 | * @{ |
| borlanic | 0:fbdae7e6d805 | 355 | */ |
| borlanic | 0:fbdae7e6d805 | 356 | #define DCMI_OELS_ODD ((uint32_t)0x00000000U) /*!< Interface captures first line from the frame start, second one being dropped */ |
| borlanic | 0:fbdae7e6d805 | 357 | #define DCMI_OELS_EVEN ((uint32_t)DCMI_CR_OELS) /*!< Interface captures second line from the frame start, first one being dropped */ |
| borlanic | 0:fbdae7e6d805 | 358 | |
| borlanic | 0:fbdae7e6d805 | 359 | /** |
| borlanic | 0:fbdae7e6d805 | 360 | * @} |
| borlanic | 0:fbdae7e6d805 | 361 | */ |
| borlanic | 0:fbdae7e6d805 | 362 | |
| borlanic | 0:fbdae7e6d805 | 363 | /** |
| borlanic | 0:fbdae7e6d805 | 364 | * @} |
| borlanic | 0:fbdae7e6d805 | 365 | */ |
| borlanic | 0:fbdae7e6d805 | 366 | |
| borlanic | 0:fbdae7e6d805 | 367 | /* Exported macro ------------------------------------------------------------*/ |
| borlanic | 0:fbdae7e6d805 | 368 | /** @defgroup DCMI_Exported_Macros DCMI Exported Macros |
| borlanic | 0:fbdae7e6d805 | 369 | * @{ |
| borlanic | 0:fbdae7e6d805 | 370 | */ |
| borlanic | 0:fbdae7e6d805 | 371 | |
| borlanic | 0:fbdae7e6d805 | 372 | /** @brief Reset DCMI handle state |
| borlanic | 0:fbdae7e6d805 | 373 | * @param __HANDLE__ specifies the DCMI handle. |
| borlanic | 0:fbdae7e6d805 | 374 | * @retval None |
| borlanic | 0:fbdae7e6d805 | 375 | */ |
| borlanic | 0:fbdae7e6d805 | 376 | #define __HAL_DCMI_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DCMI_STATE_RESET) |
| borlanic | 0:fbdae7e6d805 | 377 | |
| borlanic | 0:fbdae7e6d805 | 378 | /** |
| borlanic | 0:fbdae7e6d805 | 379 | * @brief Enable the DCMI. |
| borlanic | 0:fbdae7e6d805 | 380 | * @param __HANDLE__ DCMI handle |
| borlanic | 0:fbdae7e6d805 | 381 | * @retval None |
| borlanic | 0:fbdae7e6d805 | 382 | */ |
| borlanic | 0:fbdae7e6d805 | 383 | #define __HAL_DCMI_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR |= DCMI_CR_ENABLE) |
| borlanic | 0:fbdae7e6d805 | 384 | |
| borlanic | 0:fbdae7e6d805 | 385 | /** |
| borlanic | 0:fbdae7e6d805 | 386 | * @brief Disable the DCMI. |
| borlanic | 0:fbdae7e6d805 | 387 | * @param __HANDLE__ DCMI handle |
| borlanic | 0:fbdae7e6d805 | 388 | * @retval None |
| borlanic | 0:fbdae7e6d805 | 389 | */ |
| borlanic | 0:fbdae7e6d805 | 390 | #define __HAL_DCMI_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR &= ~(DCMI_CR_ENABLE)) |
| borlanic | 0:fbdae7e6d805 | 391 | |
| borlanic | 0:fbdae7e6d805 | 392 | /* Interrupt & Flag management */ |
| borlanic | 0:fbdae7e6d805 | 393 | /** |
| borlanic | 0:fbdae7e6d805 | 394 | * @brief Get the DCMI pending flag. |
| borlanic | 0:fbdae7e6d805 | 395 | * @param __HANDLE__ DCMI handle |
| borlanic | 0:fbdae7e6d805 | 396 | * @param __FLAG__ Get the specified flag. |
| borlanic | 0:fbdae7e6d805 | 397 | * This parameter can be one of the following values (no combination allowed) |
| borlanic | 0:fbdae7e6d805 | 398 | * @arg DCMI_FLAG_HSYNC: HSYNC pin state (active line / synchronization between lines) |
| borlanic | 0:fbdae7e6d805 | 399 | * @arg DCMI_FLAG_VSYNC: VSYNC pin state (active frame / synchronization between frames) |
| borlanic | 0:fbdae7e6d805 | 400 | * @arg DCMI_FLAG_FNE: FIFO empty flag |
| borlanic | 0:fbdae7e6d805 | 401 | * @arg DCMI_FLAG_FRAMERI: Frame capture complete flag mask |
| borlanic | 0:fbdae7e6d805 | 402 | * @arg DCMI_FLAG_OVRRI: Overrun flag mask |
| borlanic | 0:fbdae7e6d805 | 403 | * @arg DCMI_FLAG_ERRRI: Synchronization error flag mask |
| borlanic | 0:fbdae7e6d805 | 404 | * @arg DCMI_FLAG_VSYNCRI: VSYNC flag mask |
| borlanic | 0:fbdae7e6d805 | 405 | * @arg DCMI_FLAG_LINERI: Line flag mask |
| borlanic | 0:fbdae7e6d805 | 406 | * @arg DCMI_FLAG_FRAMEMI: DCMI Capture complete masked interrupt status |
| borlanic | 0:fbdae7e6d805 | 407 | * @arg DCMI_FLAG_OVRMI: DCMI Overrun masked interrupt status |
| borlanic | 0:fbdae7e6d805 | 408 | * @arg DCMI_FLAG_ERRMI: DCMI Synchronization error masked interrupt status |
| borlanic | 0:fbdae7e6d805 | 409 | * @arg DCMI_FLAG_VSYNCMI: DCMI VSYNC masked interrupt status |
| borlanic | 0:fbdae7e6d805 | 410 | * @arg DCMI_FLAG_LINEMI: DCMI Line masked interrupt status |
| borlanic | 0:fbdae7e6d805 | 411 | * @retval The state of FLAG. |
| borlanic | 0:fbdae7e6d805 | 412 | */ |
| borlanic | 0:fbdae7e6d805 | 413 | #define __HAL_DCMI_GET_FLAG(__HANDLE__, __FLAG__)\ |
| borlanic | 0:fbdae7e6d805 | 414 | ((((__FLAG__) & (DCMI_SR_INDEX|DCMI_MIS_INDEX)) == 0x0)? ((__HANDLE__)->Instance->RIS & (__FLAG__)) :\ |
| borlanic | 0:fbdae7e6d805 | 415 | (((__FLAG__) & DCMI_SR_INDEX) == 0x0)? ((__HANDLE__)->Instance->MIS & (__FLAG__)) : ((__HANDLE__)->Instance->SR & (__FLAG__))) |
| borlanic | 0:fbdae7e6d805 | 416 | |
| borlanic | 0:fbdae7e6d805 | 417 | /** |
| borlanic | 0:fbdae7e6d805 | 418 | * @brief Clear the DCMI pending flags. |
| borlanic | 0:fbdae7e6d805 | 419 | * @param __HANDLE__ DCMI handle |
| borlanic | 0:fbdae7e6d805 | 420 | * @param __FLAG__ specifies the flag to clear. |
| borlanic | 0:fbdae7e6d805 | 421 | * This parameter can be any combination of the following values: |
| borlanic | 0:fbdae7e6d805 | 422 | * @arg DCMI_FLAG_FRAMERI: Frame capture complete flag mask |
| borlanic | 0:fbdae7e6d805 | 423 | * @arg DCMI_FLAG_OVFRI: Overflow flag mask |
| borlanic | 0:fbdae7e6d805 | 424 | * @arg DCMI_FLAG_ERRRI: Synchronization error flag mask |
| borlanic | 0:fbdae7e6d805 | 425 | * @arg DCMI_FLAG_VSYNCRI: VSYNC flag mask |
| borlanic | 0:fbdae7e6d805 | 426 | * @arg DCMI_FLAG_LINERI: Line flag mask |
| borlanic | 0:fbdae7e6d805 | 427 | * @retval None |
| borlanic | 0:fbdae7e6d805 | 428 | */ |
| borlanic | 0:fbdae7e6d805 | 429 | #define __HAL_DCMI_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__)) |
| borlanic | 0:fbdae7e6d805 | 430 | |
| borlanic | 0:fbdae7e6d805 | 431 | /** |
| borlanic | 0:fbdae7e6d805 | 432 | * @brief Enable the specified DCMI interrupts. |
| borlanic | 0:fbdae7e6d805 | 433 | * @param __HANDLE__ DCMI handle |
| borlanic | 0:fbdae7e6d805 | 434 | * @param __INTERRUPT__ specifies the DCMI interrupt sources to be enabled. |
| borlanic | 0:fbdae7e6d805 | 435 | * This parameter can be any combination of the following values: |
| borlanic | 0:fbdae7e6d805 | 436 | * @arg DCMI_IT_FRAME: Frame capture complete interrupt mask |
| borlanic | 0:fbdae7e6d805 | 437 | * @arg DCMI_IT_OVF: Overflow interrupt mask |
| borlanic | 0:fbdae7e6d805 | 438 | * @arg DCMI_IT_ERR: Synchronization error interrupt mask |
| borlanic | 0:fbdae7e6d805 | 439 | * @arg DCMI_IT_VSYNC: VSYNC interrupt mask |
| borlanic | 0:fbdae7e6d805 | 440 | * @arg DCMI_IT_LINE: Line interrupt mask |
| borlanic | 0:fbdae7e6d805 | 441 | * @retval None |
| borlanic | 0:fbdae7e6d805 | 442 | */ |
| borlanic | 0:fbdae7e6d805 | 443 | #define __HAL_DCMI_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER |= (__INTERRUPT__)) |
| borlanic | 0:fbdae7e6d805 | 444 | |
| borlanic | 0:fbdae7e6d805 | 445 | /** |
| borlanic | 0:fbdae7e6d805 | 446 | * @brief Disable the specified DCMI interrupts. |
| borlanic | 0:fbdae7e6d805 | 447 | * @param __HANDLE__ DCMI handle |
| borlanic | 0:fbdae7e6d805 | 448 | * @param __INTERRUPT__ specifies the DCMI interrupt sources to be enabled. |
| borlanic | 0:fbdae7e6d805 | 449 | * This parameter can be any combination of the following values: |
| borlanic | 0:fbdae7e6d805 | 450 | * @arg DCMI_IT_FRAME: Frame capture complete interrupt mask |
| borlanic | 0:fbdae7e6d805 | 451 | * @arg DCMI_IT_OVF: Overflow interrupt mask |
| borlanic | 0:fbdae7e6d805 | 452 | * @arg DCMI_IT_ERR: Synchronization error interrupt mask |
| borlanic | 0:fbdae7e6d805 | 453 | * @arg DCMI_IT_VSYNC: VSYNC interrupt mask |
| borlanic | 0:fbdae7e6d805 | 454 | * @arg DCMI_IT_LINE: Line interrupt mask |
| borlanic | 0:fbdae7e6d805 | 455 | * @retval None |
| borlanic | 0:fbdae7e6d805 | 456 | */ |
| borlanic | 0:fbdae7e6d805 | 457 | #define __HAL_DCMI_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->IER &= ~(__INTERRUPT__)) |
| borlanic | 0:fbdae7e6d805 | 458 | |
| borlanic | 0:fbdae7e6d805 | 459 | /** |
| borlanic | 0:fbdae7e6d805 | 460 | * @brief Check whether the specified DCMI interrupt has occurred or not. |
| borlanic | 0:fbdae7e6d805 | 461 | * @param __HANDLE__ DCMI handle |
| borlanic | 0:fbdae7e6d805 | 462 | * @param __INTERRUPT__ specifies the DCMI interrupt source to check. |
| borlanic | 0:fbdae7e6d805 | 463 | * This parameter can be one of the following values: |
| borlanic | 0:fbdae7e6d805 | 464 | * @arg DCMI_IT_FRAME: Frame capture complete interrupt mask |
| borlanic | 0:fbdae7e6d805 | 465 | * @arg DCMI_IT_OVF: Overflow interrupt mask |
| borlanic | 0:fbdae7e6d805 | 466 | * @arg DCMI_IT_ERR: Synchronization error interrupt mask |
| borlanic | 0:fbdae7e6d805 | 467 | * @arg DCMI_IT_VSYNC: VSYNC interrupt mask |
| borlanic | 0:fbdae7e6d805 | 468 | * @arg DCMI_IT_LINE: Line interrupt mask |
| borlanic | 0:fbdae7e6d805 | 469 | * @retval The state of INTERRUPT. |
| borlanic | 0:fbdae7e6d805 | 470 | */ |
| borlanic | 0:fbdae7e6d805 | 471 | #define __HAL_DCMI_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->MISR & (__INTERRUPT__)) |
| borlanic | 0:fbdae7e6d805 | 472 | |
| borlanic | 0:fbdae7e6d805 | 473 | /** |
| borlanic | 0:fbdae7e6d805 | 474 | * @} |
| borlanic | 0:fbdae7e6d805 | 475 | */ |
| borlanic | 0:fbdae7e6d805 | 476 | |
| borlanic | 0:fbdae7e6d805 | 477 | /* Exported functions --------------------------------------------------------*/ |
| borlanic | 0:fbdae7e6d805 | 478 | /** @addtogroup DCMI_Exported_Functions DCMI Exported Functions |
| borlanic | 0:fbdae7e6d805 | 479 | * @{ |
| borlanic | 0:fbdae7e6d805 | 480 | */ |
| borlanic | 0:fbdae7e6d805 | 481 | |
| borlanic | 0:fbdae7e6d805 | 482 | /** @addtogroup DCMI_Exported_Functions_Group1 Initialization and Configuration functions |
| borlanic | 0:fbdae7e6d805 | 483 | * @{ |
| borlanic | 0:fbdae7e6d805 | 484 | */ |
| borlanic | 0:fbdae7e6d805 | 485 | /* Initialization and de-initialization functions *****************************/ |
| borlanic | 0:fbdae7e6d805 | 486 | HAL_StatusTypeDef HAL_DCMI_Init(DCMI_HandleTypeDef *hdcmi); |
| borlanic | 0:fbdae7e6d805 | 487 | HAL_StatusTypeDef HAL_DCMI_DeInit(DCMI_HandleTypeDef *hdcmi); |
| borlanic | 0:fbdae7e6d805 | 488 | void HAL_DCMI_MspInit(DCMI_HandleTypeDef* hdcmi); |
| borlanic | 0:fbdae7e6d805 | 489 | void HAL_DCMI_MspDeInit(DCMI_HandleTypeDef* hdcmi); |
| borlanic | 0:fbdae7e6d805 | 490 | /** |
| borlanic | 0:fbdae7e6d805 | 491 | * @} |
| borlanic | 0:fbdae7e6d805 | 492 | */ |
| borlanic | 0:fbdae7e6d805 | 493 | |
| borlanic | 0:fbdae7e6d805 | 494 | /** @addtogroup DCMI_Exported_Functions_Group2 IO operation functions |
| borlanic | 0:fbdae7e6d805 | 495 | * @{ |
| borlanic | 0:fbdae7e6d805 | 496 | */ |
| borlanic | 0:fbdae7e6d805 | 497 | /* IO operation functions *****************************************************/ |
| borlanic | 0:fbdae7e6d805 | 498 | HAL_StatusTypeDef HAL_DCMI_Start_DMA(DCMI_HandleTypeDef* hdcmi, uint32_t DCMI_Mode, uint32_t pData, uint32_t Length); |
| borlanic | 0:fbdae7e6d805 | 499 | HAL_StatusTypeDef HAL_DCMI_Stop(DCMI_HandleTypeDef* hdcmi); |
| borlanic | 0:fbdae7e6d805 | 500 | HAL_StatusTypeDef HAL_DCMI_Suspend(DCMI_HandleTypeDef* hdcmi); |
| borlanic | 0:fbdae7e6d805 | 501 | HAL_StatusTypeDef HAL_DCMI_Resume(DCMI_HandleTypeDef* hdcmi); |
| borlanic | 0:fbdae7e6d805 | 502 | void HAL_DCMI_ErrorCallback(DCMI_HandleTypeDef *hdcmi); |
| borlanic | 0:fbdae7e6d805 | 503 | void HAL_DCMI_LineEventCallback(DCMI_HandleTypeDef *hdcmi); |
| borlanic | 0:fbdae7e6d805 | 504 | void HAL_DCMI_FrameEventCallback(DCMI_HandleTypeDef *hdcmi); |
| borlanic | 0:fbdae7e6d805 | 505 | void HAL_DCMI_VsyncEventCallback(DCMI_HandleTypeDef *hdcmi); |
| borlanic | 0:fbdae7e6d805 | 506 | void HAL_DCMI_IRQHandler(DCMI_HandleTypeDef *hdcmi); |
| borlanic | 0:fbdae7e6d805 | 507 | /** |
| borlanic | 0:fbdae7e6d805 | 508 | * @} |
| borlanic | 0:fbdae7e6d805 | 509 | */ |
| borlanic | 0:fbdae7e6d805 | 510 | |
| borlanic | 0:fbdae7e6d805 | 511 | /** @addtogroup DCMI_Exported_Functions_Group3 Peripheral Control functions |
| borlanic | 0:fbdae7e6d805 | 512 | * @{ |
| borlanic | 0:fbdae7e6d805 | 513 | */ |
| borlanic | 0:fbdae7e6d805 | 514 | /* Peripheral Control functions ***********************************************/ |
| borlanic | 0:fbdae7e6d805 | 515 | HAL_StatusTypeDef HAL_DCMI_ConfigCrop(DCMI_HandleTypeDef *hdcmi, uint32_t X0, uint32_t Y0, uint32_t XSize, uint32_t YSize); |
| borlanic | 0:fbdae7e6d805 | 516 | HAL_StatusTypeDef HAL_DCMI_EnableCrop(DCMI_HandleTypeDef *hdcmi); |
| borlanic | 0:fbdae7e6d805 | 517 | HAL_StatusTypeDef HAL_DCMI_DisableCrop(DCMI_HandleTypeDef *hdcmi); |
| borlanic | 0:fbdae7e6d805 | 518 | |
| borlanic | 0:fbdae7e6d805 | 519 | /** |
| borlanic | 0:fbdae7e6d805 | 520 | * @} |
| borlanic | 0:fbdae7e6d805 | 521 | */ |
| borlanic | 0:fbdae7e6d805 | 522 | |
| borlanic | 0:fbdae7e6d805 | 523 | /** @addtogroup DCMI_Exported_Functions_Group4 Peripheral State functions |
| borlanic | 0:fbdae7e6d805 | 524 | * @{ |
| borlanic | 0:fbdae7e6d805 | 525 | */ |
| borlanic | 0:fbdae7e6d805 | 526 | /* Peripheral State functions *************************************************/ |
| borlanic | 0:fbdae7e6d805 | 527 | HAL_DCMI_StateTypeDef HAL_DCMI_GetState(DCMI_HandleTypeDef *hdcmi); |
| borlanic | 0:fbdae7e6d805 | 528 | uint32_t HAL_DCMI_GetError(DCMI_HandleTypeDef *hdcmi); |
| borlanic | 0:fbdae7e6d805 | 529 | /** |
| borlanic | 0:fbdae7e6d805 | 530 | * @} |
| borlanic | 0:fbdae7e6d805 | 531 | */ |
| borlanic | 0:fbdae7e6d805 | 532 | |
| borlanic | 0:fbdae7e6d805 | 533 | /** |
| borlanic | 0:fbdae7e6d805 | 534 | * @} |
| borlanic | 0:fbdae7e6d805 | 535 | */ |
| borlanic | 0:fbdae7e6d805 | 536 | |
| borlanic | 0:fbdae7e6d805 | 537 | /* Private types -------------------------------------------------------------*/ |
| borlanic | 0:fbdae7e6d805 | 538 | /* Private variables ---------------------------------------------------------*/ |
| borlanic | 0:fbdae7e6d805 | 539 | /* Private constants ---------------------------------------------------------*/ |
| borlanic | 0:fbdae7e6d805 | 540 | /** @defgroup DCMI_Private_Constants DCMI Private Constants |
| borlanic | 0:fbdae7e6d805 | 541 | * @{ |
| borlanic | 0:fbdae7e6d805 | 542 | */ |
| borlanic | 0:fbdae7e6d805 | 543 | #define DCMI_MIS_INDEX ((uint32_t)0x1000) /*!< DCMI MIS register index */ |
| borlanic | 0:fbdae7e6d805 | 544 | #define DCMI_SR_INDEX ((uint32_t)0x2000) /*!< DCMI SR register index */ |
| borlanic | 0:fbdae7e6d805 | 545 | /** |
| borlanic | 0:fbdae7e6d805 | 546 | * @} |
| borlanic | 0:fbdae7e6d805 | 547 | */ |
| borlanic | 0:fbdae7e6d805 | 548 | /* Private macro -------------------------------------------------------------*/ |
| borlanic | 0:fbdae7e6d805 | 549 | /** @defgroup DCMI_Private_Macros DCMI Private Macros |
| borlanic | 0:fbdae7e6d805 | 550 | * @{ |
| borlanic | 0:fbdae7e6d805 | 551 | */ |
| borlanic | 0:fbdae7e6d805 | 552 | #define IS_DCMI_CAPTURE_MODE(MODE)(((MODE) == DCMI_MODE_CONTINUOUS) || \ |
| borlanic | 0:fbdae7e6d805 | 553 | ((MODE) == DCMI_MODE_SNAPSHOT)) |
| borlanic | 0:fbdae7e6d805 | 554 | |
| borlanic | 0:fbdae7e6d805 | 555 | #define IS_DCMI_SYNCHRO(MODE)(((MODE) == DCMI_SYNCHRO_HARDWARE) || \ |
| borlanic | 0:fbdae7e6d805 | 556 | ((MODE) == DCMI_SYNCHRO_EMBEDDED)) |
| borlanic | 0:fbdae7e6d805 | 557 | |
| borlanic | 0:fbdae7e6d805 | 558 | #define IS_DCMI_PCKPOLARITY(POLARITY)(((POLARITY) == DCMI_PCKPOLARITY_FALLING) || \ |
| borlanic | 0:fbdae7e6d805 | 559 | ((POLARITY) == DCMI_PCKPOLARITY_RISING)) |
| borlanic | 0:fbdae7e6d805 | 560 | |
| borlanic | 0:fbdae7e6d805 | 561 | #define IS_DCMI_VSPOLARITY(POLARITY)(((POLARITY) == DCMI_VSPOLARITY_LOW) || \ |
| borlanic | 0:fbdae7e6d805 | 562 | ((POLARITY) == DCMI_VSPOLARITY_HIGH)) |
| borlanic | 0:fbdae7e6d805 | 563 | |
| borlanic | 0:fbdae7e6d805 | 564 | #define IS_DCMI_HSPOLARITY(POLARITY)(((POLARITY) == DCMI_HSPOLARITY_LOW) || \ |
| borlanic | 0:fbdae7e6d805 | 565 | ((POLARITY) == DCMI_HSPOLARITY_HIGH)) |
| borlanic | 0:fbdae7e6d805 | 566 | |
| borlanic | 0:fbdae7e6d805 | 567 | #define IS_DCMI_MODE_JPEG(JPEG_MODE)(((JPEG_MODE) == DCMI_JPEG_DISABLE) || \ |
| borlanic | 0:fbdae7e6d805 | 568 | ((JPEG_MODE) == DCMI_JPEG_ENABLE)) |
| borlanic | 0:fbdae7e6d805 | 569 | |
| borlanic | 0:fbdae7e6d805 | 570 | #define IS_DCMI_CAPTURE_RATE(RATE) (((RATE) == DCMI_CR_ALL_FRAME) || \ |
| borlanic | 0:fbdae7e6d805 | 571 | ((RATE) == DCMI_CR_ALTERNATE_2_FRAME) || \ |
| borlanic | 0:fbdae7e6d805 | 572 | ((RATE) == DCMI_CR_ALTERNATE_4_FRAME)) |
| borlanic | 0:fbdae7e6d805 | 573 | |
| borlanic | 0:fbdae7e6d805 | 574 | #define IS_DCMI_EXTENDED_DATA(DATA)(((DATA) == DCMI_EXTEND_DATA_8B) || \ |
| borlanic | 0:fbdae7e6d805 | 575 | ((DATA) == DCMI_EXTEND_DATA_10B) || \ |
| borlanic | 0:fbdae7e6d805 | 576 | ((DATA) == DCMI_EXTEND_DATA_12B) || \ |
| borlanic | 0:fbdae7e6d805 | 577 | ((DATA) == DCMI_EXTEND_DATA_14B)) |
| borlanic | 0:fbdae7e6d805 | 578 | |
| borlanic | 0:fbdae7e6d805 | 579 | #define IS_DCMI_WINDOW_COORDINATE(COORDINATE) ((COORDINATE) <= DCMI_WINDOW_COORDINATE) |
| borlanic | 0:fbdae7e6d805 | 580 | |
| borlanic | 0:fbdae7e6d805 | 581 | #define IS_DCMI_WINDOW_HEIGHT(HEIGHT) ((HEIGHT) <= DCMI_WINDOW_HEIGHT) |
| borlanic | 0:fbdae7e6d805 | 582 | |
| borlanic | 0:fbdae7e6d805 | 583 | #define IS_DCMI_BYTE_SELECT_MODE(MODE)(((MODE) == DCMI_BSM_ALL) || \ |
| borlanic | 0:fbdae7e6d805 | 584 | ((MODE) == DCMI_BSM_OTHER) || \ |
| borlanic | 0:fbdae7e6d805 | 585 | ((MODE) == DCMI_BSM_ALTERNATE_4) || \ |
| borlanic | 0:fbdae7e6d805 | 586 | ((MODE) == DCMI_BSM_ALTERNATE_2)) |
| borlanic | 0:fbdae7e6d805 | 587 | |
| borlanic | 0:fbdae7e6d805 | 588 | #define IS_DCMI_BYTE_SELECT_START(POLARITY)(((POLARITY) == DCMI_OEBS_ODD) || \ |
| borlanic | 0:fbdae7e6d805 | 589 | ((POLARITY) == DCMI_OEBS_EVEN)) |
| borlanic | 0:fbdae7e6d805 | 590 | |
| borlanic | 0:fbdae7e6d805 | 591 | #define IS_DCMI_LINE_SELECT_MODE(MODE)(((MODE) == DCMI_LSM_ALL) || \ |
| borlanic | 0:fbdae7e6d805 | 592 | ((MODE) == DCMI_LSM_ALTERNATE_2)) |
| borlanic | 0:fbdae7e6d805 | 593 | |
| borlanic | 0:fbdae7e6d805 | 594 | #define IS_DCMI_LINE_SELECT_START(POLARITY)(((POLARITY) == DCMI_OELS_ODD) || \ |
| borlanic | 0:fbdae7e6d805 | 595 | ((POLARITY) == DCMI_OELS_EVEN)) |
| borlanic | 0:fbdae7e6d805 | 596 | |
| borlanic | 0:fbdae7e6d805 | 597 | /** |
| borlanic | 0:fbdae7e6d805 | 598 | * @} |
| borlanic | 0:fbdae7e6d805 | 599 | */ |
| borlanic | 0:fbdae7e6d805 | 600 | |
| borlanic | 0:fbdae7e6d805 | 601 | /* Private functions ---------------------------------------------------------*/ |
| borlanic | 0:fbdae7e6d805 | 602 | /** @addtogroup DCMI_Private_Functions DCMI Private Functions |
| borlanic | 0:fbdae7e6d805 | 603 | * @{ |
| borlanic | 0:fbdae7e6d805 | 604 | */ |
| borlanic | 0:fbdae7e6d805 | 605 | |
| borlanic | 0:fbdae7e6d805 | 606 | /** |
| borlanic | 0:fbdae7e6d805 | 607 | * @} |
| borlanic | 0:fbdae7e6d805 | 608 | */ |
| borlanic | 0:fbdae7e6d805 | 609 | |
| borlanic | 0:fbdae7e6d805 | 610 | /** |
| borlanic | 0:fbdae7e6d805 | 611 | * @} |
| borlanic | 0:fbdae7e6d805 | 612 | */ |
| borlanic | 0:fbdae7e6d805 | 613 | /** |
| borlanic | 0:fbdae7e6d805 | 614 | * @} |
| borlanic | 0:fbdae7e6d805 | 615 | */ |
| borlanic | 0:fbdae7e6d805 | 616 | #endif /* DCMI */ |
| borlanic | 0:fbdae7e6d805 | 617 | |
| borlanic | 0:fbdae7e6d805 | 618 | #ifdef __cplusplus |
| borlanic | 0:fbdae7e6d805 | 619 | } |
| borlanic | 0:fbdae7e6d805 | 620 | #endif |
| borlanic | 0:fbdae7e6d805 | 621 | |
| borlanic | 0:fbdae7e6d805 | 622 | #endif /* __STM32F7xx_HAL_DCMI_H */ |
| borlanic | 0:fbdae7e6d805 | 623 | |
| borlanic | 0:fbdae7e6d805 | 624 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |