Initial commit
mbed-dev-master/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_dcmi_ex.h@0:bb348c97df44, 2020-09-16 (annotated)
- Committer:
- lypinator
- Date:
- Wed Sep 16 01:11:49 2020 +0000
- Revision:
- 0:bb348c97df44
Added PWM
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lypinator | 0:bb348c97df44 | 1 | /** |
lypinator | 0:bb348c97df44 | 2 | ****************************************************************************** |
lypinator | 0:bb348c97df44 | 3 | * @file stm32f4xx_hal_dcmi_ex.h |
lypinator | 0:bb348c97df44 | 4 | * @author MCD Application Team |
lypinator | 0:bb348c97df44 | 5 | * @brief Header file of DCMI Extension HAL module. |
lypinator | 0:bb348c97df44 | 6 | ****************************************************************************** |
lypinator | 0:bb348c97df44 | 7 | * @attention |
lypinator | 0:bb348c97df44 | 8 | * |
lypinator | 0:bb348c97df44 | 9 | * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> |
lypinator | 0:bb348c97df44 | 10 | * |
lypinator | 0:bb348c97df44 | 11 | * Redistribution and use in source and binary forms, with or without modification, |
lypinator | 0:bb348c97df44 | 12 | * are permitted provided that the following conditions are met: |
lypinator | 0:bb348c97df44 | 13 | * 1. Redistributions of source code must retain the above copyright notice, |
lypinator | 0:bb348c97df44 | 14 | * this list of conditions and the following disclaimer. |
lypinator | 0:bb348c97df44 | 15 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
lypinator | 0:bb348c97df44 | 16 | * this list of conditions and the following disclaimer in the documentation |
lypinator | 0:bb348c97df44 | 17 | * and/or other materials provided with the distribution. |
lypinator | 0:bb348c97df44 | 18 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
lypinator | 0:bb348c97df44 | 19 | * may be used to endorse or promote products derived from this software |
lypinator | 0:bb348c97df44 | 20 | * without specific prior written permission. |
lypinator | 0:bb348c97df44 | 21 | * |
lypinator | 0:bb348c97df44 | 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
lypinator | 0:bb348c97df44 | 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
lypinator | 0:bb348c97df44 | 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
lypinator | 0:bb348c97df44 | 25 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
lypinator | 0:bb348c97df44 | 26 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
lypinator | 0:bb348c97df44 | 27 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
lypinator | 0:bb348c97df44 | 28 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
lypinator | 0:bb348c97df44 | 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
lypinator | 0:bb348c97df44 | 30 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
lypinator | 0:bb348c97df44 | 31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
lypinator | 0:bb348c97df44 | 32 | * |
lypinator | 0:bb348c97df44 | 33 | ****************************************************************************** |
lypinator | 0:bb348c97df44 | 34 | */ |
lypinator | 0:bb348c97df44 | 35 | |
lypinator | 0:bb348c97df44 | 36 | /* Define to prevent recursive inclusion -------------------------------------*/ |
lypinator | 0:bb348c97df44 | 37 | #ifndef __STM32F4xx_HAL_DCMI_EX_H |
lypinator | 0:bb348c97df44 | 38 | #define __STM32F4xx_HAL_DCMI_EX_H |
lypinator | 0:bb348c97df44 | 39 | |
lypinator | 0:bb348c97df44 | 40 | #ifdef __cplusplus |
lypinator | 0:bb348c97df44 | 41 | extern "C" { |
lypinator | 0:bb348c97df44 | 42 | #endif |
lypinator | 0:bb348c97df44 | 43 | |
lypinator | 0:bb348c97df44 | 44 | #if defined(STM32F407xx) || defined(STM32F417xx) || defined(STM32F427xx) || defined(STM32F437xx) ||\ |
lypinator | 0:bb348c97df44 | 45 | defined(STM32F429xx) || defined(STM32F439xx) || defined(STM32F446xx) || defined(STM32F469xx) ||\ |
lypinator | 0:bb348c97df44 | 46 | defined(STM32F479xx) |
lypinator | 0:bb348c97df44 | 47 | |
lypinator | 0:bb348c97df44 | 48 | /* Includes ------------------------------------------------------------------*/ |
lypinator | 0:bb348c97df44 | 49 | #include "stm32f4xx_hal_def.h" |
lypinator | 0:bb348c97df44 | 50 | |
lypinator | 0:bb348c97df44 | 51 | |
lypinator | 0:bb348c97df44 | 52 | /** @addtogroup STM32F4xx_HAL_Driver |
lypinator | 0:bb348c97df44 | 53 | * @{ |
lypinator | 0:bb348c97df44 | 54 | */ |
lypinator | 0:bb348c97df44 | 55 | |
lypinator | 0:bb348c97df44 | 56 | /** @addtogroup DCMIEx |
lypinator | 0:bb348c97df44 | 57 | * @brief DCMI HAL module driver |
lypinator | 0:bb348c97df44 | 58 | * @{ |
lypinator | 0:bb348c97df44 | 59 | */ |
lypinator | 0:bb348c97df44 | 60 | |
lypinator | 0:bb348c97df44 | 61 | /* Exported types ------------------------------------------------------------*/ |
lypinator | 0:bb348c97df44 | 62 | /** @defgroup DCMIEx_Exported_Types DCMI Extended Exported Types |
lypinator | 0:bb348c97df44 | 63 | * @{ |
lypinator | 0:bb348c97df44 | 64 | */ |
lypinator | 0:bb348c97df44 | 65 | /** |
lypinator | 0:bb348c97df44 | 66 | * @brief DCMIEx Embedded Synchronisation CODE Init structure definition |
lypinator | 0:bb348c97df44 | 67 | */ |
lypinator | 0:bb348c97df44 | 68 | typedef struct |
lypinator | 0:bb348c97df44 | 69 | { |
lypinator | 0:bb348c97df44 | 70 | uint8_t FrameStartCode; /*!< Specifies the code of the frame start delimiter. */ |
lypinator | 0:bb348c97df44 | 71 | uint8_t LineStartCode; /*!< Specifies the code of the line start delimiter. */ |
lypinator | 0:bb348c97df44 | 72 | uint8_t LineEndCode; /*!< Specifies the code of the line end delimiter. */ |
lypinator | 0:bb348c97df44 | 73 | uint8_t FrameEndCode; /*!< Specifies the code of the frame end delimiter. */ |
lypinator | 0:bb348c97df44 | 74 | }DCMI_CodesInitTypeDef; |
lypinator | 0:bb348c97df44 | 75 | |
lypinator | 0:bb348c97df44 | 76 | /** |
lypinator | 0:bb348c97df44 | 77 | * @brief DCMI Init structure definition |
lypinator | 0:bb348c97df44 | 78 | */ |
lypinator | 0:bb348c97df44 | 79 | typedef struct |
lypinator | 0:bb348c97df44 | 80 | { |
lypinator | 0:bb348c97df44 | 81 | uint32_t SynchroMode; /*!< Specifies the Synchronization Mode: Hardware or Embedded. |
lypinator | 0:bb348c97df44 | 82 | This parameter can be a value of @ref DCMI_Synchronization_Mode */ |
lypinator | 0:bb348c97df44 | 83 | |
lypinator | 0:bb348c97df44 | 84 | uint32_t PCKPolarity; /*!< Specifies the Pixel clock polarity: Falling or Rising. |
lypinator | 0:bb348c97df44 | 85 | This parameter can be a value of @ref DCMI_PIXCK_Polarity */ |
lypinator | 0:bb348c97df44 | 86 | |
lypinator | 0:bb348c97df44 | 87 | uint32_t VSPolarity; /*!< Specifies the Vertical synchronization polarity: High or Low. |
lypinator | 0:bb348c97df44 | 88 | This parameter can be a value of @ref DCMI_VSYNC_Polarity */ |
lypinator | 0:bb348c97df44 | 89 | |
lypinator | 0:bb348c97df44 | 90 | uint32_t HSPolarity; /*!< Specifies the Horizontal synchronization polarity: High or Low. |
lypinator | 0:bb348c97df44 | 91 | This parameter can be a value of @ref DCMI_HSYNC_Polarity */ |
lypinator | 0:bb348c97df44 | 92 | |
lypinator | 0:bb348c97df44 | 93 | uint32_t CaptureRate; /*!< Specifies the frequency of frame capture: All, 1/2 or 1/4. |
lypinator | 0:bb348c97df44 | 94 | This parameter can be a value of @ref DCMI_Capture_Rate */ |
lypinator | 0:bb348c97df44 | 95 | |
lypinator | 0:bb348c97df44 | 96 | uint32_t ExtendedDataMode; /*!< Specifies the data width: 8-bit, 10-bit, 12-bit or 14-bit. |
lypinator | 0:bb348c97df44 | 97 | This parameter can be a value of @ref DCMI_Extended_Data_Mode */ |
lypinator | 0:bb348c97df44 | 98 | |
lypinator | 0:bb348c97df44 | 99 | DCMI_CodesInitTypeDef SyncroCode; /*!< Specifies the code of the frame start delimiter. */ |
lypinator | 0:bb348c97df44 | 100 | |
lypinator | 0:bb348c97df44 | 101 | uint32_t JPEGMode; /*!< Enable or Disable the JPEG mode |
lypinator | 0:bb348c97df44 | 102 | This parameter can be a value of @ref DCMI_MODE_JPEG */ |
lypinator | 0:bb348c97df44 | 103 | #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) |
lypinator | 0:bb348c97df44 | 104 | uint32_t ByteSelectMode; /*!< Specifies the data to be captured by the interface |
lypinator | 0:bb348c97df44 | 105 | This parameter can be a value of @ref DCMIEx_Byte_Select_Mode */ |
lypinator | 0:bb348c97df44 | 106 | |
lypinator | 0:bb348c97df44 | 107 | uint32_t ByteSelectStart; /*!< Specifies if the data to be captured by the interface is even or odd |
lypinator | 0:bb348c97df44 | 108 | This parameter can be a value of @ref DCMIEx_Byte_Select_Start */ |
lypinator | 0:bb348c97df44 | 109 | |
lypinator | 0:bb348c97df44 | 110 | uint32_t LineSelectMode; /*!< Specifies the line of data to be captured by the interface |
lypinator | 0:bb348c97df44 | 111 | This parameter can be a value of @ref DCMIEx_Line_Select_Mode */ |
lypinator | 0:bb348c97df44 | 112 | |
lypinator | 0:bb348c97df44 | 113 | uint32_t LineSelectStart; /*!< Specifies if the line of data to be captured by the interface is even or odd |
lypinator | 0:bb348c97df44 | 114 | This parameter can be a value of @ref DCMIEx_Line_Select_Start */ |
lypinator | 0:bb348c97df44 | 115 | |
lypinator | 0:bb348c97df44 | 116 | #endif /* STM32F446xx || STM32F469xx || STM32F479xx */ |
lypinator | 0:bb348c97df44 | 117 | }DCMI_InitTypeDef; |
lypinator | 0:bb348c97df44 | 118 | |
lypinator | 0:bb348c97df44 | 119 | /** |
lypinator | 0:bb348c97df44 | 120 | * @} |
lypinator | 0:bb348c97df44 | 121 | */ |
lypinator | 0:bb348c97df44 | 122 | |
lypinator | 0:bb348c97df44 | 123 | /* Exported constants --------------------------------------------------------*/ |
lypinator | 0:bb348c97df44 | 124 | #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) |
lypinator | 0:bb348c97df44 | 125 | /** @defgroup DCMIEx_Exported_Constants DCMI Exported Constants |
lypinator | 0:bb348c97df44 | 126 | * @{ |
lypinator | 0:bb348c97df44 | 127 | */ |
lypinator | 0:bb348c97df44 | 128 | |
lypinator | 0:bb348c97df44 | 129 | /** @defgroup DCMIEx_Byte_Select_Mode DCMI Byte Select Mode |
lypinator | 0:bb348c97df44 | 130 | * @{ |
lypinator | 0:bb348c97df44 | 131 | */ |
lypinator | 0:bb348c97df44 | 132 | #define DCMI_BSM_ALL 0x00000000U /*!< Interface captures all received data */ |
lypinator | 0:bb348c97df44 | 133 | #define DCMI_BSM_OTHER ((uint32_t)DCMI_CR_BSM_0) /*!< Interface captures every other byte from the received data */ |
lypinator | 0:bb348c97df44 | 134 | #define DCMI_BSM_ALTERNATE_4 ((uint32_t)DCMI_CR_BSM_1) /*!< Interface captures one byte out of four */ |
lypinator | 0:bb348c97df44 | 135 | #define DCMI_BSM_ALTERNATE_2 ((uint32_t)(DCMI_CR_BSM_0 | DCMI_CR_BSM_1)) /*!< Interface captures two bytes out of four */ |
lypinator | 0:bb348c97df44 | 136 | |
lypinator | 0:bb348c97df44 | 137 | /** |
lypinator | 0:bb348c97df44 | 138 | * @} |
lypinator | 0:bb348c97df44 | 139 | */ |
lypinator | 0:bb348c97df44 | 140 | |
lypinator | 0:bb348c97df44 | 141 | /** @defgroup DCMIEx_Byte_Select_Start DCMI Byte Select Start |
lypinator | 0:bb348c97df44 | 142 | * @{ |
lypinator | 0:bb348c97df44 | 143 | */ |
lypinator | 0:bb348c97df44 | 144 | #define DCMI_OEBS_ODD 0x00000000U /*!< Interface captures first data from the frame/line start, second one being dropped */ |
lypinator | 0:bb348c97df44 | 145 | #define DCMI_OEBS_EVEN ((uint32_t)DCMI_CR_OEBS) /*!< Interface captures second data from the frame/line start, first one being dropped */ |
lypinator | 0:bb348c97df44 | 146 | |
lypinator | 0:bb348c97df44 | 147 | /** |
lypinator | 0:bb348c97df44 | 148 | * @} |
lypinator | 0:bb348c97df44 | 149 | */ |
lypinator | 0:bb348c97df44 | 150 | |
lypinator | 0:bb348c97df44 | 151 | /** @defgroup DCMIEx_Line_Select_Mode DCMI Line Select Mode |
lypinator | 0:bb348c97df44 | 152 | * @{ |
lypinator | 0:bb348c97df44 | 153 | */ |
lypinator | 0:bb348c97df44 | 154 | #define DCMI_LSM_ALL 0x00000000U /*!< Interface captures all received lines */ |
lypinator | 0:bb348c97df44 | 155 | #define DCMI_LSM_ALTERNATE_2 ((uint32_t)DCMI_CR_LSM) /*!< Interface captures one line out of two */ |
lypinator | 0:bb348c97df44 | 156 | |
lypinator | 0:bb348c97df44 | 157 | /** |
lypinator | 0:bb348c97df44 | 158 | * @} |
lypinator | 0:bb348c97df44 | 159 | */ |
lypinator | 0:bb348c97df44 | 160 | |
lypinator | 0:bb348c97df44 | 161 | /** @defgroup DCMIEx_Line_Select_Start DCMI Line Select Start |
lypinator | 0:bb348c97df44 | 162 | * @{ |
lypinator | 0:bb348c97df44 | 163 | */ |
lypinator | 0:bb348c97df44 | 164 | #define DCMI_OELS_ODD 0x00000000U /*!< Interface captures first line from the frame start, second one being dropped */ |
lypinator | 0:bb348c97df44 | 165 | #define DCMI_OELS_EVEN ((uint32_t)DCMI_CR_OELS) /*!< Interface captures second line from the frame start, first one being dropped */ |
lypinator | 0:bb348c97df44 | 166 | |
lypinator | 0:bb348c97df44 | 167 | /** |
lypinator | 0:bb348c97df44 | 168 | * @} |
lypinator | 0:bb348c97df44 | 169 | */ |
lypinator | 0:bb348c97df44 | 170 | |
lypinator | 0:bb348c97df44 | 171 | /** |
lypinator | 0:bb348c97df44 | 172 | * @} |
lypinator | 0:bb348c97df44 | 173 | */ |
lypinator | 0:bb348c97df44 | 174 | #endif /* STM32F446xx || STM32F469xx || STM32F479xx */ |
lypinator | 0:bb348c97df44 | 175 | |
lypinator | 0:bb348c97df44 | 176 | /* Exported macro ------------------------------------------------------------*/ |
lypinator | 0:bb348c97df44 | 177 | /* Exported functions --------------------------------------------------------*/ |
lypinator | 0:bb348c97df44 | 178 | /* Private types -------------------------------------------------------------*/ |
lypinator | 0:bb348c97df44 | 179 | /* Private variables ---------------------------------------------------------*/ |
lypinator | 0:bb348c97df44 | 180 | /* Private constants ---------------------------------------------------------*/ |
lypinator | 0:bb348c97df44 | 181 | #define DCMI_POSITION_ESCR_LSC (uint32_t)DCMI_ESCR_LSC_Pos /*!< Required left shift to set line start delimiter */ |
lypinator | 0:bb348c97df44 | 182 | #define DCMI_POSITION_ESCR_LEC (uint32_t)DCMI_ESCR_LEC_Pos /*!< Required left shift to set line end delimiter */ |
lypinator | 0:bb348c97df44 | 183 | #define DCMI_POSITION_ESCR_FEC (uint32_t)DCMI_ESCR_FEC_Pos /*!< Required left shift to set frame end delimiter */ |
lypinator | 0:bb348c97df44 | 184 | |
lypinator | 0:bb348c97df44 | 185 | /* Private macro -------------------------------------------------------------*/ |
lypinator | 0:bb348c97df44 | 186 | #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) |
lypinator | 0:bb348c97df44 | 187 | /** @defgroup DCMIEx_Private_Macros DCMI Extended Private Macros |
lypinator | 0:bb348c97df44 | 188 | * @{ |
lypinator | 0:bb348c97df44 | 189 | */ |
lypinator | 0:bb348c97df44 | 190 | #define IS_DCMI_BYTE_SELECT_MODE(MODE)(((MODE) == DCMI_BSM_ALL) || \ |
lypinator | 0:bb348c97df44 | 191 | ((MODE) == DCMI_BSM_OTHER) || \ |
lypinator | 0:bb348c97df44 | 192 | ((MODE) == DCMI_BSM_ALTERNATE_4) || \ |
lypinator | 0:bb348c97df44 | 193 | ((MODE) == DCMI_BSM_ALTERNATE_2)) |
lypinator | 0:bb348c97df44 | 194 | |
lypinator | 0:bb348c97df44 | 195 | #define IS_DCMI_BYTE_SELECT_START(POLARITY)(((POLARITY) == DCMI_OEBS_ODD) || \ |
lypinator | 0:bb348c97df44 | 196 | ((POLARITY) == DCMI_OEBS_EVEN)) |
lypinator | 0:bb348c97df44 | 197 | |
lypinator | 0:bb348c97df44 | 198 | #define IS_DCMI_LINE_SELECT_MODE(MODE)(((MODE) == DCMI_LSM_ALL) || \ |
lypinator | 0:bb348c97df44 | 199 | ((MODE) == DCMI_LSM_ALTERNATE_2)) |
lypinator | 0:bb348c97df44 | 200 | |
lypinator | 0:bb348c97df44 | 201 | #define IS_DCMI_LINE_SELECT_START(POLARITY)(((POLARITY) == DCMI_OELS_ODD) || \ |
lypinator | 0:bb348c97df44 | 202 | ((POLARITY) == DCMI_OELS_EVEN)) |
lypinator | 0:bb348c97df44 | 203 | #endif /* STM32F446xx || STM32F469xx || STM32F479xx */ |
lypinator | 0:bb348c97df44 | 204 | /** |
lypinator | 0:bb348c97df44 | 205 | * @} |
lypinator | 0:bb348c97df44 | 206 | */ |
lypinator | 0:bb348c97df44 | 207 | |
lypinator | 0:bb348c97df44 | 208 | /* Private functions ---------------------------------------------------------*/ |
lypinator | 0:bb348c97df44 | 209 | #endif /* STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\ |
lypinator | 0:bb348c97df44 | 210 | STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx ||\ |
lypinator | 0:bb348c97df44 | 211 | STM32F479xx */ |
lypinator | 0:bb348c97df44 | 212 | |
lypinator | 0:bb348c97df44 | 213 | |
lypinator | 0:bb348c97df44 | 214 | /** |
lypinator | 0:bb348c97df44 | 215 | * @} |
lypinator | 0:bb348c97df44 | 216 | */ |
lypinator | 0:bb348c97df44 | 217 | |
lypinator | 0:bb348c97df44 | 218 | /** |
lypinator | 0:bb348c97df44 | 219 | * @} |
lypinator | 0:bb348c97df44 | 220 | */ |
lypinator | 0:bb348c97df44 | 221 | |
lypinator | 0:bb348c97df44 | 222 | #ifdef __cplusplus |
lypinator | 0:bb348c97df44 | 223 | } |
lypinator | 0:bb348c97df44 | 224 | #endif |
lypinator | 0:bb348c97df44 | 225 | |
lypinator | 0:bb348c97df44 | 226 | #endif /* __STM32F4xx_HAL_DCMI_H */ |
lypinator | 0:bb348c97df44 | 227 | |
lypinator | 0:bb348c97df44 | 228 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |