STM32F479xx HAL User Manual
|
00001 /** 00002 ****************************************************************************** 00003 * @file stm32f4xx_hal_dcmi_ex.h 00004 * @author MCD Application Team 00005 * @brief Header file of DCMI Extension HAL module. 00006 ****************************************************************************** 00007 * @attention 00008 * 00009 * <h2><center>© Copyright (c) 2017 STMicroelectronics. 00010 * All rights reserved.</center></h2> 00011 * 00012 * This software component is licensed by ST under BSD 3-Clause license, 00013 * the "License"; You may not use this file except in compliance with the 00014 * License. You may obtain a copy of the License at: 00015 * opensource.org/licenses/BSD-3-Clause 00016 * 00017 ****************************************************************************** 00018 */ 00019 00020 /* Define to prevent recursive inclusion -------------------------------------*/ 00021 #ifndef __STM32F4xx_HAL_DCMI_EX_H 00022 #define __STM32F4xx_HAL_DCMI_EX_H 00023 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00028 #if defined(STM32F407xx) || defined(STM32F417xx) || defined(STM32F427xx) || defined(STM32F437xx) ||\ 00029 defined(STM32F429xx) || defined(STM32F439xx) || defined(STM32F446xx) || defined(STM32F469xx) ||\ 00030 defined(STM32F479xx) 00031 00032 /* Includes ------------------------------------------------------------------*/ 00033 #include "stm32f4xx_hal_def.h" 00034 00035 00036 /** @addtogroup STM32F4xx_HAL_Driver 00037 * @{ 00038 */ 00039 00040 /** @addtogroup DCMIEx 00041 * @brief DCMI HAL module driver 00042 * @{ 00043 */ 00044 00045 /* Exported types ------------------------------------------------------------*/ 00046 /** @defgroup DCMIEx_Exported_Types DCMI Extended Exported Types 00047 * @{ 00048 */ 00049 /** 00050 * @brief DCMIEx Embedded Synchronisation CODE Init structure definition 00051 */ 00052 typedef struct 00053 { 00054 uint8_t FrameStartCode; /*!< Specifies the code of the frame start delimiter. */ 00055 uint8_t LineStartCode; /*!< Specifies the code of the line start delimiter. */ 00056 uint8_t LineEndCode; /*!< Specifies the code of the line end delimiter. */ 00057 uint8_t FrameEndCode; /*!< Specifies the code of the frame end delimiter. */ 00058 }DCMI_CodesInitTypeDef; 00059 00060 /** 00061 * @brief DCMI Init structure definition 00062 */ 00063 typedef struct 00064 { 00065 uint32_t SynchroMode; /*!< Specifies the Synchronization Mode: Hardware or Embedded. 00066 This parameter can be a value of @ref DCMI_Synchronization_Mode */ 00067 00068 uint32_t PCKPolarity; /*!< Specifies the Pixel clock polarity: Falling or Rising. 00069 This parameter can be a value of @ref DCMI_PIXCK_Polarity */ 00070 00071 uint32_t VSPolarity; /*!< Specifies the Vertical synchronization polarity: High or Low. 00072 This parameter can be a value of @ref DCMI_VSYNC_Polarity */ 00073 00074 uint32_t HSPolarity; /*!< Specifies the Horizontal synchronization polarity: High or Low. 00075 This parameter can be a value of @ref DCMI_HSYNC_Polarity */ 00076 00077 uint32_t CaptureRate; /*!< Specifies the frequency of frame capture: All, 1/2 or 1/4. 00078 This parameter can be a value of @ref DCMI_Capture_Rate */ 00079 00080 uint32_t ExtendedDataMode; /*!< Specifies the data width: 8-bit, 10-bit, 12-bit or 14-bit. 00081 This parameter can be a value of @ref DCMI_Extended_Data_Mode */ 00082 00083 DCMI_CodesInitTypeDef SyncroCode; /*!< Specifies the code of the frame start delimiter. */ 00084 00085 uint32_t JPEGMode; /*!< Enable or Disable the JPEG mode 00086 This parameter can be a value of @ref DCMI_MODE_JPEG */ 00087 #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) 00088 uint32_t ByteSelectMode; /*!< Specifies the data to be captured by the interface 00089 This parameter can be a value of @ref DCMIEx_Byte_Select_Mode */ 00090 00091 uint32_t ByteSelectStart; /*!< Specifies if the data to be captured by the interface is even or odd 00092 This parameter can be a value of @ref DCMIEx_Byte_Select_Start */ 00093 00094 uint32_t LineSelectMode; /*!< Specifies the line of data to be captured by the interface 00095 This parameter can be a value of @ref DCMIEx_Line_Select_Mode */ 00096 00097 uint32_t LineSelectStart; /*!< Specifies if the line of data to be captured by the interface is even or odd 00098 This parameter can be a value of @ref DCMIEx_Line_Select_Start */ 00099 00100 #endif /* STM32F446xx || STM32F469xx || STM32F479xx */ 00101 }DCMI_InitTypeDef; 00102 00103 /** 00104 * @} 00105 */ 00106 00107 /* Exported constants --------------------------------------------------------*/ 00108 #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) 00109 /** @defgroup DCMIEx_Exported_Constants DCMI Exported Constants 00110 * @{ 00111 */ 00112 00113 /** @defgroup DCMIEx_Byte_Select_Mode DCMI Byte Select Mode 00114 * @{ 00115 */ 00116 #define DCMI_BSM_ALL 0x00000000U /*!< Interface captures all received data */ 00117 #define DCMI_BSM_OTHER ((uint32_t)DCMI_CR_BSM_0) /*!< Interface captures every other byte from the received data */ 00118 #define DCMI_BSM_ALTERNATE_4 ((uint32_t)DCMI_CR_BSM_1) /*!< Interface captures one byte out of four */ 00119 #define DCMI_BSM_ALTERNATE_2 ((uint32_t)(DCMI_CR_BSM_0 | DCMI_CR_BSM_1)) /*!< Interface captures two bytes out of four */ 00120 00121 /** 00122 * @} 00123 */ 00124 00125 /** @defgroup DCMIEx_Byte_Select_Start DCMI Byte Select Start 00126 * @{ 00127 */ 00128 #define DCMI_OEBS_ODD 0x00000000U /*!< Interface captures first data from the frame/line start, second one being dropped */ 00129 #define DCMI_OEBS_EVEN ((uint32_t)DCMI_CR_OEBS) /*!< Interface captures second data from the frame/line start, first one being dropped */ 00130 00131 /** 00132 * @} 00133 */ 00134 00135 /** @defgroup DCMIEx_Line_Select_Mode DCMI Line Select Mode 00136 * @{ 00137 */ 00138 #define DCMI_LSM_ALL 0x00000000U /*!< Interface captures all received lines */ 00139 #define DCMI_LSM_ALTERNATE_2 ((uint32_t)DCMI_CR_LSM) /*!< Interface captures one line out of two */ 00140 00141 /** 00142 * @} 00143 */ 00144 00145 /** @defgroup DCMIEx_Line_Select_Start DCMI Line Select Start 00146 * @{ 00147 */ 00148 #define DCMI_OELS_ODD 0x00000000U /*!< Interface captures first line from the frame start, second one being dropped */ 00149 #define DCMI_OELS_EVEN ((uint32_t)DCMI_CR_OELS) /*!< Interface captures second line from the frame start, first one being dropped */ 00150 00151 /** 00152 * @} 00153 */ 00154 00155 /** 00156 * @} 00157 */ 00158 #endif /* STM32F446xx || STM32F469xx || STM32F479xx */ 00159 00160 /* Exported macro ------------------------------------------------------------*/ 00161 /* Exported functions --------------------------------------------------------*/ 00162 /* Private types -------------------------------------------------------------*/ 00163 /* Private variables ---------------------------------------------------------*/ 00164 /* Private constants ---------------------------------------------------------*/ 00165 #define DCMI_POSITION_ESCR_LSC (uint32_t)DCMI_ESCR_LSC_Pos /*!< Required left shift to set line start delimiter */ 00166 #define DCMI_POSITION_ESCR_LEC (uint32_t)DCMI_ESCR_LEC_Pos /*!< Required left shift to set line end delimiter */ 00167 #define DCMI_POSITION_ESCR_FEC (uint32_t)DCMI_ESCR_FEC_Pos /*!< Required left shift to set frame end delimiter */ 00168 00169 /* Private macro -------------------------------------------------------------*/ 00170 #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) 00171 /** @defgroup DCMIEx_Private_Macros DCMI Extended Private Macros 00172 * @{ 00173 */ 00174 #define IS_DCMI_BYTE_SELECT_MODE(MODE)(((MODE) == DCMI_BSM_ALL) || \ 00175 ((MODE) == DCMI_BSM_OTHER) || \ 00176 ((MODE) == DCMI_BSM_ALTERNATE_4) || \ 00177 ((MODE) == DCMI_BSM_ALTERNATE_2)) 00178 00179 #define IS_DCMI_BYTE_SELECT_START(POLARITY)(((POLARITY) == DCMI_OEBS_ODD) || \ 00180 ((POLARITY) == DCMI_OEBS_EVEN)) 00181 00182 #define IS_DCMI_LINE_SELECT_MODE(MODE)(((MODE) == DCMI_LSM_ALL) || \ 00183 ((MODE) == DCMI_LSM_ALTERNATE_2)) 00184 00185 #define IS_DCMI_LINE_SELECT_START(POLARITY)(((POLARITY) == DCMI_OELS_ODD) || \ 00186 ((POLARITY) == DCMI_OELS_EVEN)) 00187 #endif /* STM32F446xx || STM32F469xx || STM32F479xx */ 00188 /** 00189 * @} 00190 */ 00191 00192 /* Private functions ---------------------------------------------------------*/ 00193 #endif /* STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx ||\ 00194 STM32F429xx || STM32F439xx || STM32F446xx || STM32F469xx ||\ 00195 STM32F479xx */ 00196 00197 00198 /** 00199 * @} 00200 */ 00201 00202 /** 00203 * @} 00204 */ 00205 00206 #ifdef __cplusplus 00207 } 00208 #endif 00209 00210 #endif /* __STM32F4xx_HAL_DCMI_H */ 00211 00212 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/