2 ******************************************************************************
\r
3 * @file stm32f7xx_hal_dcmi_ex.h
\r
4 * @author MCD Application Team
\r
7 * @brief Header file of DCMI Extension HAL module.
\r
8 ******************************************************************************
\r
11 * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
\r
13 * Redistribution and use in source and binary forms, with or without modification,
\r
14 * are permitted provided that the following conditions are met:
\r
15 * 1. Redistributions of source code must retain the above copyright notice,
\r
16 * this list of conditions and the following disclaimer.
\r
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
\r
18 * this list of conditions and the following disclaimer in the documentation
\r
19 * and/or other materials provided with the distribution.
\r
20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
\r
21 * may be used to endorse or promote products derived from this software
\r
22 * without specific prior written permission.
\r
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
\r
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
\r
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
\r
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
\r
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
\r
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
\r
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
\r
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
\r
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
\r
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
35 ******************************************************************************
\r
38 /* Define to prevent recursive inclusion -------------------------------------*/
\r
39 #ifndef __STM32F7xx_HAL_DCMI_EX_H
\r
40 #define __STM32F7xx_HAL_DCMI_EX_H
\r
47 /* Includes ------------------------------------------------------------------*/
\r
48 #include "stm32f7xx_hal_def.h"
\r
51 /** @addtogroup STM32F7xx_HAL_Driver
\r
55 /** @addtogroup DCMIEx DCMIEx
\r
60 /* Exported types ------------------------------------------------------------*/
\r
61 /** @defgroup DCMIEx_Exported_Types DCMIEx Exported Types
\r
65 * @brief DCMIEx Embedded Synchronisation CODE Init structure definition
\r
69 uint8_t FrameStartCode; /*!< Specifies the code of the frame start delimiter. */
\r
70 uint8_t LineStartCode; /*!< Specifies the code of the line start delimiter. */
\r
71 uint8_t LineEndCode; /*!< Specifies the code of the line end delimiter. */
\r
72 uint8_t FrameEndCode; /*!< Specifies the code of the frame end delimiter. */
\r
73 }DCMI_CodesInitTypeDef;
\r
76 * @brief DCMI Init structure definition
\r
80 uint32_t SynchroMode; /*!< Specifies the Synchronization Mode: Hardware or Embedded.
\r
81 This parameter can be a value of @ref DCMI_Synchronization_Mode */
\r
83 uint32_t PCKPolarity; /*!< Specifies the Pixel clock polarity: Falling or Rising.
\r
84 This parameter can be a value of @ref DCMI_PIXCK_Polarity */
\r
86 uint32_t VSPolarity; /*!< Specifies the Vertical synchronization polarity: High or Low.
\r
87 This parameter can be a value of @ref DCMI_VSYNC_Polarity */
\r
89 uint32_t HSPolarity; /*!< Specifies the Horizontal synchronization polarity: High or Low.
\r
90 This parameter can be a value of @ref DCMI_HSYNC_Polarity */
\r
92 uint32_t CaptureRate; /*!< Specifies the frequency of frame capture: All, 1/2 or 1/4.
\r
93 This parameter can be a value of @ref DCMI_Capture_Rate */
\r
95 uint32_t ExtendedDataMode; /*!< Specifies the data width: 8-bit, 10-bit, 12-bit or 14-bit.
\r
96 This parameter can be a value of @ref DCMI_Extended_Data_Mode */
\r
98 DCMI_CodesInitTypeDef SyncroCode; /*!< Specifies the code of the frame start delimiter. */
\r
100 uint32_t JPEGMode; /*!< Enable or Disable the JPEG mode.
\r
101 This parameter can be a value of @ref DCMI_MODE_JPEG */
\r
103 uint32_t ByteSelectMode; /*!< Specifies the data to be captured by the interface
\r
104 This parameter can be a value of @ref DCMIEx_Byte_Select_Mode */
\r
106 uint32_t ByteSelectStart; /*!< Specifies if the data to be captured by the interface is even or odd
\r
107 This parameter can be a value of @ref DCMIEx_Byte_Select_Start */
\r
109 uint32_t LineSelectMode; /*!< Specifies the line of data to be captured by the interface
\r
110 This parameter can be a value of @ref DCMIEx_Line_Select_Mode */
\r
112 uint32_t LineSelectStart; /*!< Specifies if the line of data to be captured by the interface is even or odd
\r
113 This parameter can be a value of @ref DCMIEx_Line_Select_Start */
\r
120 /* Exported constants --------------------------------------------------------*/
\r
121 /** @defgroup DCMIEx_Exported_Constants DCMIEx Exported Constants
\r
125 /** @defgroup DCMIEx_Byte_Select_Mode DCMIEx Byte Select Mode
\r
128 #define DCMI_BSM_ALL ((uint32_t)0x00000000) /*!< Interface captures all received data */
\r
129 #define DCMI_BSM_OTHER ((uint32_t)DCMI_CR_BSM_0) /*!< Interface captures every other byte from the received data */
\r
130 #define DCMI_BSM_ALTERNATE_4 ((uint32_t)DCMI_CR_BSM_1) /*!< Interface captures one byte out of four */
\r
131 #define DCMI_BSM_ALTERNATE_2 ((uint32_t)(DCMI_CR_BSM_0 | DCMI_CR_BSM_1)) /*!< Interface captures two bytes out of four */
\r
137 /** @defgroup DCMIEx_Byte_Select_Start DCMIEx Byte Select Start
\r
140 #define DCMI_OEBS_ODD ((uint32_t)0x00000000) /*!< Interface captures first data from the frame/line start, second one being dropped */
\r
141 #define DCMI_OEBS_EVEN ((uint32_t)DCMI_CR_OEBS) /*!< Interface captures second data from the frame/line start, first one being dropped */
\r
147 /** @defgroup DCMIEx_Line_Select_Mode DCMIEx Line Select Mode
\r
150 #define DCMI_LSM_ALL ((uint32_t)0x00000000) /*!< Interface captures all received lines */
\r
151 #define DCMI_LSM_ALTERNATE_2 ((uint32_t)DCMI_CR_LSM) /*!< Interface captures one line out of two */
\r
157 /** @defgroup DCMIEx_Line_Select_Start DCMIEx Line Select Start
\r
160 #define DCMI_OELS_ODD ((uint32_t)0x00000000) /*!< Interface captures first line from the frame start, second one being dropped */
\r
161 #define DCMI_OELS_EVEN ((uint32_t)DCMI_CR_OELS) /*!< Interface captures second line from the frame start, first one being dropped */
\r
171 /* Exported macro ------------------------------------------------------------*/
\r
172 /* Exported functions --------------------------------------------------------*/
\r
173 /* Private types -------------------------------------------------------------*/
\r
174 /* Private variables ---------------------------------------------------------*/
\r
175 /* Private constants ---------------------------------------------------------*/
\r
176 /* Private macro -------------------------------------------------------------*/
\r
177 /** @defgroup DCMIEx_Private_Macros DCMIEx Private Macros
\r
180 #define IS_DCMI_BYTE_SELECT_MODE(MODE)(((MODE) == DCMI_BSM_ALL) || \
\r
181 ((MODE) == DCMI_BSM_OTHER) || \
\r
182 ((MODE) == DCMI_BSM_ALTERNATE_4) || \
\r
183 ((MODE) == DCMI_BSM_ALTERNATE_2))
\r
185 #define IS_DCMI_BYTE_SELECT_START(POLARITY)(((POLARITY) == DCMI_OEBS_ODD) || \
\r
186 ((POLARITY) == DCMI_OEBS_EVEN))
\r
188 #define IS_DCMI_LINE_SELECT_MODE(MODE)(((MODE) == DCMI_LSM_ALL) || \
\r
189 ((MODE) == DCMI_LSM_ALTERNATE_2))
\r
191 #define IS_DCMI_LINE_SELECT_START(POLARITY)(((POLARITY) == DCMI_OELS_ODD) || \
\r
192 ((POLARITY) == DCMI_OELS_EVEN))
\r
197 /* Private functions ---------------------------------------------------------*/
\r
211 #endif /* __STM32F7xx_HAL_DCMI_H */
\r
213 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
\r