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