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