Ricardo Benitez / mbed

Fork of mbed by mbed official

Committer:
Kojto
Date:
Tue Mar 15 14:34:00 2016 +0000
Revision:
116:c0f6e94411f5
Parent:
115:87f2f5183dfb
Release 116 of the mbed library

Changes:
- new targets - NUCLEO_L073RZ
- fixes to IOTSS BEID platform
- LPC824, LPC1549 and LPC11U68 - fix PWMOut SCT bugs
- STM32F7 - Cube driver
- STM32F4 - add RTC LSI macro, defined as 0
- STM32F3 - fix multiple ADC clock initialization
- retarget - binary mode fix for GCC

Who changed what in which revision?

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