]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil/ST_Library/include/stm32f7xx_hal_dcmi_ex.h
Final V8.2.1 release ready for tagging:
[freertos] / FreeRTOS / Demo / CORTEX_M7_STM32F7_STM32756G-EVAL_IAR_Keil / ST_Library / include / stm32f7xx_hal_dcmi_ex.h
1 /**\r
2   ******************************************************************************\r
3   * @file    stm32f7xx_hal_dcmi_ex.h\r
4   * @author  MCD Application Team\r
5   * @version V1.0.0RC1\r
6   * @date    24-March-2015\r
7   * @brief   Header file of DCMI Extension HAL module.\r
8   ******************************************************************************\r
9   * @attention\r
10   *\r
11   * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>\r
12   *\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
23   *\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
34   *\r
35   ******************************************************************************\r
36   */ \r
37 \r
38 /* Define to prevent recursive inclusion -------------------------------------*/\r
39 #ifndef __STM32F7xx_HAL_DCMI_EX_H\r
40 #define __STM32F7xx_HAL_DCMI_EX_H\r
41 \r
42 #ifdef __cplusplus\r
43  extern "C" {\r
44 #endif\r
45 \r
46 \r
47 /* Includes ------------------------------------------------------------------*/\r
48 #include "stm32f7xx_hal_def.h"\r
49 \r
50 \r
51 /** @addtogroup STM32F7xx_HAL_Driver\r
52   * @{\r
53   */\r
54 \r
55 /** @addtogroup DCMIEx DCMI Extended\r
56   * @brief DCMI HAL module driver\r
57   * @{\r
58   */  \r
59 \r
60 /* Exported types ------------------------------------------------------------*/\r
61 /** @defgroup DCMIEx_Exported_Types DCMI Extende Exported Types\r
62   * @{\r
63   */\r
64 /** \r
65   * @brief   DCMIEx Embedded Synchronisation CODE Init structure definition\r
66   */ \r
67 typedef struct\r
68 {\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
74 \r
75 /** \r
76   * @brief   DCMI Init structure definition\r
77   */  \r
78 typedef struct\r
79 {\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
82 \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
85 \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
88 \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
91 \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
94 \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
97 \r
98   DCMI_CodesInitTypeDef SyncroCode;     /*!< Specifies the code of the frame start delimiter.                */\r
99 \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
102 #if defined(STM32F746xx) || defined(STM32F756xx)\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
105                                             \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
108 \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
111                                             \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
114                                                                                         \r
115 #endif /* STM32F746xx || STM32F756xx */\r
116 }DCMI_InitTypeDef;\r
117 \r
118 /**\r
119   * @}\r
120   */\r
121 \r
122 #if defined(STM32F746xx) || defined(STM32F756xx)\r
123 /* Exported constants --------------------------------------------------------*/\r
124 /** @defgroup DCMIEx_Exported_Constants DCMI Exported Constants\r
125   * @{\r
126   */\r
127 \r
128 /** @defgroup DCMIEx_Byte_Select_Mode DCMI Byte Select Mode\r
129   * @{\r
130   */\r
131 #define DCMI_BSM_ALL                 ((uint32_t)0x00000000) /*!< Interface captures all received data */\r
132 #define DCMI_BSM_OTHER               ((uint32_t)DCMI_CR_BSM_0) /*!< Interface captures every other byte from the received data */\r
133 #define DCMI_BSM_ALTERNATE_4         ((uint32_t)DCMI_CR_BSM_1) /*!< Interface captures one byte out of four */\r
134 #define DCMI_BSM_ALTERNATE_2         ((uint32_t)(DCMI_CR_BSM_0 | DCMI_CR_BSM_1)) /*!< Interface captures two bytes out of four */\r
135 \r
136 /**\r
137   * @}\r
138   */\r
139 \r
140 /** @defgroup DCMIEx_Byte_Select_Start DCMI Byte Select Start\r
141   * @{\r
142   */ \r
143 #define DCMI_OEBS_ODD               ((uint32_t)0x00000000) /*!< Interface captures first data from the frame/line start, second one being dropped */\r
144 #define DCMI_OEBS_EVEN              ((uint32_t)DCMI_CR_OEBS) /*!< Interface captures second data from the frame/line start, first one being dropped */\r
145 \r
146 /**\r
147   * @}\r
148   */\r
149 \r
150 /** @defgroup DCMIEx_Line_Select_Mode DCMI Line Select Mode\r
151   * @{\r
152   */\r
153 #define DCMI_LSM_ALL                 ((uint32_t)0x00000000) /*!< Interface captures all received lines */\r
154 #define DCMI_LSM_ALTERNATE_2         ((uint32_t)DCMI_CR_LSM) /*!< Interface captures one line out of two */\r
155 \r
156 /**\r
157   * @}\r
158   */\r
159 \r
160 /** @defgroup DCMIEx_Line_Select_Start DCMI Line Select Start\r
161   * @{\r
162   */ \r
163 #define DCMI_OELS_ODD               ((uint32_t)0x00000000) /*!< Interface captures first line from the frame start, second one being dropped */\r
164 #define DCMI_OELS_EVEN              ((uint32_t)DCMI_CR_OELS) /*!< Interface captures second line from the frame start, first one being dropped */\r
165 \r
166 /**\r
167   * @}\r
168   */\r
169   \r
170 /**\r
171   * @}\r
172   */\r
173 \r
174 /* Exported macro ------------------------------------------------------------*/      \r
175 /* Exported functions --------------------------------------------------------*/\r
176 /* Private types -------------------------------------------------------------*/\r
177 /* Private variables ---------------------------------------------------------*/\r
178 /* Private constants ---------------------------------------------------------*/   \r
179 /* Private macro -------------------------------------------------------------*/\r
180 /** @defgroup DCMIEx_Private_Macros DCMI Extended Private Macros\r
181   * @{\r
182   */\r
183 #define IS_DCMI_BYTE_SELECT_MODE(MODE)(((MODE) == DCMI_BSM_ALL) || \\r
184                                        ((MODE) == DCMI_BSM_OTHER) || \\r
185                                        ((MODE) == DCMI_BSM_ALTERNATE_4) || \\r
186                                        ((MODE) == DCMI_BSM_ALTERNATE_2))\r
187                                                                                                 \r
188 #define IS_DCMI_BYTE_SELECT_START(POLARITY)(((POLARITY) == DCMI_OEBS_ODD) || \\r
189                                             ((POLARITY) == DCMI_OEBS_EVEN))\r
190                               \r
191 #define IS_DCMI_LINE_SELECT_MODE(MODE)(((MODE) == DCMI_LSM_ALL) || \\r
192                                        ((MODE) == DCMI_LSM_ALTERNATE_2))\r
193                                       \r
194 #define IS_DCMI_LINE_SELECT_START(POLARITY)(((POLARITY) == DCMI_OELS_ODD) || \\r
195                                             ((POLARITY) == DCMI_OELS_EVEN))\r
196 /**\r
197   * @}\r
198   */\r
199 #endif /* STM32F746xx || STM32F756xx */\r
200 /* Private functions ---------------------------------------------------------*/\r
201 \r
202 /**\r
203   * @}\r
204   */\r
205     \r
206 /**\r
207   * @}\r
208   */ \r
209 \r
210 #ifdef __cplusplus\r
211 }\r
212 #endif\r
213 \r
214 #endif /* __STM32F7xx_HAL_DCMI_H */\r
215 \r
216 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/\r