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