Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
elijahorr
Date:
Thu Apr 14 07:28:54 2016 +0000
Revision:
121:672067c3ada4
Parent:
112:6f327212ef96
.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 112:6f327212ef96 1 /**
Kojto 112:6f327212ef96 2 ******************************************************************************
Kojto 112:6f327212ef96 3 * @file stm32f4xx_hal_adc.h
Kojto 112:6f327212ef96 4 * @author MCD Application Team
Kojto 112:6f327212ef96 5 * @version V1.4.1
Kojto 112:6f327212ef96 6 * @date 09-October-2015
Kojto 112:6f327212ef96 7 * @brief Header file containing functions prototypes of ADC HAL library.
Kojto 112:6f327212ef96 8 ******************************************************************************
Kojto 112:6f327212ef96 9 * @attention
Kojto 112:6f327212ef96 10 *
Kojto 112:6f327212ef96 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
Kojto 112:6f327212ef96 12 *
Kojto 112:6f327212ef96 13 * Redistribution and use in source and binary forms, with or without modification,
Kojto 112:6f327212ef96 14 * are permitted provided that the following conditions are met:
Kojto 112:6f327212ef96 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 112:6f327212ef96 16 * this list of conditions and the following disclaimer.
Kojto 112:6f327212ef96 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 112:6f327212ef96 18 * this list of conditions and the following disclaimer in the documentation
Kojto 112:6f327212ef96 19 * and/or other materials provided with the distribution.
Kojto 112:6f327212ef96 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 112:6f327212ef96 21 * may be used to endorse or promote products derived from this software
Kojto 112:6f327212ef96 22 * without specific prior written permission.
Kojto 112:6f327212ef96 23 *
Kojto 112:6f327212ef96 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 112:6f327212ef96 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 112:6f327212ef96 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 112:6f327212ef96 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 112:6f327212ef96 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 112:6f327212ef96 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 112:6f327212ef96 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 112:6f327212ef96 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 112:6f327212ef96 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 112:6f327212ef96 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 112:6f327212ef96 34 *
Kojto 112:6f327212ef96 35 ******************************************************************************
Kojto 112:6f327212ef96 36 */
Kojto 112:6f327212ef96 37
Kojto 112:6f327212ef96 38 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 112:6f327212ef96 39 #ifndef __STM32F4xx_ADC_H
Kojto 112:6f327212ef96 40 #define __STM32F4xx_ADC_H
Kojto 112:6f327212ef96 41
Kojto 112:6f327212ef96 42 #ifdef __cplusplus
Kojto 112:6f327212ef96 43 extern "C" {
Kojto 112:6f327212ef96 44 #endif
Kojto 112:6f327212ef96 45
Kojto 112:6f327212ef96 46 /* Includes ------------------------------------------------------------------*/
Kojto 112:6f327212ef96 47 #include "stm32f4xx_hal_def.h"
Kojto 112:6f327212ef96 48
Kojto 112:6f327212ef96 49 /** @addtogroup STM32F4xx_HAL_Driver
Kojto 112:6f327212ef96 50 * @{
Kojto 112:6f327212ef96 51 */
Kojto 112:6f327212ef96 52
Kojto 112:6f327212ef96 53 /** @addtogroup ADC
Kojto 112:6f327212ef96 54 * @{
Kojto 112:6f327212ef96 55 */
Kojto 112:6f327212ef96 56
Kojto 112:6f327212ef96 57 /* Exported types ------------------------------------------------------------*/
Kojto 112:6f327212ef96 58 /** @defgroup ADC_Exported_Types ADC Exported Types
Kojto 112:6f327212ef96 59 * @{
Kojto 112:6f327212ef96 60 */
Kojto 112:6f327212ef96 61
Kojto 112:6f327212ef96 62 /**
Kojto 112:6f327212ef96 63 * @brief HAL State structures definition
Kojto 112:6f327212ef96 64 */
Kojto 112:6f327212ef96 65 typedef enum
Kojto 112:6f327212ef96 66 {
Kojto 112:6f327212ef96 67 HAL_ADC_STATE_RESET = 0x00, /*!< ADC not yet initialized or disabled */
Kojto 112:6f327212ef96 68 HAL_ADC_STATE_READY = 0x01, /*!< ADC peripheral ready for use */
Kojto 112:6f327212ef96 69 HAL_ADC_STATE_BUSY = 0x02, /*!< An internal process is ongoing */
Kojto 112:6f327212ef96 70 HAL_ADC_STATE_BUSY_REG = 0x12, /*!< Regular conversion is ongoing */
Kojto 112:6f327212ef96 71 HAL_ADC_STATE_BUSY_INJ = 0x22, /*!< Injected conversion is ongoing */
Kojto 112:6f327212ef96 72 HAL_ADC_STATE_BUSY_INJ_REG = 0x32, /*!< Injected and regular conversion are ongoing */
Kojto 112:6f327212ef96 73 HAL_ADC_STATE_TIMEOUT = 0x03, /*!< Timeout state */
Kojto 112:6f327212ef96 74 HAL_ADC_STATE_ERROR = 0x04, /*!< ADC state error */
Kojto 112:6f327212ef96 75 HAL_ADC_STATE_EOC = 0x05, /*!< Conversion is completed */
Kojto 112:6f327212ef96 76 HAL_ADC_STATE_EOC_REG = 0x15, /*!< Regular conversion is completed */
Kojto 112:6f327212ef96 77 HAL_ADC_STATE_EOC_INJ = 0x25, /*!< Injected conversion is completed */
Kojto 112:6f327212ef96 78 HAL_ADC_STATE_EOC_INJ_REG = 0x35, /*!< Injected and regular conversion are completed */
Kojto 112:6f327212ef96 79 HAL_ADC_STATE_AWD = 0x06 /*!< ADC state analog watchdog */
Kojto 112:6f327212ef96 80
Kojto 112:6f327212ef96 81 }HAL_ADC_StateTypeDef;
Kojto 112:6f327212ef96 82
Kojto 112:6f327212ef96 83 /**
Kojto 112:6f327212ef96 84 * @brief ADC Init structure definition
Kojto 112:6f327212ef96 85 */
Kojto 112:6f327212ef96 86 typedef struct
Kojto 112:6f327212ef96 87 {
Kojto 112:6f327212ef96 88 uint32_t ClockPrescaler; /*!< Select the frequency of the clock to the ADC. The clock is common for
Kojto 112:6f327212ef96 89 all the ADCs.
Kojto 112:6f327212ef96 90 This parameter can be a value of @ref ADC_ClockPrescaler */
Kojto 112:6f327212ef96 91 uint32_t Resolution; /*!< Configures the ADC resolution dual mode.
Kojto 112:6f327212ef96 92 This parameter can be a value of @ref ADC_Resolution */
Kojto 112:6f327212ef96 93 uint32_t DataAlign; /*!< Specifies whether the ADC data alignment is left or right.
Kojto 112:6f327212ef96 94 This parameter can be a value of @ref ADC_data_align */
Kojto 112:6f327212ef96 95 uint32_t ScanConvMode; /*!< Specifies whether the conversion is performed in Scan (multi channels) or
Kojto 112:6f327212ef96 96 Single (one channel) mode.
Kojto 112:6f327212ef96 97 This parameter can be set to ENABLE or DISABLE */
Kojto 112:6f327212ef96 98 uint32_t EOCSelection; /*!< Specifies whether the EOC flag is set
Kojto 112:6f327212ef96 99 at the end of single channel conversion or at the end of all conversions.
Kojto 112:6f327212ef96 100 This parameter can be a value of @ref ADC_EOCSelection
Kojto 112:6f327212ef96 101 Note: Impact on overrun when not using DMA: When EOCSelection is set to ADC_EOC_SINGLE_CONV,
Kojto 112:6f327212ef96 102 overrun detection is automatically enabled, in this case each conversion data must be read.
Kojto 112:6f327212ef96 103 To perform ADC conversions without having to read all conversion data, this parameter must
Kojto 112:6f327212ef96 104 be set to ADC_EOC_SEQ_CONV */
Kojto 112:6f327212ef96 105 uint32_t ContinuousConvMode; /*!< Specifies whether the conversion is performed in Continuous or Single mode.
Kojto 112:6f327212ef96 106 This parameter can be set to ENABLE or DISABLE. */
Kojto 112:6f327212ef96 107 uint32_t DMAContinuousRequests; /*!< Specifies whether the DMA requests is performed in Continuous or in Single mode.
Kojto 112:6f327212ef96 108 This parameter can be set to ENABLE or DISABLE. */
Kojto 112:6f327212ef96 109 uint32_t NbrOfConversion; /*!< Specifies the number of ADC conversions that will be done using the sequencer for
Kojto 112:6f327212ef96 110 regular channel group.
Kojto 112:6f327212ef96 111 This parameter must be a number between Min_Data = 1 and Max_Data = 16. */
Kojto 112:6f327212ef96 112 uint32_t DiscontinuousConvMode; /*!< Specifies whether the conversion is performed in Discontinuous or not
Kojto 112:6f327212ef96 113 for regular channels.
Kojto 112:6f327212ef96 114 This parameter can be set to ENABLE or DISABLE. */
Kojto 112:6f327212ef96 115 uint32_t NbrOfDiscConversion; /*!< Specifies the number of ADC discontinuous conversions that will be done
Kojto 112:6f327212ef96 116 using the sequencer for regular channel group.
Kojto 112:6f327212ef96 117 This parameter must be a number between Min_Data = 1 and Max_Data = 8. */
Kojto 112:6f327212ef96 118 uint32_t ExternalTrigConv; /*!< Selects the external event used to trigger the conversion start of regular group.
Kojto 112:6f327212ef96 119 If set to ADC_SOFTWARE_START, external triggers are disabled.
Kojto 112:6f327212ef96 120 This parameter can be a value of @ref ADC_External_trigger_Source_Regular
Kojto 112:6f327212ef96 121 Note: This parameter can be modified only if there is no conversion is ongoing. */
Kojto 112:6f327212ef96 122 uint32_t ExternalTrigConvEdge; /*!< Selects the external trigger edge of regular group.
Kojto 112:6f327212ef96 123 If trigger is set to ADC_SOFTWARE_START, this parameter is discarded.
Kojto 112:6f327212ef96 124 This parameter can be a value of @ref ADC_External_trigger_edge_Regular
Kojto 112:6f327212ef96 125 Note: This parameter can be modified only if there is no conversion is ongoing. */
Kojto 112:6f327212ef96 126 }ADC_InitTypeDef;
Kojto 112:6f327212ef96 127
Kojto 112:6f327212ef96 128 /**
Kojto 112:6f327212ef96 129 * @brief ADC handle Structure definition
Kojto 112:6f327212ef96 130 */
Kojto 112:6f327212ef96 131 typedef struct
Kojto 112:6f327212ef96 132 {
Kojto 112:6f327212ef96 133 ADC_TypeDef *Instance; /*!< Register base address */
Kojto 112:6f327212ef96 134
Kojto 112:6f327212ef96 135 ADC_InitTypeDef Init; /*!< ADC required parameters */
Kojto 112:6f327212ef96 136
Kojto 112:6f327212ef96 137 __IO uint32_t NbrOfCurrentConversionRank; /*!< ADC number of current conversion rank */
Kojto 112:6f327212ef96 138
Kojto 112:6f327212ef96 139 DMA_HandleTypeDef *DMA_Handle; /*!< Pointer DMA Handler */
Kojto 112:6f327212ef96 140
Kojto 112:6f327212ef96 141 HAL_LockTypeDef Lock; /*!< ADC locking object */
Kojto 112:6f327212ef96 142
Kojto 112:6f327212ef96 143 __IO HAL_ADC_StateTypeDef State; /*!< ADC communication state */
Kojto 112:6f327212ef96 144
Kojto 112:6f327212ef96 145 __IO uint32_t ErrorCode; /*!< ADC Error code */
Kojto 112:6f327212ef96 146 }ADC_HandleTypeDef;
Kojto 112:6f327212ef96 147
Kojto 112:6f327212ef96 148 /**
Kojto 112:6f327212ef96 149 * @brief ADC Configuration regular Channel structure definition
Kojto 112:6f327212ef96 150 */
Kojto 112:6f327212ef96 151 typedef struct
Kojto 112:6f327212ef96 152 {
Kojto 112:6f327212ef96 153 uint32_t Channel; /*!< The ADC channel to configure.
Kojto 112:6f327212ef96 154 This parameter can be a value of @ref ADC_channels */
Kojto 112:6f327212ef96 155 uint32_t Rank; /*!< The rank in the regular group sequencer.
Kojto 112:6f327212ef96 156 This parameter must be a number between Min_Data = 1 and Max_Data = 16 */
Kojto 112:6f327212ef96 157 uint32_t SamplingTime; /*!< The sample time value to be set for the selected channel.
Kojto 112:6f327212ef96 158 This parameter can be a value of @ref ADC_sampling_times */
Kojto 112:6f327212ef96 159 uint32_t Offset; /*!< Reserved for future use, can be set to 0 */
Kojto 112:6f327212ef96 160 }ADC_ChannelConfTypeDef;
Kojto 112:6f327212ef96 161
Kojto 112:6f327212ef96 162 /**
Kojto 112:6f327212ef96 163 * @brief ADC Configuration multi-mode structure definition
Kojto 112:6f327212ef96 164 */
Kojto 112:6f327212ef96 165 typedef struct
Kojto 112:6f327212ef96 166 {
Kojto 112:6f327212ef96 167 uint32_t WatchdogMode; /*!< Configures the ADC analog watchdog mode.
Kojto 112:6f327212ef96 168 This parameter can be a value of @ref ADC_analog_watchdog_selection */
Kojto 112:6f327212ef96 169 uint32_t HighThreshold; /*!< Configures the ADC analog watchdog High threshold value.
Kojto 112:6f327212ef96 170 This parameter must be a 12-bit value. */
Kojto 112:6f327212ef96 171 uint32_t LowThreshold; /*!< Configures the ADC analog watchdog High threshold value.
Kojto 112:6f327212ef96 172 This parameter must be a 12-bit value. */
Kojto 112:6f327212ef96 173 uint32_t Channel; /*!< Configures ADC channel for the analog watchdog.
Kojto 112:6f327212ef96 174 This parameter has an effect only if watchdog mode is configured on single channel
Kojto 112:6f327212ef96 175 This parameter can be a value of @ref ADC_channels */
Kojto 112:6f327212ef96 176 uint32_t ITMode; /*!< Specifies whether the analog watchdog is configured
Kojto 112:6f327212ef96 177 is interrupt mode or in polling mode.
Kojto 112:6f327212ef96 178 This parameter can be set to ENABLE or DISABLE */
Kojto 112:6f327212ef96 179 uint32_t WatchdogNumber; /*!< Reserved for future use, can be set to 0 */
Kojto 112:6f327212ef96 180 }ADC_AnalogWDGConfTypeDef;
Kojto 112:6f327212ef96 181 /**
Kojto 112:6f327212ef96 182 * @}
Kojto 112:6f327212ef96 183 */
Kojto 112:6f327212ef96 184
Kojto 112:6f327212ef96 185 /* Exported constants --------------------------------------------------------*/
Kojto 112:6f327212ef96 186 /** @defgroup ADC_Exported_Constants ADC Exported Constants
Kojto 112:6f327212ef96 187 * @{
Kojto 112:6f327212ef96 188 */
Kojto 112:6f327212ef96 189
Kojto 112:6f327212ef96 190 /** @defgroup ADC_Error_Code ADC Error Code
Kojto 112:6f327212ef96 191 * @{
Kojto 112:6f327212ef96 192 */
Kojto 112:6f327212ef96 193 #define HAL_ADC_ERROR_NONE ((uint32_t)0x00) /*!< No error */
Kojto 112:6f327212ef96 194 #define HAL_ADC_ERROR_OVR ((uint32_t)0x01) /*!< OVR error */
Kojto 112:6f327212ef96 195 #define HAL_ADC_ERROR_DMA ((uint32_t)0x02) /*!< DMA transfer error */
Kojto 112:6f327212ef96 196 /**
Kojto 112:6f327212ef96 197 * @}
Kojto 112:6f327212ef96 198 */
Kojto 112:6f327212ef96 199
Kojto 112:6f327212ef96 200
Kojto 112:6f327212ef96 201 /** @defgroup ADC_ClockPrescaler ADC Clock Prescaler
Kojto 112:6f327212ef96 202 * @{
Kojto 112:6f327212ef96 203 */
Kojto 112:6f327212ef96 204 #define ADC_CLOCK_SYNC_PCLK_DIV2 ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 205 #define ADC_CLOCK_SYNC_PCLK_DIV4 ((uint32_t)ADC_CCR_ADCPRE_0)
Kojto 112:6f327212ef96 206 #define ADC_CLOCK_SYNC_PCLK_DIV6 ((uint32_t)ADC_CCR_ADCPRE_1)
Kojto 112:6f327212ef96 207 #define ADC_CLOCK_SYNC_PCLK_DIV8 ((uint32_t)ADC_CCR_ADCPRE)
Kojto 112:6f327212ef96 208 /**
Kojto 112:6f327212ef96 209 * @}
Kojto 112:6f327212ef96 210 */
Kojto 112:6f327212ef96 211
Kojto 112:6f327212ef96 212 /** @defgroup ADC_delay_between_2_sampling_phases ADC Delay Between 2 Sampling Phases
Kojto 112:6f327212ef96 213 * @{
Kojto 112:6f327212ef96 214 */
Kojto 112:6f327212ef96 215 #define ADC_TWOSAMPLINGDELAY_5CYCLES ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 216 #define ADC_TWOSAMPLINGDELAY_6CYCLES ((uint32_t)ADC_CCR_DELAY_0)
Kojto 112:6f327212ef96 217 #define ADC_TWOSAMPLINGDELAY_7CYCLES ((uint32_t)ADC_CCR_DELAY_1)
Kojto 112:6f327212ef96 218 #define ADC_TWOSAMPLINGDELAY_8CYCLES ((uint32_t)(ADC_CCR_DELAY_1 | ADC_CCR_DELAY_0))
Kojto 112:6f327212ef96 219 #define ADC_TWOSAMPLINGDELAY_9CYCLES ((uint32_t)ADC_CCR_DELAY_2)
Kojto 112:6f327212ef96 220 #define ADC_TWOSAMPLINGDELAY_10CYCLES ((uint32_t)(ADC_CCR_DELAY_2 | ADC_CCR_DELAY_0))
Kojto 112:6f327212ef96 221 #define ADC_TWOSAMPLINGDELAY_11CYCLES ((uint32_t)(ADC_CCR_DELAY_2 | ADC_CCR_DELAY_1))
Kojto 112:6f327212ef96 222 #define ADC_TWOSAMPLINGDELAY_12CYCLES ((uint32_t)(ADC_CCR_DELAY_2 | ADC_CCR_DELAY_1 | ADC_CCR_DELAY_0))
Kojto 112:6f327212ef96 223 #define ADC_TWOSAMPLINGDELAY_13CYCLES ((uint32_t)ADC_CCR_DELAY_3)
Kojto 112:6f327212ef96 224 #define ADC_TWOSAMPLINGDELAY_14CYCLES ((uint32_t)(ADC_CCR_DELAY_3 | ADC_CCR_DELAY_0))
Kojto 112:6f327212ef96 225 #define ADC_TWOSAMPLINGDELAY_15CYCLES ((uint32_t)(ADC_CCR_DELAY_3 | ADC_CCR_DELAY_1))
Kojto 112:6f327212ef96 226 #define ADC_TWOSAMPLINGDELAY_16CYCLES ((uint32_t)(ADC_CCR_DELAY_3 | ADC_CCR_DELAY_1 | ADC_CCR_DELAY_0))
Kojto 112:6f327212ef96 227 #define ADC_TWOSAMPLINGDELAY_17CYCLES ((uint32_t)(ADC_CCR_DELAY_3 | ADC_CCR_DELAY_2))
Kojto 112:6f327212ef96 228 #define ADC_TWOSAMPLINGDELAY_18CYCLES ((uint32_t)(ADC_CCR_DELAY_3 | ADC_CCR_DELAY_2 | ADC_CCR_DELAY_0))
Kojto 112:6f327212ef96 229 #define ADC_TWOSAMPLINGDELAY_19CYCLES ((uint32_t)(ADC_CCR_DELAY_3 | ADC_CCR_DELAY_2 | ADC_CCR_DELAY_1))
Kojto 112:6f327212ef96 230 #define ADC_TWOSAMPLINGDELAY_20CYCLES ((uint32_t)ADC_CCR_DELAY)
Kojto 112:6f327212ef96 231 /**
Kojto 112:6f327212ef96 232 * @}
Kojto 112:6f327212ef96 233 */
Kojto 112:6f327212ef96 234
Kojto 112:6f327212ef96 235 /** @defgroup ADC_Resolution ADC Resolution
Kojto 112:6f327212ef96 236 * @{
Kojto 112:6f327212ef96 237 */
Kojto 112:6f327212ef96 238 #define ADC_RESOLUTION_12B ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 239 #define ADC_RESOLUTION_10B ((uint32_t)ADC_CR1_RES_0)
Kojto 112:6f327212ef96 240 #define ADC_RESOLUTION_8B ((uint32_t)ADC_CR1_RES_1)
Kojto 112:6f327212ef96 241 #define ADC_RESOLUTION_6B ((uint32_t)ADC_CR1_RES)
Kojto 112:6f327212ef96 242 /**
Kojto 112:6f327212ef96 243 * @}
Kojto 112:6f327212ef96 244 */
Kojto 112:6f327212ef96 245
Kojto 112:6f327212ef96 246 /** @defgroup ADC_External_trigger_edge_Regular ADC External Trigger Edge Regular
Kojto 112:6f327212ef96 247 * @{
Kojto 112:6f327212ef96 248 */
Kojto 112:6f327212ef96 249 #define ADC_EXTERNALTRIGCONVEDGE_NONE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 250 #define ADC_EXTERNALTRIGCONVEDGE_RISING ((uint32_t)ADC_CR2_EXTEN_0)
Kojto 112:6f327212ef96 251 #define ADC_EXTERNALTRIGCONVEDGE_FALLING ((uint32_t)ADC_CR2_EXTEN_1)
Kojto 112:6f327212ef96 252 #define ADC_EXTERNALTRIGCONVEDGE_RISINGFALLING ((uint32_t)ADC_CR2_EXTEN)
Kojto 112:6f327212ef96 253 /**
Kojto 112:6f327212ef96 254 * @}
Kojto 112:6f327212ef96 255 */
Kojto 112:6f327212ef96 256
Kojto 112:6f327212ef96 257 /** @defgroup ADC_External_trigger_Source_Regular ADC External Trigger Source Regular
Kojto 112:6f327212ef96 258 * @{
Kojto 112:6f327212ef96 259 */
Kojto 112:6f327212ef96 260 /* Note: Parameter ADC_SOFTWARE_START is a software parameter used for */
Kojto 112:6f327212ef96 261 /* compatibility with other STM32 devices. */
Kojto 112:6f327212ef96 262 #define ADC_EXTERNALTRIGCONV_T1_CC1 ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 263 #define ADC_EXTERNALTRIGCONV_T1_CC2 ((uint32_t)ADC_CR2_EXTSEL_0)
Kojto 112:6f327212ef96 264 #define ADC_EXTERNALTRIGCONV_T1_CC3 ((uint32_t)ADC_CR2_EXTSEL_1)
Kojto 112:6f327212ef96 265 #define ADC_EXTERNALTRIGCONV_T2_CC2 ((uint32_t)(ADC_CR2_EXTSEL_1 | ADC_CR2_EXTSEL_0))
Kojto 112:6f327212ef96 266 #define ADC_EXTERNALTRIGCONV_T2_CC3 ((uint32_t)ADC_CR2_EXTSEL_2)
Kojto 112:6f327212ef96 267 #define ADC_EXTERNALTRIGCONV_T2_CC4 ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_0))
Kojto 112:6f327212ef96 268 #define ADC_EXTERNALTRIGCONV_T2_TRGO ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_1))
Kojto 112:6f327212ef96 269 #define ADC_EXTERNALTRIGCONV_T3_CC1 ((uint32_t)(ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_1 | ADC_CR2_EXTSEL_0))
Kojto 112:6f327212ef96 270 #define ADC_EXTERNALTRIGCONV_T3_TRGO ((uint32_t)ADC_CR2_EXTSEL_3)
Kojto 112:6f327212ef96 271 #define ADC_EXTERNALTRIGCONV_T4_CC4 ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_0))
Kojto 112:6f327212ef96 272 #define ADC_EXTERNALTRIGCONV_T5_CC1 ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_1))
Kojto 112:6f327212ef96 273 #define ADC_EXTERNALTRIGCONV_T5_CC2 ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_1 | ADC_CR2_EXTSEL_0))
Kojto 112:6f327212ef96 274 #define ADC_EXTERNALTRIGCONV_T5_CC3 ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_2))
Kojto 112:6f327212ef96 275 #define ADC_EXTERNALTRIGCONV_T8_CC1 ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_0))
Kojto 112:6f327212ef96 276 #define ADC_EXTERNALTRIGCONV_T8_TRGO ((uint32_t)(ADC_CR2_EXTSEL_3 | ADC_CR2_EXTSEL_2 | ADC_CR2_EXTSEL_1))
Kojto 112:6f327212ef96 277 #define ADC_EXTERNALTRIGCONV_Ext_IT11 ((uint32_t)ADC_CR2_EXTSEL)
Kojto 112:6f327212ef96 278 #define ADC_SOFTWARE_START ((uint32_t)ADC_CR2_EXTSEL + 1)
Kojto 112:6f327212ef96 279 /**
Kojto 112:6f327212ef96 280 * @}
Kojto 112:6f327212ef96 281 */
Kojto 112:6f327212ef96 282
Kojto 112:6f327212ef96 283 /** @defgroup ADC_data_align ADC Data Align
Kojto 112:6f327212ef96 284 * @{
Kojto 112:6f327212ef96 285 */
Kojto 112:6f327212ef96 286 #define ADC_DATAALIGN_RIGHT ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 287 #define ADC_DATAALIGN_LEFT ((uint32_t)ADC_CR2_ALIGN)
Kojto 112:6f327212ef96 288 /**
Kojto 112:6f327212ef96 289 * @}
Kojto 112:6f327212ef96 290 */
Kojto 112:6f327212ef96 291
Kojto 112:6f327212ef96 292 /** @defgroup ADC_channels ADC Common Channels
Kojto 112:6f327212ef96 293 * @{
Kojto 112:6f327212ef96 294 */
Kojto 112:6f327212ef96 295 #define ADC_CHANNEL_0 ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 296 #define ADC_CHANNEL_1 ((uint32_t)ADC_CR1_AWDCH_0)
Kojto 112:6f327212ef96 297 #define ADC_CHANNEL_2 ((uint32_t)ADC_CR1_AWDCH_1)
Kojto 112:6f327212ef96 298 #define ADC_CHANNEL_3 ((uint32_t)(ADC_CR1_AWDCH_1 | ADC_CR1_AWDCH_0))
Kojto 112:6f327212ef96 299 #define ADC_CHANNEL_4 ((uint32_t)ADC_CR1_AWDCH_2)
Kojto 112:6f327212ef96 300 #define ADC_CHANNEL_5 ((uint32_t)(ADC_CR1_AWDCH_2 | ADC_CR1_AWDCH_0))
Kojto 112:6f327212ef96 301 #define ADC_CHANNEL_6 ((uint32_t)(ADC_CR1_AWDCH_2 | ADC_CR1_AWDCH_1))
Kojto 112:6f327212ef96 302 #define ADC_CHANNEL_7 ((uint32_t)(ADC_CR1_AWDCH_2 | ADC_CR1_AWDCH_1 | ADC_CR1_AWDCH_0))
Kojto 112:6f327212ef96 303 #define ADC_CHANNEL_8 ((uint32_t)ADC_CR1_AWDCH_3)
Kojto 112:6f327212ef96 304 #define ADC_CHANNEL_9 ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_0))
Kojto 112:6f327212ef96 305 #define ADC_CHANNEL_10 ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_1))
Kojto 112:6f327212ef96 306 #define ADC_CHANNEL_11 ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_1 | ADC_CR1_AWDCH_0))
Kojto 112:6f327212ef96 307 #define ADC_CHANNEL_12 ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_2))
Kojto 112:6f327212ef96 308 #define ADC_CHANNEL_13 ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_2 | ADC_CR1_AWDCH_0))
Kojto 112:6f327212ef96 309 #define ADC_CHANNEL_14 ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_2 | ADC_CR1_AWDCH_1))
Kojto 112:6f327212ef96 310 #define ADC_CHANNEL_15 ((uint32_t)(ADC_CR1_AWDCH_3 | ADC_CR1_AWDCH_2 | ADC_CR1_AWDCH_1 | ADC_CR1_AWDCH_0))
Kojto 112:6f327212ef96 311 #define ADC_CHANNEL_16 ((uint32_t)ADC_CR1_AWDCH_4)
Kojto 112:6f327212ef96 312 #define ADC_CHANNEL_17 ((uint32_t)(ADC_CR1_AWDCH_4 | ADC_CR1_AWDCH_0))
Kojto 112:6f327212ef96 313 #define ADC_CHANNEL_18 ((uint32_t)(ADC_CR1_AWDCH_4 | ADC_CR1_AWDCH_1))
Kojto 112:6f327212ef96 314
Kojto 112:6f327212ef96 315 #define ADC_CHANNEL_VREFINT ((uint32_t)ADC_CHANNEL_17)
Kojto 112:6f327212ef96 316 #define ADC_CHANNEL_VBAT ((uint32_t)ADC_CHANNEL_18)
Kojto 112:6f327212ef96 317 /**
Kojto 112:6f327212ef96 318 * @}
Kojto 112:6f327212ef96 319 */
Kojto 112:6f327212ef96 320
Kojto 112:6f327212ef96 321 /** @defgroup ADC_sampling_times ADC Sampling Times
Kojto 112:6f327212ef96 322 * @{
Kojto 112:6f327212ef96 323 */
Kojto 112:6f327212ef96 324 #define ADC_SAMPLETIME_3CYCLES ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 325 #define ADC_SAMPLETIME_15CYCLES ((uint32_t)ADC_SMPR1_SMP10_0)
Kojto 112:6f327212ef96 326 #define ADC_SAMPLETIME_28CYCLES ((uint32_t)ADC_SMPR1_SMP10_1)
Kojto 112:6f327212ef96 327 #define ADC_SAMPLETIME_56CYCLES ((uint32_t)(ADC_SMPR1_SMP10_1 | ADC_SMPR1_SMP10_0))
Kojto 112:6f327212ef96 328 #define ADC_SAMPLETIME_84CYCLES ((uint32_t)ADC_SMPR1_SMP10_2)
Kojto 112:6f327212ef96 329 #define ADC_SAMPLETIME_112CYCLES ((uint32_t)(ADC_SMPR1_SMP10_2 | ADC_SMPR1_SMP10_0))
Kojto 112:6f327212ef96 330 #define ADC_SAMPLETIME_144CYCLES ((uint32_t)(ADC_SMPR1_SMP10_2 | ADC_SMPR1_SMP10_1))
Kojto 112:6f327212ef96 331 #define ADC_SAMPLETIME_480CYCLES ((uint32_t)ADC_SMPR1_SMP10)
Kojto 112:6f327212ef96 332 /**
Kojto 112:6f327212ef96 333 * @}
Kojto 112:6f327212ef96 334 */
Kojto 112:6f327212ef96 335
Kojto 112:6f327212ef96 336 /** @defgroup ADC_EOCSelection ADC EOC Selection
Kojto 112:6f327212ef96 337 * @{
Kojto 112:6f327212ef96 338 */
Kojto 112:6f327212ef96 339 #define ADC_EOC_SEQ_CONV ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 340 #define ADC_EOC_SINGLE_CONV ((uint32_t)0x00000001)
Kojto 112:6f327212ef96 341 #define ADC_EOC_SINGLE_SEQ_CONV ((uint32_t)0x00000002) /*!< reserved for future use */
Kojto 112:6f327212ef96 342 /**
Kojto 112:6f327212ef96 343 * @}
Kojto 112:6f327212ef96 344 */
Kojto 112:6f327212ef96 345
Kojto 112:6f327212ef96 346 /** @defgroup ADC_Event_type ADC Event Type
Kojto 112:6f327212ef96 347 * @{
Kojto 112:6f327212ef96 348 */
Kojto 112:6f327212ef96 349 #define ADC_AWD_EVENT ((uint32_t)ADC_FLAG_AWD)
Kojto 112:6f327212ef96 350 #define ADC_OVR_EVENT ((uint32_t)ADC_FLAG_OVR)
Kojto 112:6f327212ef96 351 /**
Kojto 112:6f327212ef96 352 * @}
Kojto 112:6f327212ef96 353 */
Kojto 112:6f327212ef96 354
Kojto 112:6f327212ef96 355 /** @defgroup ADC_analog_watchdog_selection ADC Analog Watchdog Selection
Kojto 112:6f327212ef96 356 * @{
Kojto 112:6f327212ef96 357 */
Kojto 112:6f327212ef96 358 #define ADC_ANALOGWATCHDOG_SINGLE_REG ((uint32_t)(ADC_CR1_AWDSGL | ADC_CR1_AWDEN))
Kojto 112:6f327212ef96 359 #define ADC_ANALOGWATCHDOG_SINGLE_INJEC ((uint32_t)(ADC_CR1_AWDSGL | ADC_CR1_JAWDEN))
Kojto 112:6f327212ef96 360 #define ADC_ANALOGWATCHDOG_SINGLE_REGINJEC ((uint32_t)(ADC_CR1_AWDSGL | ADC_CR1_AWDEN | ADC_CR1_JAWDEN))
Kojto 112:6f327212ef96 361 #define ADC_ANALOGWATCHDOG_ALL_REG ((uint32_t)ADC_CR1_AWDEN)
Kojto 112:6f327212ef96 362 #define ADC_ANALOGWATCHDOG_ALL_INJEC ((uint32_t)ADC_CR1_JAWDEN)
Kojto 112:6f327212ef96 363 #define ADC_ANALOGWATCHDOG_ALL_REGINJEC ((uint32_t)(ADC_CR1_AWDEN | ADC_CR1_JAWDEN))
Kojto 112:6f327212ef96 364 #define ADC_ANALOGWATCHDOG_NONE ((uint32_t)0x00000000)
Kojto 112:6f327212ef96 365 /**
Kojto 112:6f327212ef96 366 * @}
Kojto 112:6f327212ef96 367 */
Kojto 112:6f327212ef96 368
Kojto 112:6f327212ef96 369 /** @defgroup ADC_interrupts_definition ADC Interrupts Definition
Kojto 112:6f327212ef96 370 * @{
Kojto 112:6f327212ef96 371 */
Kojto 112:6f327212ef96 372 #define ADC_IT_EOC ((uint32_t)ADC_CR1_EOCIE)
Kojto 112:6f327212ef96 373 #define ADC_IT_AWD ((uint32_t)ADC_CR1_AWDIE)
Kojto 112:6f327212ef96 374 #define ADC_IT_JEOC ((uint32_t)ADC_CR1_JEOCIE)
Kojto 112:6f327212ef96 375 #define ADC_IT_OVR ((uint32_t)ADC_CR1_OVRIE)
Kojto 112:6f327212ef96 376 /**
Kojto 112:6f327212ef96 377 * @}
Kojto 112:6f327212ef96 378 */
Kojto 112:6f327212ef96 379
Kojto 112:6f327212ef96 380 /** @defgroup ADC_flags_definition ADC Flags Definition
Kojto 112:6f327212ef96 381 * @{
Kojto 112:6f327212ef96 382 */
Kojto 112:6f327212ef96 383 #define ADC_FLAG_AWD ((uint32_t)ADC_SR_AWD)
Kojto 112:6f327212ef96 384 #define ADC_FLAG_EOC ((uint32_t)ADC_SR_EOC)
Kojto 112:6f327212ef96 385 #define ADC_FLAG_JEOC ((uint32_t)ADC_SR_JEOC)
Kojto 112:6f327212ef96 386 #define ADC_FLAG_JSTRT ((uint32_t)ADC_SR_JSTRT)
Kojto 112:6f327212ef96 387 #define ADC_FLAG_STRT ((uint32_t)ADC_SR_STRT)
Kojto 112:6f327212ef96 388 #define ADC_FLAG_OVR ((uint32_t)ADC_SR_OVR)
Kojto 112:6f327212ef96 389 /**
Kojto 112:6f327212ef96 390 * @}
Kojto 112:6f327212ef96 391 */
Kojto 112:6f327212ef96 392
Kojto 112:6f327212ef96 393 /** @defgroup ADC_channels_type ADC Channels Type
Kojto 112:6f327212ef96 394 * @{
Kojto 112:6f327212ef96 395 */
Kojto 112:6f327212ef96 396 #define ADC_ALL_CHANNELS ((uint32_t)0x00000001)
Kojto 112:6f327212ef96 397 #define ADC_REGULAR_CHANNELS ((uint32_t)0x00000002) /*!< reserved for future use */
Kojto 112:6f327212ef96 398 #define ADC_INJECTED_CHANNELS ((uint32_t)0x00000003) /*!< reserved for future use */
Kojto 112:6f327212ef96 399 /**
Kojto 112:6f327212ef96 400 * @}
Kojto 112:6f327212ef96 401 */
Kojto 112:6f327212ef96 402
Kojto 112:6f327212ef96 403 /**
Kojto 112:6f327212ef96 404 * @}
Kojto 112:6f327212ef96 405 */
Kojto 112:6f327212ef96 406
Kojto 112:6f327212ef96 407 /* Exported macro ------------------------------------------------------------*/
Kojto 112:6f327212ef96 408 /** @defgroup ADC_Exported_Macros ADC Exported Macros
Kojto 112:6f327212ef96 409 * @{
Kojto 112:6f327212ef96 410 */
Kojto 112:6f327212ef96 411
Kojto 112:6f327212ef96 412 /** @brief Reset ADC handle state
Kojto 112:6f327212ef96 413 * @param __HANDLE__: ADC handle
Kojto 112:6f327212ef96 414 * @retval None
Kojto 112:6f327212ef96 415 */
Kojto 112:6f327212ef96 416 #define __HAL_ADC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_ADC_STATE_RESET)
Kojto 112:6f327212ef96 417
Kojto 112:6f327212ef96 418 /**
Kojto 112:6f327212ef96 419 * @brief Enable the ADC peripheral.
Kojto 112:6f327212ef96 420 * @param __HANDLE__: ADC handle
Kojto 112:6f327212ef96 421 * @retval None
Kojto 112:6f327212ef96 422 */
Kojto 112:6f327212ef96 423 #define __HAL_ADC_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR2 |= ADC_CR2_ADON)
Kojto 112:6f327212ef96 424
Kojto 112:6f327212ef96 425 /**
Kojto 112:6f327212ef96 426 * @brief Disable the ADC peripheral.
Kojto 112:6f327212ef96 427 * @param __HANDLE__: ADC handle
Kojto 112:6f327212ef96 428 * @retval None
Kojto 112:6f327212ef96 429 */
Kojto 112:6f327212ef96 430 #define __HAL_ADC_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR2 &= ~ADC_CR2_ADON)
Kojto 112:6f327212ef96 431
Kojto 112:6f327212ef96 432 /**
Kojto 112:6f327212ef96 433 * @brief Enable the ADC end of conversion interrupt.
Kojto 112:6f327212ef96 434 * @param __HANDLE__: specifies the ADC Handle.
Kojto 112:6f327212ef96 435 * @param __INTERRUPT__: ADC Interrupt.
Kojto 112:6f327212ef96 436 * @retval None
Kojto 112:6f327212ef96 437 */
Kojto 112:6f327212ef96 438 #define __HAL_ADC_ENABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR1) |= (__INTERRUPT__))
Kojto 112:6f327212ef96 439
Kojto 112:6f327212ef96 440 /**
Kojto 112:6f327212ef96 441 * @brief Disable the ADC end of conversion interrupt.
Kojto 112:6f327212ef96 442 * @param __HANDLE__: specifies the ADC Handle.
Kojto 112:6f327212ef96 443 * @param __INTERRUPT__: ADC interrupt.
Kojto 112:6f327212ef96 444 * @retval None
Kojto 112:6f327212ef96 445 */
Kojto 112:6f327212ef96 446 #define __HAL_ADC_DISABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR1) &= ~(__INTERRUPT__))
Kojto 112:6f327212ef96 447
Kojto 112:6f327212ef96 448 /** @brief Check if the specified ADC interrupt source is enabled or disabled.
Kojto 112:6f327212ef96 449 * @param __HANDLE__: specifies the ADC Handle.
Kojto 112:6f327212ef96 450 * @param __INTERRUPT__: specifies the ADC interrupt source to check.
Kojto 112:6f327212ef96 451 * @retval The new state of __IT__ (TRUE or FALSE).
Kojto 112:6f327212ef96 452 */
Kojto 112:6f327212ef96 453 #define __HAL_ADC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR1 & (__INTERRUPT__)) == (__INTERRUPT__))
Kojto 112:6f327212ef96 454
Kojto 112:6f327212ef96 455 /**
Kojto 112:6f327212ef96 456 * @brief Clear the ADC's pending flags.
Kojto 112:6f327212ef96 457 * @param __HANDLE__: specifies the ADC Handle.
Kojto 112:6f327212ef96 458 * @param __FLAG__: ADC flag.
Kojto 112:6f327212ef96 459 * @retval None
Kojto 112:6f327212ef96 460 */
Kojto 112:6f327212ef96 461 #define __HAL_ADC_CLEAR_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR) = ~(__FLAG__))
Kojto 112:6f327212ef96 462
Kojto 112:6f327212ef96 463 /**
Kojto 112:6f327212ef96 464 * @brief Get the selected ADC's flag status.
Kojto 112:6f327212ef96 465 * @param __HANDLE__: specifies the ADC Handle.
Kojto 112:6f327212ef96 466 * @param __FLAG__: ADC flag.
Kojto 112:6f327212ef96 467 * @retval None
Kojto 112:6f327212ef96 468 */
Kojto 112:6f327212ef96 469 #define __HAL_ADC_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))
Kojto 112:6f327212ef96 470
Kojto 112:6f327212ef96 471 /**
Kojto 112:6f327212ef96 472 * @}
Kojto 112:6f327212ef96 473 */
Kojto 112:6f327212ef96 474
Kojto 112:6f327212ef96 475 /* Include ADC HAL Extension module */
Kojto 112:6f327212ef96 476 #include "stm32f4xx_hal_adc_ex.h"
Kojto 112:6f327212ef96 477
Kojto 112:6f327212ef96 478 /* Exported functions --------------------------------------------------------*/
Kojto 112:6f327212ef96 479 /** @addtogroup ADC_Exported_Functions
Kojto 112:6f327212ef96 480 * @{
Kojto 112:6f327212ef96 481 */
Kojto 112:6f327212ef96 482
Kojto 112:6f327212ef96 483 /** @addtogroup ADC_Exported_Functions_Group1
Kojto 112:6f327212ef96 484 * @{
Kojto 112:6f327212ef96 485 */
Kojto 112:6f327212ef96 486 /* Initialization/de-initialization functions ***********************************/
Kojto 112:6f327212ef96 487 HAL_StatusTypeDef HAL_ADC_Init(ADC_HandleTypeDef* hadc);
Kojto 112:6f327212ef96 488 HAL_StatusTypeDef HAL_ADC_DeInit(ADC_HandleTypeDef *hadc);
Kojto 112:6f327212ef96 489 void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc);
Kojto 112:6f327212ef96 490 void HAL_ADC_MspDeInit(ADC_HandleTypeDef* hadc);
Kojto 112:6f327212ef96 491 /**
Kojto 112:6f327212ef96 492 * @}
Kojto 112:6f327212ef96 493 */
Kojto 112:6f327212ef96 494
Kojto 112:6f327212ef96 495 /** @addtogroup ADC_Exported_Functions_Group2
Kojto 112:6f327212ef96 496 * @{
Kojto 112:6f327212ef96 497 */
Kojto 112:6f327212ef96 498 /* I/O operation functions ******************************************************/
Kojto 112:6f327212ef96 499 HAL_StatusTypeDef HAL_ADC_Start(ADC_HandleTypeDef* hadc);
Kojto 112:6f327212ef96 500 HAL_StatusTypeDef HAL_ADC_Stop(ADC_HandleTypeDef* hadc);
Kojto 112:6f327212ef96 501 HAL_StatusTypeDef HAL_ADC_PollForConversion(ADC_HandleTypeDef* hadc, uint32_t Timeout);
Kojto 112:6f327212ef96 502
Kojto 112:6f327212ef96 503 HAL_StatusTypeDef HAL_ADC_PollForEvent(ADC_HandleTypeDef* hadc, uint32_t EventType, uint32_t Timeout);
Kojto 112:6f327212ef96 504
Kojto 112:6f327212ef96 505 HAL_StatusTypeDef HAL_ADC_Start_IT(ADC_HandleTypeDef* hadc);
Kojto 112:6f327212ef96 506 HAL_StatusTypeDef HAL_ADC_Stop_IT(ADC_HandleTypeDef* hadc);
Kojto 112:6f327212ef96 507
Kojto 112:6f327212ef96 508 void HAL_ADC_IRQHandler(ADC_HandleTypeDef* hadc);
Kojto 112:6f327212ef96 509
Kojto 112:6f327212ef96 510 HAL_StatusTypeDef HAL_ADC_Start_DMA(ADC_HandleTypeDef* hadc, uint32_t* pData, uint32_t Length);
Kojto 112:6f327212ef96 511 HAL_StatusTypeDef HAL_ADC_Stop_DMA(ADC_HandleTypeDef* hadc);
Kojto 112:6f327212ef96 512
Kojto 112:6f327212ef96 513 uint32_t HAL_ADC_GetValue(ADC_HandleTypeDef* hadc);
Kojto 112:6f327212ef96 514
Kojto 112:6f327212ef96 515 void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc);
Kojto 112:6f327212ef96 516 void HAL_ADC_ConvHalfCpltCallback(ADC_HandleTypeDef* hadc);
Kojto 112:6f327212ef96 517 void HAL_ADC_LevelOutOfWindowCallback(ADC_HandleTypeDef* hadc);
Kojto 112:6f327212ef96 518 void HAL_ADC_ErrorCallback(ADC_HandleTypeDef *hadc);
Kojto 112:6f327212ef96 519 /**
Kojto 112:6f327212ef96 520 * @}
Kojto 112:6f327212ef96 521 */
Kojto 112:6f327212ef96 522
Kojto 112:6f327212ef96 523 /** @addtogroup ADC_Exported_Functions_Group3
Kojto 112:6f327212ef96 524 * @{
Kojto 112:6f327212ef96 525 */
Kojto 112:6f327212ef96 526 /* Peripheral Control functions *************************************************/
Kojto 112:6f327212ef96 527 HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef* hadc, ADC_ChannelConfTypeDef* sConfig);
Kojto 112:6f327212ef96 528 HAL_StatusTypeDef HAL_ADC_AnalogWDGConfig(ADC_HandleTypeDef* hadc, ADC_AnalogWDGConfTypeDef* AnalogWDGConfig);
Kojto 112:6f327212ef96 529 /**
Kojto 112:6f327212ef96 530 * @}
Kojto 112:6f327212ef96 531 */
Kojto 112:6f327212ef96 532
Kojto 112:6f327212ef96 533 /** @addtogroup ADC_Exported_Functions_Group4
Kojto 112:6f327212ef96 534 * @{
Kojto 112:6f327212ef96 535 */
Kojto 112:6f327212ef96 536 /* Peripheral State functions ***************************************************/
Kojto 112:6f327212ef96 537 HAL_ADC_StateTypeDef HAL_ADC_GetState(ADC_HandleTypeDef* hadc);
Kojto 112:6f327212ef96 538 uint32_t HAL_ADC_GetError(ADC_HandleTypeDef *hadc);
Kojto 112:6f327212ef96 539 /**
Kojto 112:6f327212ef96 540 * @}
Kojto 112:6f327212ef96 541 */
Kojto 112:6f327212ef96 542
Kojto 112:6f327212ef96 543 /**
Kojto 112:6f327212ef96 544 * @}
Kojto 112:6f327212ef96 545 */
Kojto 112:6f327212ef96 546 /* Private types -------------------------------------------------------------*/
Kojto 112:6f327212ef96 547 /* Private variables ---------------------------------------------------------*/
Kojto 112:6f327212ef96 548 /* Private constants ---------------------------------------------------------*/
Kojto 112:6f327212ef96 549 /** @defgroup ADC_Private_Constants ADC Private Constants
Kojto 112:6f327212ef96 550 * @{
Kojto 112:6f327212ef96 551 */
Kojto 112:6f327212ef96 552 /* Delay for ADC stabilization time. */
Kojto 112:6f327212ef96 553 /* Maximum delay is 1us (refer to device datasheet, parameter tSTAB). */
Kojto 112:6f327212ef96 554 /* Unit: us */
Kojto 112:6f327212ef96 555 #define ADC_STAB_DELAY_US ((uint32_t) 3)
Kojto 112:6f327212ef96 556 /* Delay for temperature sensor stabilization time. */
Kojto 112:6f327212ef96 557 /* Maximum delay is 10us (refer to device datasheet, parameter tSTART). */
Kojto 112:6f327212ef96 558 /* Unit: us */
Kojto 112:6f327212ef96 559 #define ADC_TEMPSENSOR_DELAY_US ((uint32_t) 10)
Kojto 112:6f327212ef96 560 /**
Kojto 112:6f327212ef96 561 * @}
Kojto 112:6f327212ef96 562 */
Kojto 112:6f327212ef96 563
Kojto 112:6f327212ef96 564 /* Private macros ------------------------------------------------------------*/
Kojto 112:6f327212ef96 565 /** @defgroup ADC_Private_Macros ADC Private Macros
Kojto 112:6f327212ef96 566 * @{
Kojto 112:6f327212ef96 567 */
Kojto 112:6f327212ef96 568 #define IS_ADC_CLOCKPRESCALER(ADC_CLOCK) (((ADC_CLOCK) == ADC_CLOCK_SYNC_PCLK_DIV2) || \
Kojto 112:6f327212ef96 569 ((ADC_CLOCK) == ADC_CLOCK_SYNC_PCLK_DIV4) || \
Kojto 112:6f327212ef96 570 ((ADC_CLOCK) == ADC_CLOCK_SYNC_PCLK_DIV6) || \
Kojto 112:6f327212ef96 571 ((ADC_CLOCK) == ADC_CLOCK_SYNC_PCLK_DIV8))
Kojto 112:6f327212ef96 572 #define IS_ADC_SAMPLING_DELAY(DELAY) (((DELAY) == ADC_TWOSAMPLINGDELAY_5CYCLES) || \
Kojto 112:6f327212ef96 573 ((DELAY) == ADC_TWOSAMPLINGDELAY_6CYCLES) || \
Kojto 112:6f327212ef96 574 ((DELAY) == ADC_TWOSAMPLINGDELAY_7CYCLES) || \
Kojto 112:6f327212ef96 575 ((DELAY) == ADC_TWOSAMPLINGDELAY_8CYCLES) || \
Kojto 112:6f327212ef96 576 ((DELAY) == ADC_TWOSAMPLINGDELAY_9CYCLES) || \
Kojto 112:6f327212ef96 577 ((DELAY) == ADC_TWOSAMPLINGDELAY_10CYCLES) || \
Kojto 112:6f327212ef96 578 ((DELAY) == ADC_TWOSAMPLINGDELAY_11CYCLES) || \
Kojto 112:6f327212ef96 579 ((DELAY) == ADC_TWOSAMPLINGDELAY_12CYCLES) || \
Kojto 112:6f327212ef96 580 ((DELAY) == ADC_TWOSAMPLINGDELAY_13CYCLES) || \
Kojto 112:6f327212ef96 581 ((DELAY) == ADC_TWOSAMPLINGDELAY_14CYCLES) || \
Kojto 112:6f327212ef96 582 ((DELAY) == ADC_TWOSAMPLINGDELAY_15CYCLES) || \
Kojto 112:6f327212ef96 583 ((DELAY) == ADC_TWOSAMPLINGDELAY_16CYCLES) || \
Kojto 112:6f327212ef96 584 ((DELAY) == ADC_TWOSAMPLINGDELAY_17CYCLES) || \
Kojto 112:6f327212ef96 585 ((DELAY) == ADC_TWOSAMPLINGDELAY_18CYCLES) || \
Kojto 112:6f327212ef96 586 ((DELAY) == ADC_TWOSAMPLINGDELAY_19CYCLES) || \
Kojto 112:6f327212ef96 587 ((DELAY) == ADC_TWOSAMPLINGDELAY_20CYCLES))
Kojto 112:6f327212ef96 588 #define IS_ADC_RESOLUTION(RESOLUTION) (((RESOLUTION) == ADC_RESOLUTION_12B) || \
Kojto 112:6f327212ef96 589 ((RESOLUTION) == ADC_RESOLUTION_10B) || \
Kojto 112:6f327212ef96 590 ((RESOLUTION) == ADC_RESOLUTION_8B) || \
Kojto 112:6f327212ef96 591 ((RESOLUTION) == ADC_RESOLUTION_6B))
Kojto 112:6f327212ef96 592 #define IS_ADC_EXT_TRIG_EDGE(EDGE) (((EDGE) == ADC_EXTERNALTRIGCONVEDGE_NONE) || \
Kojto 112:6f327212ef96 593 ((EDGE) == ADC_EXTERNALTRIGCONVEDGE_RISING) || \
Kojto 112:6f327212ef96 594 ((EDGE) == ADC_EXTERNALTRIGCONVEDGE_FALLING) || \
Kojto 112:6f327212ef96 595 ((EDGE) == ADC_EXTERNALTRIGCONVEDGE_RISINGFALLING))
Kojto 112:6f327212ef96 596 #define IS_ADC_EXT_TRIG(REGTRIG) (((REGTRIG) == ADC_EXTERNALTRIGCONV_T1_CC1) || \
Kojto 112:6f327212ef96 597 ((REGTRIG) == ADC_EXTERNALTRIGCONV_T1_CC2) || \
Kojto 112:6f327212ef96 598 ((REGTRIG) == ADC_EXTERNALTRIGCONV_T1_CC3) || \
Kojto 112:6f327212ef96 599 ((REGTRIG) == ADC_EXTERNALTRIGCONV_T2_CC2) || \
Kojto 112:6f327212ef96 600 ((REGTRIG) == ADC_EXTERNALTRIGCONV_T2_CC3) || \
Kojto 112:6f327212ef96 601 ((REGTRIG) == ADC_EXTERNALTRIGCONV_T2_CC4) || \
Kojto 112:6f327212ef96 602 ((REGTRIG) == ADC_EXTERNALTRIGCONV_T2_TRGO) || \
Kojto 112:6f327212ef96 603 ((REGTRIG) == ADC_EXTERNALTRIGCONV_T3_CC1) || \
Kojto 112:6f327212ef96 604 ((REGTRIG) == ADC_EXTERNALTRIGCONV_T3_TRGO) || \
Kojto 112:6f327212ef96 605 ((REGTRIG) == ADC_EXTERNALTRIGCONV_T4_CC4) || \
Kojto 112:6f327212ef96 606 ((REGTRIG) == ADC_EXTERNALTRIGCONV_T5_CC1) || \
Kojto 112:6f327212ef96 607 ((REGTRIG) == ADC_EXTERNALTRIGCONV_T5_CC2) || \
Kojto 112:6f327212ef96 608 ((REGTRIG) == ADC_EXTERNALTRIGCONV_T5_CC3) || \
Kojto 112:6f327212ef96 609 ((REGTRIG) == ADC_EXTERNALTRIGCONV_T8_CC1) || \
Kojto 112:6f327212ef96 610 ((REGTRIG) == ADC_EXTERNALTRIGCONV_T8_TRGO) || \
Kojto 112:6f327212ef96 611 ((REGTRIG) == ADC_EXTERNALTRIGCONV_Ext_IT11)|| \
Kojto 112:6f327212ef96 612 ((REGTRIG) == ADC_SOFTWARE_START))
Kojto 112:6f327212ef96 613 #define IS_ADC_DATA_ALIGN(ALIGN) (((ALIGN) == ADC_DATAALIGN_RIGHT) || \
Kojto 112:6f327212ef96 614 ((ALIGN) == ADC_DATAALIGN_LEFT))
Kojto 112:6f327212ef96 615 #define IS_ADC_SAMPLE_TIME(TIME) (((TIME) == ADC_SAMPLETIME_3CYCLES) || \
Kojto 112:6f327212ef96 616 ((TIME) == ADC_SAMPLETIME_15CYCLES) || \
Kojto 112:6f327212ef96 617 ((TIME) == ADC_SAMPLETIME_28CYCLES) || \
Kojto 112:6f327212ef96 618 ((TIME) == ADC_SAMPLETIME_56CYCLES) || \
Kojto 112:6f327212ef96 619 ((TIME) == ADC_SAMPLETIME_84CYCLES) || \
Kojto 112:6f327212ef96 620 ((TIME) == ADC_SAMPLETIME_112CYCLES) || \
Kojto 112:6f327212ef96 621 ((TIME) == ADC_SAMPLETIME_144CYCLES) || \
Kojto 112:6f327212ef96 622 ((TIME) == ADC_SAMPLETIME_480CYCLES))
Kojto 112:6f327212ef96 623 #define IS_ADC_EOCSelection(EOCSelection) (((EOCSelection) == ADC_EOC_SINGLE_CONV) || \
Kojto 112:6f327212ef96 624 ((EOCSelection) == ADC_EOC_SEQ_CONV) || \
Kojto 112:6f327212ef96 625 ((EOCSelection) == ADC_EOC_SINGLE_SEQ_CONV))
Kojto 112:6f327212ef96 626 #define IS_ADC_EVENT_TYPE(EVENT) (((EVENT) == ADC_AWD_EVENT) || \
Kojto 112:6f327212ef96 627 ((EVENT) == ADC_OVR_EVENT))
Kojto 112:6f327212ef96 628 #define IS_ADC_ANALOG_WATCHDOG(WATCHDOG) (((WATCHDOG) == ADC_ANALOGWATCHDOG_SINGLE_REG) || \
Kojto 112:6f327212ef96 629 ((WATCHDOG) == ADC_ANALOGWATCHDOG_SINGLE_INJEC) || \
Kojto 112:6f327212ef96 630 ((WATCHDOG) == ADC_ANALOGWATCHDOG_SINGLE_REGINJEC) || \
Kojto 112:6f327212ef96 631 ((WATCHDOG) == ADC_ANALOGWATCHDOG_ALL_REG) || \
Kojto 112:6f327212ef96 632 ((WATCHDOG) == ADC_ANALOGWATCHDOG_ALL_INJEC) || \
Kojto 112:6f327212ef96 633 ((WATCHDOG) == ADC_ANALOGWATCHDOG_ALL_REGINJEC) || \
Kojto 112:6f327212ef96 634 ((WATCHDOG) == ADC_ANALOGWATCHDOG_NONE))
Kojto 112:6f327212ef96 635 #define IS_ADC_CHANNELS_TYPE(CHANNEL_TYPE) (((CHANNEL_TYPE) == ADC_ALL_CHANNELS) || \
Kojto 112:6f327212ef96 636 ((CHANNEL_TYPE) == ADC_REGULAR_CHANNELS) || \
Kojto 112:6f327212ef96 637 ((CHANNEL_TYPE) == ADC_INJECTED_CHANNELS))
Kojto 112:6f327212ef96 638 #define IS_ADC_THRESHOLD(THRESHOLD) ((THRESHOLD) <= ((uint32_t)0xFFF))
Kojto 112:6f327212ef96 639
Kojto 112:6f327212ef96 640 #define IS_ADC_REGULAR_LENGTH(LENGTH) (((LENGTH) >= ((uint32_t)1)) && ((LENGTH) <= ((uint32_t)16)))
Kojto 112:6f327212ef96 641 #define IS_ADC_REGULAR_RANK(RANK) (((RANK) >= ((uint32_t)1)) && ((RANK) <= ((uint32_t)16)))
Kojto 112:6f327212ef96 642 #define IS_ADC_REGULAR_DISC_NUMBER(NUMBER) (((NUMBER) >= ((uint32_t)1)) && ((NUMBER) <= ((uint32_t)8)))
Kojto 112:6f327212ef96 643 #define IS_ADC_RANGE(RESOLUTION, ADC_VALUE) \
Kojto 112:6f327212ef96 644 ((((RESOLUTION) == ADC_RESOLUTION_12B) && ((ADC_VALUE) <= ((uint32_t)0x0FFF))) || \
Kojto 112:6f327212ef96 645 (((RESOLUTION) == ADC_RESOLUTION_10B) && ((ADC_VALUE) <= ((uint32_t)0x03FF))) || \
Kojto 112:6f327212ef96 646 (((RESOLUTION) == ADC_RESOLUTION_8B) && ((ADC_VALUE) <= ((uint32_t)0x00FF))) || \
Kojto 112:6f327212ef96 647 (((RESOLUTION) == ADC_RESOLUTION_6B) && ((ADC_VALUE) <= ((uint32_t)0x003F))))
Kojto 112:6f327212ef96 648
Kojto 112:6f327212ef96 649 /**
Kojto 112:6f327212ef96 650 * @brief Set ADC Regular channel sequence length.
Kojto 112:6f327212ef96 651 * @param _NbrOfConversion_: Regular channel sequence length.
Kojto 112:6f327212ef96 652 * @retval None
Kojto 112:6f327212ef96 653 */
Kojto 112:6f327212ef96 654 #define ADC_SQR1(_NbrOfConversion_) (((_NbrOfConversion_) - (uint8_t)1) << 20)
Kojto 112:6f327212ef96 655
Kojto 112:6f327212ef96 656 /**
Kojto 112:6f327212ef96 657 * @brief Set the ADC's sample time for channel numbers between 10 and 18.
Kojto 112:6f327212ef96 658 * @param _SAMPLETIME_: Sample time parameter.
Kojto 112:6f327212ef96 659 * @param _CHANNELNB_: Channel number.
Kojto 112:6f327212ef96 660 * @retval None
Kojto 112:6f327212ef96 661 */
Kojto 112:6f327212ef96 662 #define ADC_SMPR1(_SAMPLETIME_, _CHANNELNB_) ((_SAMPLETIME_) << (3 * (((uint32_t)((uint16_t)(_CHANNELNB_))) - 10)))
Kojto 112:6f327212ef96 663
Kojto 112:6f327212ef96 664 /**
Kojto 112:6f327212ef96 665 * @brief Set the ADC's sample time for channel numbers between 0 and 9.
Kojto 112:6f327212ef96 666 * @param _SAMPLETIME_: Sample time parameter.
Kojto 112:6f327212ef96 667 * @param _CHANNELNB_: Channel number.
Kojto 112:6f327212ef96 668 * @retval None
Kojto 112:6f327212ef96 669 */
Kojto 112:6f327212ef96 670 #define ADC_SMPR2(_SAMPLETIME_, _CHANNELNB_) ((_SAMPLETIME_) << (3 * ((uint32_t)((uint16_t)(_CHANNELNB_)))))
Kojto 112:6f327212ef96 671
Kojto 112:6f327212ef96 672 /**
Kojto 112:6f327212ef96 673 * @brief Set the selected regular channel rank for rank between 1 and 6.
Kojto 112:6f327212ef96 674 * @param _CHANNELNB_: Channel number.
Kojto 112:6f327212ef96 675 * @param _RANKNB_: Rank number.
Kojto 112:6f327212ef96 676 * @retval None
Kojto 112:6f327212ef96 677 */
Kojto 112:6f327212ef96 678 #define ADC_SQR3_RK(_CHANNELNB_, _RANKNB_) (((uint32_t)((uint16_t)(_CHANNELNB_))) << (5 * ((_RANKNB_) - 1)))
Kojto 112:6f327212ef96 679
Kojto 112:6f327212ef96 680 /**
Kojto 112:6f327212ef96 681 * @brief Set the selected regular channel rank for rank between 7 and 12.
Kojto 112:6f327212ef96 682 * @param _CHANNELNB_: Channel number.
Kojto 112:6f327212ef96 683 * @param _RANKNB_: Rank number.
Kojto 112:6f327212ef96 684 * @retval None
Kojto 112:6f327212ef96 685 */
Kojto 112:6f327212ef96 686 #define ADC_SQR2_RK(_CHANNELNB_, _RANKNB_) (((uint32_t)((uint16_t)(_CHANNELNB_))) << (5 * ((_RANKNB_) - 7)))
Kojto 112:6f327212ef96 687
Kojto 112:6f327212ef96 688 /**
Kojto 112:6f327212ef96 689 * @brief Set the selected regular channel rank for rank between 13 and 16.
Kojto 112:6f327212ef96 690 * @param _CHANNELNB_: Channel number.
Kojto 112:6f327212ef96 691 * @param _RANKNB_: Rank number.
Kojto 112:6f327212ef96 692 * @retval None
Kojto 112:6f327212ef96 693 */
Kojto 112:6f327212ef96 694 #define ADC_SQR1_RK(_CHANNELNB_, _RANKNB_) (((uint32_t)((uint16_t)(_CHANNELNB_))) << (5 * ((_RANKNB_) - 13)))
Kojto 112:6f327212ef96 695
Kojto 112:6f327212ef96 696 /**
Kojto 112:6f327212ef96 697 * @brief Enable ADC continuous conversion mode.
Kojto 112:6f327212ef96 698 * @param _CONTINUOUS_MODE_: Continuous mode.
Kojto 112:6f327212ef96 699 * @retval None
Kojto 112:6f327212ef96 700 */
Kojto 112:6f327212ef96 701 #define ADC_CR2_CONTINUOUS(_CONTINUOUS_MODE_) ((_CONTINUOUS_MODE_) << 1)
Kojto 112:6f327212ef96 702
Kojto 112:6f327212ef96 703 /**
Kojto 112:6f327212ef96 704 * @brief Configures the number of discontinuous conversions for the regular group channels.
Kojto 112:6f327212ef96 705 * @param _NBR_DISCONTINUOUSCONV_: Number of discontinuous conversions.
Kojto 112:6f327212ef96 706 * @retval None
Kojto 112:6f327212ef96 707 */
Kojto 112:6f327212ef96 708 #define ADC_CR1_DISCONTINUOUS(_NBR_DISCONTINUOUSCONV_) (((_NBR_DISCONTINUOUSCONV_) - 1) << POSITION_VAL(ADC_CR1_DISCNUM))
Kojto 112:6f327212ef96 709
Kojto 112:6f327212ef96 710 /**
Kojto 112:6f327212ef96 711 * @brief Enable ADC scan mode.
Kojto 112:6f327212ef96 712 * @param _SCANCONV_MODE_: Scan conversion mode.
Kojto 112:6f327212ef96 713 * @retval None
Kojto 112:6f327212ef96 714 */
Kojto 112:6f327212ef96 715 #define ADC_CR1_SCANCONV(_SCANCONV_MODE_) ((_SCANCONV_MODE_) << 8)
Kojto 112:6f327212ef96 716
Kojto 112:6f327212ef96 717 /**
Kojto 112:6f327212ef96 718 * @brief Enable the ADC end of conversion selection.
Kojto 112:6f327212ef96 719 * @param _EOCSelection_MODE_: End of conversion selection mode.
Kojto 112:6f327212ef96 720 * @retval None
Kojto 112:6f327212ef96 721 */
Kojto 112:6f327212ef96 722 #define ADC_CR2_EOCSelection(_EOCSelection_MODE_) ((_EOCSelection_MODE_) << 10)
Kojto 112:6f327212ef96 723
Kojto 112:6f327212ef96 724 /**
Kojto 112:6f327212ef96 725 * @brief Enable the ADC DMA continuous request.
Kojto 112:6f327212ef96 726 * @param _DMAContReq_MODE_: DMA continuous request mode.
Kojto 112:6f327212ef96 727 * @retval None
Kojto 112:6f327212ef96 728 */
Kojto 112:6f327212ef96 729 #define ADC_CR2_DMAContReq(_DMAContReq_MODE_) ((_DMAContReq_MODE_) << 9)
Kojto 112:6f327212ef96 730
Kojto 112:6f327212ef96 731 /**
Kojto 112:6f327212ef96 732 * @brief Return resolution bits in CR1 register.
Kojto 112:6f327212ef96 733 * @param __HANDLE__: ADC handle
Kojto 112:6f327212ef96 734 * @retval None
Kojto 112:6f327212ef96 735 */
Kojto 112:6f327212ef96 736 #define ADC_GET_RESOLUTION(__HANDLE__) (((__HANDLE__)->Instance->CR1) & ADC_CR1_RES)
Kojto 112:6f327212ef96 737
Kojto 112:6f327212ef96 738 /**
Kojto 112:6f327212ef96 739 * @}
Kojto 112:6f327212ef96 740 */
Kojto 112:6f327212ef96 741
Kojto 112:6f327212ef96 742 /* Private functions ---------------------------------------------------------*/
Kojto 112:6f327212ef96 743 /** @defgroup ADC_Private_Functions ADC Private Functions
Kojto 112:6f327212ef96 744 * @{
Kojto 112:6f327212ef96 745 */
Kojto 112:6f327212ef96 746
Kojto 112:6f327212ef96 747 /**
Kojto 112:6f327212ef96 748 * @}
Kojto 112:6f327212ef96 749 */
Kojto 112:6f327212ef96 750
Kojto 112:6f327212ef96 751 /**
Kojto 112:6f327212ef96 752 * @}
Kojto 112:6f327212ef96 753 */
Kojto 112:6f327212ef96 754
Kojto 112:6f327212ef96 755 /**
Kojto 112:6f327212ef96 756 * @}
Kojto 112:6f327212ef96 757 */
Kojto 112:6f327212ef96 758
Kojto 112:6f327212ef96 759 #ifdef __cplusplus
Kojto 112:6f327212ef96 760 }
Kojto 112:6f327212ef96 761 #endif
Kojto 112:6f327212ef96 762
Kojto 112:6f327212ef96 763 #endif /*__STM32F4xx_ADC_H */
Kojto 112:6f327212ef96 764
Kojto 112:6f327212ef96 765
Kojto 112:6f327212ef96 766 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/