my fork

Dependents:   Nucleo_blueNRG

Fork of mbed by mbed official

Committer:
Kojto
Date:
Tue Oct 28 16:40:41 2014 +0000
Revision:
90:cb3d968589d8
Release 90 of the mbed library

Changes:

- Freescale KSDK update (v1.0)
- K22 - new target addition
- KL43Z - new target addition
- Nucleo F091RC - new target addition
- Nucleo L152RE - STM32Cube driver
- Nordic - Softdevice v7.1.0
- Nvic files - BSD License
- LPC824 - various HAL fixes
- Nucleo F411RE - CMSIS - IAR files

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 90:cb3d968589d8 1 /**
Kojto 90:cb3d968589d8 2 ******************************************************************************
Kojto 90:cb3d968589d8 3 * @file stm32f3xx_hal_sdadc.h
Kojto 90:cb3d968589d8 4 * @author MCD Application Team
Kojto 90:cb3d968589d8 5 * @version V1.1.0
Kojto 90:cb3d968589d8 6 * @date 12-Sept-2014
Kojto 90:cb3d968589d8 7 * @brief This file contains all the functions prototypes for the SDADC
Kojto 90:cb3d968589d8 8 * firmware library.
Kojto 90:cb3d968589d8 9 ******************************************************************************
Kojto 90:cb3d968589d8 10 * @attention
Kojto 90:cb3d968589d8 11 *
Kojto 90:cb3d968589d8 12 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
Kojto 90:cb3d968589d8 13 *
Kojto 90:cb3d968589d8 14 * Redistribution and use in source and binary forms, with or without modification,
Kojto 90:cb3d968589d8 15 * are permitted provided that the following conditions are met:
Kojto 90:cb3d968589d8 16 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 90:cb3d968589d8 17 * this list of conditions and the following disclaimer.
Kojto 90:cb3d968589d8 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 90:cb3d968589d8 19 * this list of conditions and the following disclaimer in the documentation
Kojto 90:cb3d968589d8 20 * and/or other materials provided with the distribution.
Kojto 90:cb3d968589d8 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 90:cb3d968589d8 22 * may be used to endorse or promote products derived from this software
Kojto 90:cb3d968589d8 23 * without specific prior written permission.
Kojto 90:cb3d968589d8 24 *
Kojto 90:cb3d968589d8 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 90:cb3d968589d8 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 90:cb3d968589d8 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 90:cb3d968589d8 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 90:cb3d968589d8 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 90:cb3d968589d8 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 90:cb3d968589d8 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 90:cb3d968589d8 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 90:cb3d968589d8 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 90:cb3d968589d8 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 90:cb3d968589d8 35 *
Kojto 90:cb3d968589d8 36 ******************************************************************************
Kojto 90:cb3d968589d8 37 */
Kojto 90:cb3d968589d8 38
Kojto 90:cb3d968589d8 39 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 90:cb3d968589d8 40 #ifndef __STM32F3xx_SDADC_H
Kojto 90:cb3d968589d8 41 #define __STM32F3xx_SDADC_H
Kojto 90:cb3d968589d8 42
Kojto 90:cb3d968589d8 43 #ifdef __cplusplus
Kojto 90:cb3d968589d8 44 extern "C" {
Kojto 90:cb3d968589d8 45 #endif
Kojto 90:cb3d968589d8 46
Kojto 90:cb3d968589d8 47 #if defined(STM32F373xC) || defined(STM32F378xx)
Kojto 90:cb3d968589d8 48
Kojto 90:cb3d968589d8 49 /* Includes ------------------------------------------------------------------*/
Kojto 90:cb3d968589d8 50 #include "stm32f3xx_hal_def.h"
Kojto 90:cb3d968589d8 51
Kojto 90:cb3d968589d8 52 /** @addtogroup STM32F3xx_HAL_Driver
Kojto 90:cb3d968589d8 53 * @{
Kojto 90:cb3d968589d8 54 */
Kojto 90:cb3d968589d8 55
Kojto 90:cb3d968589d8 56 /** @addtogroup SDADC
Kojto 90:cb3d968589d8 57 * @{
Kojto 90:cb3d968589d8 58 */
Kojto 90:cb3d968589d8 59
Kojto 90:cb3d968589d8 60 /* Exported types ------------------------------------------------------------*/
Kojto 90:cb3d968589d8 61 /** @defgroup SDADC_Exported_Types SDADC Exported Types
Kojto 90:cb3d968589d8 62 * @{
Kojto 90:cb3d968589d8 63 */
Kojto 90:cb3d968589d8 64
Kojto 90:cb3d968589d8 65
Kojto 90:cb3d968589d8 66 /**
Kojto 90:cb3d968589d8 67 * @brief HAL SDADC States definition
Kojto 90:cb3d968589d8 68 */
Kojto 90:cb3d968589d8 69 typedef enum
Kojto 90:cb3d968589d8 70 {
Kojto 90:cb3d968589d8 71 HAL_SDADC_STATE_RESET = 0x00, /*!< SDADC not initialized */
Kojto 90:cb3d968589d8 72 HAL_SDADC_STATE_READY = 0x01, /*!< SDADC initialized and ready for use */
Kojto 90:cb3d968589d8 73 HAL_SDADC_STATE_CALIB = 0x02, /*!< SDADC calibration in progress */
Kojto 90:cb3d968589d8 74 HAL_SDADC_STATE_REG = 0x03, /*!< SDADC regular conversion in progress */
Kojto 90:cb3d968589d8 75 HAL_SDADC_STATE_INJ = 0x04, /*!< SDADC injected conversion in progress */
Kojto 90:cb3d968589d8 76 HAL_SDADC_STATE_REG_INJ = 0x05, /*!< SDADC regular and injected conversions in progress */
Kojto 90:cb3d968589d8 77 HAL_SDADC_STATE_ERROR = 0xFF, /*!< SDADC state error */
Kojto 90:cb3d968589d8 78 }HAL_SDADC_StateTypeDef;
Kojto 90:cb3d968589d8 79
Kojto 90:cb3d968589d8 80 /**
Kojto 90:cb3d968589d8 81 * @brief SDADC Init Structure definition
Kojto 90:cb3d968589d8 82 */
Kojto 90:cb3d968589d8 83 typedef struct
Kojto 90:cb3d968589d8 84 {
Kojto 90:cb3d968589d8 85 uint32_t IdleLowPowerMode; /*!< Specifies if SDADC can enter in power down or standby when idle.
Kojto 90:cb3d968589d8 86 This parameter can be a value of @ref SDADC_Idle_Low_Power_Mode */
Kojto 90:cb3d968589d8 87 uint32_t FastConversionMode; /*!< Specifies if Fast conversion mode is enabled or not.
Kojto 90:cb3d968589d8 88 This parameter can be a value of @ref SDADC_Fast_Conv_Mode */
Kojto 90:cb3d968589d8 89 uint32_t SlowClockMode; /*!< Specifies if slow clock mode is enabled or not.
Kojto 90:cb3d968589d8 90 This parameter can be a value of @ref SDADC_Slow_Clock_Mode */
Kojto 90:cb3d968589d8 91 uint32_t ReferenceVoltage; /*!< Specifies the reference voltage.
Kojto 90:cb3d968589d8 92 This parameter can be a value of @ref SDADC_Reference_Voltage */
Kojto 90:cb3d968589d8 93 }SDADC_InitTypeDef;
Kojto 90:cb3d968589d8 94
Kojto 90:cb3d968589d8 95 /**
Kojto 90:cb3d968589d8 96 * @brief SDADC handle Structure definition
Kojto 90:cb3d968589d8 97 */
Kojto 90:cb3d968589d8 98 typedef struct
Kojto 90:cb3d968589d8 99 {
Kojto 90:cb3d968589d8 100 SDADC_TypeDef *Instance; /*!< SDADC registers base address */
Kojto 90:cb3d968589d8 101 SDADC_InitTypeDef Init; /*!< SDADC init parameters */
Kojto 90:cb3d968589d8 102 DMA_HandleTypeDef *hdma; /*!< SDADC DMA Handle parameters */
Kojto 90:cb3d968589d8 103 uint32_t RegularContMode; /*!< Regular conversion continuous mode */
Kojto 90:cb3d968589d8 104 uint32_t InjectedContMode; /*!< Injected conversion continuous mode */
Kojto 90:cb3d968589d8 105 uint32_t InjectedChannelsNbr; /*!< Number of channels in injected sequence */
Kojto 90:cb3d968589d8 106 uint32_t InjConvRemaining; /*!< Injected conversion remaining */
Kojto 90:cb3d968589d8 107 uint32_t RegularTrigger; /*!< Current trigger used for regular conversion */
Kojto 90:cb3d968589d8 108 uint32_t InjectedTrigger; /*!< Current trigger used for injected conversion */
Kojto 90:cb3d968589d8 109 uint32_t ExtTriggerEdge; /*!< Rising, falling or both edges selected */
Kojto 90:cb3d968589d8 110 uint32_t RegularMultimode; /*!< current type of regular multimode */
Kojto 90:cb3d968589d8 111 uint32_t InjectedMultimode; /*!< Current type of injected multimode */
Kojto 90:cb3d968589d8 112 HAL_SDADC_StateTypeDef State; /*!< SDADC state */
Kojto 90:cb3d968589d8 113 uint32_t ErrorCode; /*!< SDADC Error code */
Kojto 90:cb3d968589d8 114 }SDADC_HandleTypeDef;
Kojto 90:cb3d968589d8 115
Kojto 90:cb3d968589d8 116 /**
Kojto 90:cb3d968589d8 117 * @brief SDADC Configuration Register Parameter Structure
Kojto 90:cb3d968589d8 118 */
Kojto 90:cb3d968589d8 119 typedef struct
Kojto 90:cb3d968589d8 120 {
Kojto 90:cb3d968589d8 121 uint32_t InputMode; /*!< Specifies the input mode (single ended, differential...)
Kojto 90:cb3d968589d8 122 This parameter can be any value of @ref SDADC_InputMode */
Kojto 90:cb3d968589d8 123 uint32_t Gain; /*!< Specifies the gain setting.
Kojto 90:cb3d968589d8 124 This parameter can be any value of @ref SDADC_Gain */
Kojto 90:cb3d968589d8 125 uint32_t CommonMode; /*!< Specifies the common mode setting (VSSA, VDDA, VDDA/2).
Kojto 90:cb3d968589d8 126 This parameter can be any value of @ref SDADC_CommonMode */
Kojto 90:cb3d968589d8 127 uint32_t Offset; /*!< Specifies the 12-bit offset value.
Kojto 90:cb3d968589d8 128 This parameter can be any value lower or equal to 0x00000FFF */
Kojto 90:cb3d968589d8 129 }SDADC_ConfParamTypeDef;
Kojto 90:cb3d968589d8 130
Kojto 90:cb3d968589d8 131 /**
Kojto 90:cb3d968589d8 132 * @}
Kojto 90:cb3d968589d8 133 */
Kojto 90:cb3d968589d8 134
Kojto 90:cb3d968589d8 135 /* Exported constants --------------------------------------------------------*/
Kojto 90:cb3d968589d8 136
Kojto 90:cb3d968589d8 137 /** @defgroup SDADC_Exported_Constants SDADC Exported Constants
Kojto 90:cb3d968589d8 138 * @{
Kojto 90:cb3d968589d8 139 */
Kojto 90:cb3d968589d8 140
Kojto 90:cb3d968589d8 141 /** @defgroup SDADC_Idle_Low_Power_Mode SDADC Idle Low Power Mode
Kojto 90:cb3d968589d8 142 * @{
Kojto 90:cb3d968589d8 143 */
Kojto 90:cb3d968589d8 144 #define SDADC_LOWPOWER_NONE ((uint32_t)0x00000000)
Kojto 90:cb3d968589d8 145 #define SDADC_LOWPOWER_POWERDOWN SDADC_CR1_PDI
Kojto 90:cb3d968589d8 146 #define SDADC_LOWPOWER_STANDBY SDADC_CR1_SBI
Kojto 90:cb3d968589d8 147 #define IS_SDADC_LOWPOWER_MODE(LOWPOWER) (((LOWPOWER) == SDADC_LOWPOWER_NONE) || \
Kojto 90:cb3d968589d8 148 ((LOWPOWER) == SDADC_LOWPOWER_POWERDOWN) || \
Kojto 90:cb3d968589d8 149 ((LOWPOWER) == SDADC_LOWPOWER_STANDBY))
Kojto 90:cb3d968589d8 150 /**
Kojto 90:cb3d968589d8 151 * @}
Kojto 90:cb3d968589d8 152 */
Kojto 90:cb3d968589d8 153
Kojto 90:cb3d968589d8 154 /** @defgroup SDADC_Fast_Conv_Mode SDADC Fast Conversion Mode
Kojto 90:cb3d968589d8 155 * @{
Kojto 90:cb3d968589d8 156 */
Kojto 90:cb3d968589d8 157 #define SDADC_FAST_CONV_DISABLE ((uint32_t)0x00000000)
Kojto 90:cb3d968589d8 158 #define SDADC_FAST_CONV_ENABLE SDADC_CR2_FAST
Kojto 90:cb3d968589d8 159 #define IS_SDADC_FAST_CONV_MODE(FAST) (((FAST) == SDADC_FAST_CONV_DISABLE) || \
Kojto 90:cb3d968589d8 160 ((FAST) == SDADC_FAST_CONV_ENABLE))
Kojto 90:cb3d968589d8 161 /**
Kojto 90:cb3d968589d8 162 * @}
Kojto 90:cb3d968589d8 163 */
Kojto 90:cb3d968589d8 164
Kojto 90:cb3d968589d8 165 /** @defgroup SDADC_Slow_Clock_Mode SDADC Slow Clock Mode
Kojto 90:cb3d968589d8 166 * @{
Kojto 90:cb3d968589d8 167 */
Kojto 90:cb3d968589d8 168 #define SDADC_SLOW_CLOCK_DISABLE ((uint32_t)0x00000000)
Kojto 90:cb3d968589d8 169 #define SDADC_SLOW_CLOCK_ENABLE SDADC_CR1_SLOWCK
Kojto 90:cb3d968589d8 170 #define IS_SDADC_SLOW_CLOCK_MODE(MODE) (((MODE) == SDADC_SLOW_CLOCK_DISABLE) || \
Kojto 90:cb3d968589d8 171 ((MODE) == SDADC_SLOW_CLOCK_ENABLE))
Kojto 90:cb3d968589d8 172 /**
Kojto 90:cb3d968589d8 173 * @}
Kojto 90:cb3d968589d8 174 */
Kojto 90:cb3d968589d8 175
Kojto 90:cb3d968589d8 176 /** @defgroup SDADC_Reference_Voltage SDADC Reference Voltage
Kojto 90:cb3d968589d8 177 * @{
Kojto 90:cb3d968589d8 178 */
Kojto 90:cb3d968589d8 179 #define SDADC_VREF_EXT ((uint32_t)0x00000000) /*!< The reference voltage is forced externally using VREF pin */
Kojto 90:cb3d968589d8 180 #define SDADC_VREF_VREFINT1 SDADC_CR1_REFV_0 /*!< The reference voltage is forced internally to 1.22V VREFINT */
Kojto 90:cb3d968589d8 181 #define SDADC_VREF_VREFINT2 SDADC_CR1_REFV_1 /*!< The reference voltage is forced internally to 1.8V VREFINT */
Kojto 90:cb3d968589d8 182 #define SDADC_VREF_VDDA SDADC_CR1_REFV /*!< The reference voltage is forced internally to VDDA */
Kojto 90:cb3d968589d8 183 #define IS_SDADC_VREF(VREF) (((VREF) == SDADC_VREF_EXT) || \
Kojto 90:cb3d968589d8 184 ((VREF) == SDADC_VREF_VREFINT1) || \
Kojto 90:cb3d968589d8 185 ((VREF) == SDADC_VREF_VREFINT2) || \
Kojto 90:cb3d968589d8 186 ((VREF) == SDADC_VREF_VDDA))
Kojto 90:cb3d968589d8 187 /**
Kojto 90:cb3d968589d8 188 * @}
Kojto 90:cb3d968589d8 189 */
Kojto 90:cb3d968589d8 190
Kojto 90:cb3d968589d8 191 /** @defgroup SDADC_ConfIndex SDADC Configuration Index
Kojto 90:cb3d968589d8 192 * @{
Kojto 90:cb3d968589d8 193 */
Kojto 90:cb3d968589d8 194
Kojto 90:cb3d968589d8 195 #define SDADC_CONF_INDEX_0 ((uint32_t)0x00000000) /*!< Configuration 0 Register selected */
Kojto 90:cb3d968589d8 196 #define SDADC_CONF_INDEX_1 ((uint32_t)0x00000001) /*!< Configuration 1 Register selected */
Kojto 90:cb3d968589d8 197 #define SDADC_CONF_INDEX_2 ((uint32_t)0x00000002) /*!< Configuration 2 Register selected */
Kojto 90:cb3d968589d8 198
Kojto 90:cb3d968589d8 199 #define IS_SDADC_CONF_INDEX(CONF) (((CONF) == SDADC_CONF_INDEX_0) || \
Kojto 90:cb3d968589d8 200 ((CONF) == SDADC_CONF_INDEX_1) || \
Kojto 90:cb3d968589d8 201 ((CONF) == SDADC_CONF_INDEX_2))
Kojto 90:cb3d968589d8 202 /**
Kojto 90:cb3d968589d8 203 * @}
Kojto 90:cb3d968589d8 204 */
Kojto 90:cb3d968589d8 205
Kojto 90:cb3d968589d8 206 /** @defgroup SDADC_InputMode SDADC Input Mode
Kojto 90:cb3d968589d8 207 * @{
Kojto 90:cb3d968589d8 208 */
Kojto 90:cb3d968589d8 209 #define SDADC_INPUT_MODE_DIFF ((uint32_t)0x00000000) /*!< Conversions are executed in differential mode */
Kojto 90:cb3d968589d8 210 #define SDADC_INPUT_MODE_SE_OFFSET SDADC_CONF0R_SE0_0 /*!< Conversions are executed in single ended offset mode */
Kojto 90:cb3d968589d8 211 #define SDADC_INPUT_MODE_SE_ZERO_REFERENCE SDADC_CONF0R_SE0 /*!< Conversions are executed in single ended zero-volt reference mode */
Kojto 90:cb3d968589d8 212
Kojto 90:cb3d968589d8 213 #define IS_SDADC_INPUT_MODE(MODE) (((MODE) == SDADC_INPUT_MODE_DIFF) || \
Kojto 90:cb3d968589d8 214 ((MODE) == SDADC_INPUT_MODE_SE_OFFSET) || \
Kojto 90:cb3d968589d8 215 ((MODE) == SDADC_INPUT_MODE_SE_ZERO_REFERENCE))
Kojto 90:cb3d968589d8 216 /**
Kojto 90:cb3d968589d8 217 * @}
Kojto 90:cb3d968589d8 218 */
Kojto 90:cb3d968589d8 219
Kojto 90:cb3d968589d8 220 /** @defgroup SDADC_Gain SDADC Gain
Kojto 90:cb3d968589d8 221 * @{
Kojto 90:cb3d968589d8 222 */
Kojto 90:cb3d968589d8 223 #define SDADC_GAIN_1 ((uint32_t)0x00000000) /*!< Gain equal to 1 */
Kojto 90:cb3d968589d8 224 #define SDADC_GAIN_2 SDADC_CONF0R_GAIN0_0 /*!< Gain equal to 2 */
Kojto 90:cb3d968589d8 225 #define SDADC_GAIN_4 SDADC_CONF0R_GAIN0_1 /*!< Gain equal to 4 */
Kojto 90:cb3d968589d8 226 #define SDADC_GAIN_8 ((uint32_t)0x00300000) /*!< Gain equal to 8 */
Kojto 90:cb3d968589d8 227 #define SDADC_GAIN_16 SDADC_CONF0R_GAIN0_2 /*!< Gain equal to 16 */
Kojto 90:cb3d968589d8 228 #define SDADC_GAIN_32 ((uint32_t)0x00500000) /*!< Gain equal to 32 */
Kojto 90:cb3d968589d8 229 #define SDADC_GAIN_1_2 SDADC_CONF0R_GAIN0 /*!< Gain equal to 1/2 */
Kojto 90:cb3d968589d8 230 #define IS_SDADC_GAIN(GAIN) (((GAIN) == SDADC_GAIN_1) || \
Kojto 90:cb3d968589d8 231 ((GAIN) == SDADC_GAIN_2) || \
Kojto 90:cb3d968589d8 232 ((GAIN) == SDADC_GAIN_4) || \
Kojto 90:cb3d968589d8 233 ((GAIN) == SDADC_GAIN_8) || \
Kojto 90:cb3d968589d8 234 ((GAIN) == SDADC_GAIN_16) || \
Kojto 90:cb3d968589d8 235 ((GAIN) == SDADC_GAIN_32) || \
Kojto 90:cb3d968589d8 236 ((GAIN) == SDADC_GAIN_1_2))
Kojto 90:cb3d968589d8 237 /**
Kojto 90:cb3d968589d8 238 * @}
Kojto 90:cb3d968589d8 239 */
Kojto 90:cb3d968589d8 240
Kojto 90:cb3d968589d8 241 /** @defgroup SDADC_CommonMode SDADC Common Mode
Kojto 90:cb3d968589d8 242 * @{
Kojto 90:cb3d968589d8 243 */
Kojto 90:cb3d968589d8 244 #define SDADC_COMMON_MODE_VSSA ((uint32_t)0x00000000) /*!< Select SDADC VSSA as common mode */
Kojto 90:cb3d968589d8 245 #define SDADC_COMMON_MODE_VDDA_2 SDADC_CONF0R_COMMON0_0 /*!< Select SDADC VDDA/2 as common mode */
Kojto 90:cb3d968589d8 246 #define SDADC_COMMON_MODE_VDDA SDADC_CONF0R_COMMON0_1 /*!< Select SDADC VDDA as common mode */
Kojto 90:cb3d968589d8 247 #define IS_SDADC_COMMON_MODE(MODE) (((MODE) == SDADC_COMMON_MODE_VSSA) || \
Kojto 90:cb3d968589d8 248 ((MODE) == SDADC_COMMON_MODE_VDDA_2) || \
Kojto 90:cb3d968589d8 249 ((MODE) == SDADC_COMMON_MODE_VDDA))
Kojto 90:cb3d968589d8 250 /**
Kojto 90:cb3d968589d8 251 * @}
Kojto 90:cb3d968589d8 252 */
Kojto 90:cb3d968589d8 253
Kojto 90:cb3d968589d8 254 /** @defgroup SDADC_Offset SDADC Offset
Kojto 90:cb3d968589d8 255 * @{
Kojto 90:cb3d968589d8 256 */
Kojto 90:cb3d968589d8 257 #define IS_SDADC_OFFSET_VALUE(VALUE) ((VALUE) <= 0x00000FFF)
Kojto 90:cb3d968589d8 258 /**
Kojto 90:cb3d968589d8 259 * @}
Kojto 90:cb3d968589d8 260 */
Kojto 90:cb3d968589d8 261
Kojto 90:cb3d968589d8 262 /** @defgroup SDADC_Channel_Selection SDADC Channel Selection
Kojto 90:cb3d968589d8 263 * @{
Kojto 90:cb3d968589d8 264 */
Kojto 90:cb3d968589d8 265
Kojto 90:cb3d968589d8 266 /* SDADC Channels ------------------------------------------------------------*/
Kojto 90:cb3d968589d8 267 /* The SDADC channels are defined as follows:
Kojto 90:cb3d968589d8 268 - in 16-bit LSB the channel mask is set
Kojto 90:cb3d968589d8 269 - in 16-bit MSB the channel number is set
Kojto 90:cb3d968589d8 270 e.g. for channel 5 definition:
Kojto 90:cb3d968589d8 271 - the channel mask is 0x00000020 (bit 5 is set)
Kojto 90:cb3d968589d8 272 - the channel number 5 is 0x00050000
Kojto 90:cb3d968589d8 273 --> Consequently, channel 5 definition is 0x00000020 | 0x00050000 = 0x00050020 */
Kojto 90:cb3d968589d8 274 #define SDADC_CHANNEL_0 ((uint32_t)0x00000001)
Kojto 90:cb3d968589d8 275 #define SDADC_CHANNEL_1 ((uint32_t)0x00010002)
Kojto 90:cb3d968589d8 276 #define SDADC_CHANNEL_2 ((uint32_t)0x00020004)
Kojto 90:cb3d968589d8 277 #define SDADC_CHANNEL_3 ((uint32_t)0x00030008)
Kojto 90:cb3d968589d8 278 #define SDADC_CHANNEL_4 ((uint32_t)0x00040010)
Kojto 90:cb3d968589d8 279 #define SDADC_CHANNEL_5 ((uint32_t)0x00050020)
Kojto 90:cb3d968589d8 280 #define SDADC_CHANNEL_6 ((uint32_t)0x00060040)
Kojto 90:cb3d968589d8 281 #define SDADC_CHANNEL_7 ((uint32_t)0x00070080)
Kojto 90:cb3d968589d8 282 #define SDADC_CHANNEL_8 ((uint32_t)0x00080100)
Kojto 90:cb3d968589d8 283
Kojto 90:cb3d968589d8 284 /* Just one channel of the 9 channels can be selected for regular conversion */
Kojto 90:cb3d968589d8 285 #define IS_SDADC_REGULAR_CHANNEL(CHANNEL) (((CHANNEL) == SDADC_CHANNEL_0) || \
Kojto 90:cb3d968589d8 286 ((CHANNEL) == SDADC_CHANNEL_1) || \
Kojto 90:cb3d968589d8 287 ((CHANNEL) == SDADC_CHANNEL_2) || \
Kojto 90:cb3d968589d8 288 ((CHANNEL) == SDADC_CHANNEL_3) || \
Kojto 90:cb3d968589d8 289 ((CHANNEL) == SDADC_CHANNEL_4) || \
Kojto 90:cb3d968589d8 290 ((CHANNEL) == SDADC_CHANNEL_5) || \
Kojto 90:cb3d968589d8 291 ((CHANNEL) == SDADC_CHANNEL_6) || \
Kojto 90:cb3d968589d8 292 ((CHANNEL) == SDADC_CHANNEL_7) || \
Kojto 90:cb3d968589d8 293 ((CHANNEL) == SDADC_CHANNEL_8))
Kojto 90:cb3d968589d8 294
Kojto 90:cb3d968589d8 295 /* Any or all of the 9 channels can be selected for injected conversion */
Kojto 90:cb3d968589d8 296 #define IS_SDADC_INJECTED_CHANNEL(CHANNEL) (((CHANNEL) != 0) && ((CHANNEL) <= 0x000F01FF))
Kojto 90:cb3d968589d8 297
Kojto 90:cb3d968589d8 298 /**
Kojto 90:cb3d968589d8 299 * @}
Kojto 90:cb3d968589d8 300 */
Kojto 90:cb3d968589d8 301
Kojto 90:cb3d968589d8 302 /** @defgroup SDADC_CalibrationSequence SDADC Calibration Sequence
Kojto 90:cb3d968589d8 303 * @{
Kojto 90:cb3d968589d8 304 */
Kojto 90:cb3d968589d8 305 #define SDADC_CALIBRATION_SEQ_1 ((uint32_t)0x00000000) /*!< One calibration sequence to calculate offset of conf0 (OFFSET0[11:0]) */
Kojto 90:cb3d968589d8 306 #define SDADC_CALIBRATION_SEQ_2 SDADC_CR2_CALIBCNT_0 /*!< Two calibration sequences to calculate offset of conf0 and conf1 (OFFSET0[11:0] and OFFSET1[11:0]) */
Kojto 90:cb3d968589d8 307 #define SDADC_CALIBRATION_SEQ_3 SDADC_CR2_CALIBCNT_1 /*!< Three calibration sequences to calculate offset of conf0, conf1 and conf2 (OFFSET0[11:0], OFFSET1[11:0], and OFFSET2[11:0]) */
Kojto 90:cb3d968589d8 308
Kojto 90:cb3d968589d8 309 #define IS_SDADC_CALIB_SEQUENCE(SEQUENCE) (((SEQUENCE) == SDADC_CALIBRATION_SEQ_1) || \
Kojto 90:cb3d968589d8 310 ((SEQUENCE) == SDADC_CALIBRATION_SEQ_2) || \
Kojto 90:cb3d968589d8 311 ((SEQUENCE) == SDADC_CALIBRATION_SEQ_3))
Kojto 90:cb3d968589d8 312 /**
Kojto 90:cb3d968589d8 313 * @}
Kojto 90:cb3d968589d8 314 */
Kojto 90:cb3d968589d8 315
Kojto 90:cb3d968589d8 316 /** @defgroup SDADC_ContinuousMode SDADC Continuous Mode
Kojto 90:cb3d968589d8 317 * @{
Kojto 90:cb3d968589d8 318 */
Kojto 90:cb3d968589d8 319 #define SDADC_CONTINUOUS_CONV_OFF ((uint32_t)0x00000000) /*!< Conversion are not continuous */
Kojto 90:cb3d968589d8 320 #define SDADC_CONTINUOUS_CONV_ON ((uint32_t)0x00000001) /*!< Conversion are continuous */
Kojto 90:cb3d968589d8 321
Kojto 90:cb3d968589d8 322 #define IS_SDADC_CONTINUOUS_MODE(MODE) (((MODE) == SDADC_CONTINUOUS_CONV_OFF) || \
Kojto 90:cb3d968589d8 323 ((MODE) == SDADC_CONTINUOUS_CONV_ON))
Kojto 90:cb3d968589d8 324 /**
Kojto 90:cb3d968589d8 325 * @}
Kojto 90:cb3d968589d8 326 */
Kojto 90:cb3d968589d8 327
Kojto 90:cb3d968589d8 328 /** @defgroup SDADC_Trigger SDADC Trigger
Kojto 90:cb3d968589d8 329 * @{
Kojto 90:cb3d968589d8 330 */
Kojto 90:cb3d968589d8 331 #define SDADC_SOFTWARE_TRIGGER ((uint32_t)0x00000000) /*!< Software trigger */
Kojto 90:cb3d968589d8 332 #define SDADC_SYNCHRONOUS_TRIGGER ((uint32_t)0x00000001) /*!< Synchronous with SDADC1 (only for SDADC2 and SDADC3) */
Kojto 90:cb3d968589d8 333 #define SDADC_EXTERNAL_TRIGGER ((uint32_t)0x00000002) /*!< External trigger */
Kojto 90:cb3d968589d8 334
Kojto 90:cb3d968589d8 335 #define IS_SDADC_REGULAR_TRIGGER(TRIGGER) (((TRIGGER) == SDADC_SOFTWARE_TRIGGER) || \
Kojto 90:cb3d968589d8 336 ((TRIGGER) == SDADC_SYNCHRONOUS_TRIGGER))
Kojto 90:cb3d968589d8 337
Kojto 90:cb3d968589d8 338 #define IS_SDADC_INJECTED_TRIGGER(TRIGGER) (((TRIGGER) == SDADC_SOFTWARE_TRIGGER) || \
Kojto 90:cb3d968589d8 339 ((TRIGGER) == SDADC_SYNCHRONOUS_TRIGGER) || \
Kojto 90:cb3d968589d8 340 ((TRIGGER) == SDADC_EXTERNAL_TRIGGER))
Kojto 90:cb3d968589d8 341 /**
Kojto 90:cb3d968589d8 342 * @}
Kojto 90:cb3d968589d8 343 */
Kojto 90:cb3d968589d8 344
Kojto 90:cb3d968589d8 345 /** @defgroup SDADC_InjectedExtTrigger SDADC Injected External Trigger
Kojto 90:cb3d968589d8 346 * @{
Kojto 90:cb3d968589d8 347 */
Kojto 90:cb3d968589d8 348 #define SDADC_EXT_TRIG_TIM13_CC1 ((uint32_t)0x00000000) /*!< Trigger source for SDADC1 */
Kojto 90:cb3d968589d8 349 #define SDADC_EXT_TRIG_TIM14_CC1 ((uint32_t)0x00000100) /*!< Trigger source for SDADC1 */
Kojto 90:cb3d968589d8 350 #define SDADC_EXT_TRIG_TIM16_CC1 ((uint32_t)0x00000000) /*!< Trigger source for SDADC3 */
Kojto 90:cb3d968589d8 351 #define SDADC_EXT_TRIG_TIM17_CC1 ((uint32_t)0x00000000) /*!< Trigger source for SDADC2 */
Kojto 90:cb3d968589d8 352 #define SDADC_EXT_TRIG_TIM12_CC1 ((uint32_t)0x00000100) /*!< Trigger source for SDADC2 */
Kojto 90:cb3d968589d8 353 #define SDADC_EXT_TRIG_TIM12_CC2 ((uint32_t)0x00000100) /*!< Trigger source for SDADC3 */
Kojto 90:cb3d968589d8 354 #define SDADC_EXT_TRIG_TIM15_CC2 ((uint32_t)0x00000200) /*!< Trigger source for SDADC1 */
Kojto 90:cb3d968589d8 355 #define SDADC_EXT_TRIG_TIM2_CC3 ((uint32_t)0x00000200) /*!< Trigger source for SDADC2 */
Kojto 90:cb3d968589d8 356 #define SDADC_EXT_TRIG_TIM2_CC4 ((uint32_t)0x00000200) /*!< Trigger source for SDADC3 */
Kojto 90:cb3d968589d8 357 #define SDADC_EXT_TRIG_TIM3_CC1 ((uint32_t)0x00000300) /*!< Trigger source for SDADC1 */
Kojto 90:cb3d968589d8 358 #define SDADC_EXT_TRIG_TIM3_CC2 ((uint32_t)0x00000300) /*!< Trigger source for SDADC2 */
Kojto 90:cb3d968589d8 359 #define SDADC_EXT_TRIG_TIM3_CC3 ((uint32_t)0x00000300) /*!< Trigger source for SDADC3 */
Kojto 90:cb3d968589d8 360 #define SDADC_EXT_TRIG_TIM4_CC1 ((uint32_t)0x00000400) /*!< Trigger source for SDADC1 */
Kojto 90:cb3d968589d8 361 #define SDADC_EXT_TRIG_TIM4_CC2 ((uint32_t)0x00000400) /*!< Trigger source for SDADC2 */
Kojto 90:cb3d968589d8 362 #define SDADC_EXT_TRIG_TIM4_CC3 ((uint32_t)0x00000400) /*!< Trigger source for SDADC3 */
Kojto 90:cb3d968589d8 363 #define SDADC_EXT_TRIG_TIM19_CC2 ((uint32_t)0x00000500) /*!< Trigger source for SDADC1 */
Kojto 90:cb3d968589d8 364 #define SDADC_EXT_TRIG_TIM19_CC3 ((uint32_t)0x00000500) /*!< Trigger source for SDADC2 */
Kojto 90:cb3d968589d8 365 #define SDADC_EXT_TRIG_TIM19_CC4 ((uint32_t)0x00000500) /*!< Trigger source for SDADC3 */
Kojto 90:cb3d968589d8 366 #define SDADC_EXT_TRIG_EXTI11 ((uint32_t)0x00000700) /*!< Trigger source for SDADC1, SDADC2 and SDADC3 */
Kojto 90:cb3d968589d8 367 #define SDADC_EXT_TRIG_EXTI15 ((uint32_t)0x00000600) /*!< Trigger source for SDADC1, SDADC2 and SDADC3 */
Kojto 90:cb3d968589d8 368
Kojto 90:cb3d968589d8 369 #define IS_SDADC_EXT_INJEC_TRIG(INJTRIG) (((INJTRIG) == SDADC_EXT_TRIG_TIM13_CC1) || \
Kojto 90:cb3d968589d8 370 ((INJTRIG) == SDADC_EXT_TRIG_TIM14_CC1) || \
Kojto 90:cb3d968589d8 371 ((INJTRIG) == SDADC_EXT_TRIG_TIM16_CC1) || \
Kojto 90:cb3d968589d8 372 ((INJTRIG) == SDADC_EXT_TRIG_TIM17_CC1) || \
Kojto 90:cb3d968589d8 373 ((INJTRIG) == SDADC_EXT_TRIG_TIM12_CC1) || \
Kojto 90:cb3d968589d8 374 ((INJTRIG) == SDADC_EXT_TRIG_TIM12_CC2) || \
Kojto 90:cb3d968589d8 375 ((INJTRIG) == SDADC_EXT_TRIG_TIM15_CC2) || \
Kojto 90:cb3d968589d8 376 ((INJTRIG) == SDADC_EXT_TRIG_TIM2_CC3) || \
Kojto 90:cb3d968589d8 377 ((INJTRIG) == SDADC_EXT_TRIG_TIM2_CC4) || \
Kojto 90:cb3d968589d8 378 ((INJTRIG) == SDADC_EXT_TRIG_TIM3_CC1) || \
Kojto 90:cb3d968589d8 379 ((INJTRIG) == SDADC_EXT_TRIG_TIM3_CC2) || \
Kojto 90:cb3d968589d8 380 ((INJTRIG) == SDADC_EXT_TRIG_TIM3_CC3) || \
Kojto 90:cb3d968589d8 381 ((INJTRIG) == SDADC_EXT_TRIG_TIM4_CC1) || \
Kojto 90:cb3d968589d8 382 ((INJTRIG) == SDADC_EXT_TRIG_TIM4_CC2) || \
Kojto 90:cb3d968589d8 383 ((INJTRIG) == SDADC_EXT_TRIG_TIM4_CC3) || \
Kojto 90:cb3d968589d8 384 ((INJTRIG) == SDADC_EXT_TRIG_TIM19_CC2) || \
Kojto 90:cb3d968589d8 385 ((INJTRIG) == SDADC_EXT_TRIG_TIM19_CC3) || \
Kojto 90:cb3d968589d8 386 ((INJTRIG) == SDADC_EXT_TRIG_TIM19_CC4) || \
Kojto 90:cb3d968589d8 387 ((INJTRIG) == SDADC_EXT_TRIG_EXTI11) || \
Kojto 90:cb3d968589d8 388 ((INJTRIG) == SDADC_EXT_TRIG_EXTI15))
Kojto 90:cb3d968589d8 389 /**
Kojto 90:cb3d968589d8 390 * @}
Kojto 90:cb3d968589d8 391 */
Kojto 90:cb3d968589d8 392
Kojto 90:cb3d968589d8 393 /** @defgroup SDADC_ExtTriggerEdge SDADC External Trigger Edge
Kojto 90:cb3d968589d8 394 * @{
Kojto 90:cb3d968589d8 395 */
Kojto 90:cb3d968589d8 396 #define SDADC_EXT_TRIG_RISING_EDGE SDADC_CR2_JEXTEN_0 /*!< External rising edge */
Kojto 90:cb3d968589d8 397 #define SDADC_EXT_TRIG_FALLING_EDGE SDADC_CR2_JEXTEN_1 /*!< External falling edge */
Kojto 90:cb3d968589d8 398 #define SDADC_EXT_TRIG_BOTH_EDGES SDADC_CR2_JEXTEN /*!< External rising and falling edges */
Kojto 90:cb3d968589d8 399
Kojto 90:cb3d968589d8 400 #define IS_SDADC_EXT_TRIG_EDGE(TRIGGER) (((TRIGGER) == SDADC_EXT_TRIG_RISING_EDGE) || \
Kojto 90:cb3d968589d8 401 ((TRIGGER) == SDADC_EXT_TRIG_FALLING_EDGE) || \
Kojto 90:cb3d968589d8 402 ((TRIGGER) == SDADC_EXT_TRIG_BOTH_EDGES))
Kojto 90:cb3d968589d8 403 /**
Kojto 90:cb3d968589d8 404 * @}
Kojto 90:cb3d968589d8 405 */
Kojto 90:cb3d968589d8 406
Kojto 90:cb3d968589d8 407 /** @defgroup SDADC_InjectedDelay SDADC Injected Conversion Delay
Kojto 90:cb3d968589d8 408 * @{
Kojto 90:cb3d968589d8 409 */
Kojto 90:cb3d968589d8 410 #define SDADC_INJECTED_DELAY_NONE ((uint32_t)0x00000000) /*!< No delay on injected conversion */
Kojto 90:cb3d968589d8 411 #define SDADC_INJECTED_DELAY SDADC_CR2_JDS /*!< Delay on injected conversion */
Kojto 90:cb3d968589d8 412
Kojto 90:cb3d968589d8 413 #define IS_SDADC_INJECTED_DELAY(DELAY) (((DELAY) == SDADC_INJECTED_DELAY_NONE) || \
Kojto 90:cb3d968589d8 414 ((DELAY) == SDADC_INJECTED_DELAY))
Kojto 90:cb3d968589d8 415 /**
Kojto 90:cb3d968589d8 416 * @}
Kojto 90:cb3d968589d8 417 */
Kojto 90:cb3d968589d8 418
Kojto 90:cb3d968589d8 419 /** @defgroup SDADC_MultimodeType SDADC Multimode Type
Kojto 90:cb3d968589d8 420 * @{
Kojto 90:cb3d968589d8 421 */
Kojto 90:cb3d968589d8 422 #define SDADC_MULTIMODE_SDADC1_SDADC2 ((uint32_t)0x00000000) /*!< Get conversion values for SDADC1 and SDADC2 */
Kojto 90:cb3d968589d8 423 #define SDADC_MULTIMODE_SDADC1_SDADC3 ((uint32_t)0x00000001) /*!< Get conversion values for SDADC1 and SDADC3 */
Kojto 90:cb3d968589d8 424
Kojto 90:cb3d968589d8 425 #define IS_SDADC_MULTIMODE_TYPE(TYPE) (((TYPE) == SDADC_MULTIMODE_SDADC1_SDADC2) || \
Kojto 90:cb3d968589d8 426 ((TYPE) == SDADC_MULTIMODE_SDADC1_SDADC3))
Kojto 90:cb3d968589d8 427 /**
Kojto 90:cb3d968589d8 428 * @}
Kojto 90:cb3d968589d8 429 */
Kojto 90:cb3d968589d8 430
Kojto 90:cb3d968589d8 431 /** @defgroup SDADC_ErrorCode SDADC Error Code
Kojto 90:cb3d968589d8 432 * @{
Kojto 90:cb3d968589d8 433 */
Kojto 90:cb3d968589d8 434 #define SDADC_ERROR_NONE ((uint32_t)0x00000000) /*!< No error */
Kojto 90:cb3d968589d8 435 #define SDADC_ERROR_REGULAR_OVERRUN ((uint32_t)0x00000001) /*!< Overrun occurs during regular conversion */
Kojto 90:cb3d968589d8 436 #define SDADC_ERROR_INJECTED_OVERRUN ((uint32_t)0x00000002) /*!< Overrun occurs during injected conversion */
Kojto 90:cb3d968589d8 437 #define SDADC_ERROR_DMA ((uint32_t)0x00000003) /*!< DMA error occurs */
Kojto 90:cb3d968589d8 438 /**
Kojto 90:cb3d968589d8 439 * @}
Kojto 90:cb3d968589d8 440 */
Kojto 90:cb3d968589d8 441
Kojto 90:cb3d968589d8 442 /**
Kojto 90:cb3d968589d8 443 * @}
Kojto 90:cb3d968589d8 444 */
Kojto 90:cb3d968589d8 445
Kojto 90:cb3d968589d8 446 /* Exported macros -----------------------------------------------------------*/
Kojto 90:cb3d968589d8 447 /** @defgroup SDADC_Exported_Macros SDADC Exported Macros
Kojto 90:cb3d968589d8 448 * @{
Kojto 90:cb3d968589d8 449 */
Kojto 90:cb3d968589d8 450
Kojto 90:cb3d968589d8 451 /** @brief Reset SDADC handle state
Kojto 90:cb3d968589d8 452 * @param __HANDLE__: SDADC handle.
Kojto 90:cb3d968589d8 453 * @retval None
Kojto 90:cb3d968589d8 454 */
Kojto 90:cb3d968589d8 455 #define __HAL_SDADC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_SDADC_STATE_RESET)
Kojto 90:cb3d968589d8 456
Kojto 90:cb3d968589d8 457 /**
Kojto 90:cb3d968589d8 458 * @}
Kojto 90:cb3d968589d8 459 */
Kojto 90:cb3d968589d8 460
Kojto 90:cb3d968589d8 461
Kojto 90:cb3d968589d8 462 /* Exported functions --------------------------------------------------------*/
Kojto 90:cb3d968589d8 463 /** @addtogroup SDADC_Exported_Functions SDADC Exported Functions
Kojto 90:cb3d968589d8 464 * @{
Kojto 90:cb3d968589d8 465 */
Kojto 90:cb3d968589d8 466
Kojto 90:cb3d968589d8 467 /** @addtogroup SDADC_Exported_Functions_Group1 Initialization and de-initialization functions
Kojto 90:cb3d968589d8 468 * @{
Kojto 90:cb3d968589d8 469 */
Kojto 90:cb3d968589d8 470
Kojto 90:cb3d968589d8 471 /* Initialization and de-initialization functions *****************************/
Kojto 90:cb3d968589d8 472 HAL_StatusTypeDef HAL_SDADC_Init(SDADC_HandleTypeDef *hsdadc);
Kojto 90:cb3d968589d8 473 HAL_StatusTypeDef HAL_SDADC_DeInit(SDADC_HandleTypeDef *hsdadc);
Kojto 90:cb3d968589d8 474 void HAL_SDADC_MspInit(SDADC_HandleTypeDef* hsdadc);
Kojto 90:cb3d968589d8 475 void HAL_SDADC_MspDeInit(SDADC_HandleTypeDef* hsdadc);
Kojto 90:cb3d968589d8 476
Kojto 90:cb3d968589d8 477 /**
Kojto 90:cb3d968589d8 478 * @}
Kojto 90:cb3d968589d8 479 */
Kojto 90:cb3d968589d8 480
Kojto 90:cb3d968589d8 481 /** @addtogroup SDADC_Exported_Functions_Group2 peripheral control functions
Kojto 90:cb3d968589d8 482 * @{
Kojto 90:cb3d968589d8 483 */
Kojto 90:cb3d968589d8 484
Kojto 90:cb3d968589d8 485 /* Peripheral Control functions ***********************************************/
Kojto 90:cb3d968589d8 486 HAL_StatusTypeDef HAL_SDADC_PrepareChannelConfig(SDADC_HandleTypeDef *hsdadc,
Kojto 90:cb3d968589d8 487 uint32_t ConfIndex,
Kojto 90:cb3d968589d8 488 SDADC_ConfParamTypeDef* ConfParamStruct);
Kojto 90:cb3d968589d8 489 HAL_StatusTypeDef HAL_SDADC_AssociateChannelConfig(SDADC_HandleTypeDef *hsdadc,
Kojto 90:cb3d968589d8 490 uint32_t Channel,
Kojto 90:cb3d968589d8 491 uint32_t ConfIndex);
Kojto 90:cb3d968589d8 492 HAL_StatusTypeDef HAL_SDADC_ConfigChannel(SDADC_HandleTypeDef *hsdadc,
Kojto 90:cb3d968589d8 493 uint32_t Channel,
Kojto 90:cb3d968589d8 494 uint32_t ContinuousMode);
Kojto 90:cb3d968589d8 495 HAL_StatusTypeDef HAL_SDADC_InjectedConfigChannel(SDADC_HandleTypeDef *hsdadc,
Kojto 90:cb3d968589d8 496 uint32_t Channel,
Kojto 90:cb3d968589d8 497 uint32_t ContinuousMode);
Kojto 90:cb3d968589d8 498 HAL_StatusTypeDef HAL_SDADC_SelectInjectedExtTrigger(SDADC_HandleTypeDef *hsdadc,
Kojto 90:cb3d968589d8 499 uint32_t InjectedExtTrigger,
Kojto 90:cb3d968589d8 500 uint32_t ExtTriggerEdge);
Kojto 90:cb3d968589d8 501 HAL_StatusTypeDef HAL_SDADC_SelectInjectedDelay(SDADC_HandleTypeDef *hsdadc,
Kojto 90:cb3d968589d8 502 uint32_t InjectedDelay);
Kojto 90:cb3d968589d8 503 HAL_StatusTypeDef HAL_SDADC_SelectRegularTrigger(SDADC_HandleTypeDef *hsdadc, uint32_t Trigger);
Kojto 90:cb3d968589d8 504 HAL_StatusTypeDef HAL_SDADC_SelectInjectedTrigger(SDADC_HandleTypeDef *hsdadc, uint32_t Trigger);
Kojto 90:cb3d968589d8 505 HAL_StatusTypeDef HAL_SDADC_MultiModeConfigChannel(SDADC_HandleTypeDef* hsdadc, uint32_t MultimodeType);
Kojto 90:cb3d968589d8 506 HAL_StatusTypeDef HAL_SDADC_InjectedMultiModeConfigChannel(SDADC_HandleTypeDef* hsdadc, uint32_t MultimodeType);
Kojto 90:cb3d968589d8 507
Kojto 90:cb3d968589d8 508 /**
Kojto 90:cb3d968589d8 509 * @}
Kojto 90:cb3d968589d8 510 */
Kojto 90:cb3d968589d8 511
Kojto 90:cb3d968589d8 512 /** @addtogroup SDADC_Exported_Functions_Group3 Input and Output operation functions
Kojto 90:cb3d968589d8 513 * @{
Kojto 90:cb3d968589d8 514 */
Kojto 90:cb3d968589d8 515
Kojto 90:cb3d968589d8 516 /* IO operation functions *****************************************************/
Kojto 90:cb3d968589d8 517 HAL_StatusTypeDef HAL_SDADC_CalibrationStart(SDADC_HandleTypeDef *hsdadc, uint32_t CalibrationSequence);
Kojto 90:cb3d968589d8 518 HAL_StatusTypeDef HAL_SDADC_CalibrationStart_IT(SDADC_HandleTypeDef *hsdadc, uint32_t CalibrationSequence);
Kojto 90:cb3d968589d8 519
Kojto 90:cb3d968589d8 520 HAL_StatusTypeDef HAL_SDADC_Start(SDADC_HandleTypeDef *hsdadc);
Kojto 90:cb3d968589d8 521 HAL_StatusTypeDef HAL_SDADC_Start_IT(SDADC_HandleTypeDef *hsdadc);
Kojto 90:cb3d968589d8 522 HAL_StatusTypeDef HAL_SDADC_Start_DMA(SDADC_HandleTypeDef *hsdadc, uint32_t *pData, uint32_t Length);
Kojto 90:cb3d968589d8 523 HAL_StatusTypeDef HAL_SDADC_Stop(SDADC_HandleTypeDef *hsdadc);
Kojto 90:cb3d968589d8 524 HAL_StatusTypeDef HAL_SDADC_Stop_IT(SDADC_HandleTypeDef *hsdadc);
Kojto 90:cb3d968589d8 525 HAL_StatusTypeDef HAL_SDADC_Stop_DMA(SDADC_HandleTypeDef *hsdadc);
Kojto 90:cb3d968589d8 526
Kojto 90:cb3d968589d8 527 HAL_StatusTypeDef HAL_SDADC_InjectedStart(SDADC_HandleTypeDef *hsdadc);
Kojto 90:cb3d968589d8 528 HAL_StatusTypeDef HAL_SDADC_InjectedStart_IT(SDADC_HandleTypeDef *hsdadc);
Kojto 90:cb3d968589d8 529 HAL_StatusTypeDef HAL_SDADC_InjectedStart_DMA(SDADC_HandleTypeDef *hsdadc, uint32_t *pData, uint32_t Length);
Kojto 90:cb3d968589d8 530 HAL_StatusTypeDef HAL_SDADC_InjectedStop(SDADC_HandleTypeDef *hsdadc);
Kojto 90:cb3d968589d8 531 HAL_StatusTypeDef HAL_SDADC_InjectedStop_IT(SDADC_HandleTypeDef *hsdadc);
Kojto 90:cb3d968589d8 532 HAL_StatusTypeDef HAL_SDADC_InjectedStop_DMA(SDADC_HandleTypeDef *hsdadc);
Kojto 90:cb3d968589d8 533
Kojto 90:cb3d968589d8 534 HAL_StatusTypeDef HAL_SDADC_MultiModeStart_DMA(SDADC_HandleTypeDef* hsdadc, uint32_t* pData, uint32_t Length);
Kojto 90:cb3d968589d8 535 HAL_StatusTypeDef HAL_SDADC_MultiModeStop_DMA(SDADC_HandleTypeDef* hsdadc);
Kojto 90:cb3d968589d8 536 HAL_StatusTypeDef HAL_SDADC_InjectedMultiModeStart_DMA(SDADC_HandleTypeDef* hsdadc, uint32_t* pData, uint32_t Length);
Kojto 90:cb3d968589d8 537 HAL_StatusTypeDef HAL_SDADC_InjectedMultiModeStop_DMA(SDADC_HandleTypeDef* hsdadc);
Kojto 90:cb3d968589d8 538
Kojto 90:cb3d968589d8 539 uint32_t HAL_SDADC_GetValue(SDADC_HandleTypeDef *hsdadc);
Kojto 90:cb3d968589d8 540 uint32_t HAL_SDADC_InjectedGetValue(SDADC_HandleTypeDef *hsdadc, uint32_t* Channel);
Kojto 90:cb3d968589d8 541 uint32_t HAL_SDADC_MultiModeGetValue(SDADC_HandleTypeDef* hsdadc);
Kojto 90:cb3d968589d8 542 uint32_t HAL_SDADC_InjectedMultiModeGetValue(SDADC_HandleTypeDef* hsdadc);
Kojto 90:cb3d968589d8 543
Kojto 90:cb3d968589d8 544 void HAL_SDADC_IRQHandler(SDADC_HandleTypeDef* hsdadc);
Kojto 90:cb3d968589d8 545
Kojto 90:cb3d968589d8 546 HAL_StatusTypeDef HAL_SDADC_PollForCalibEvent(SDADC_HandleTypeDef* hsdadc, uint32_t Timeout);
Kojto 90:cb3d968589d8 547 HAL_StatusTypeDef HAL_SDADC_PollForConversion(SDADC_HandleTypeDef* hsdadc, uint32_t Timeout);
Kojto 90:cb3d968589d8 548 HAL_StatusTypeDef HAL_SDADC_PollForInjectedConversion(SDADC_HandleTypeDef* hsdadc, uint32_t Timeout);
Kojto 90:cb3d968589d8 549
Kojto 90:cb3d968589d8 550 void HAL_SDADC_CalibrationCpltCallback(SDADC_HandleTypeDef* hsdadc);
Kojto 90:cb3d968589d8 551 void HAL_SDADC_ConvHalfCpltCallback(SDADC_HandleTypeDef* hsdadc);
Kojto 90:cb3d968589d8 552 void HAL_SDADC_ConvCpltCallback(SDADC_HandleTypeDef* hsdadc);
Kojto 90:cb3d968589d8 553 void HAL_SDADC_InjectedConvHalfCpltCallback(SDADC_HandleTypeDef* hsdadc);
Kojto 90:cb3d968589d8 554 void HAL_SDADC_InjectedConvCpltCallback(SDADC_HandleTypeDef* hsdadc);
Kojto 90:cb3d968589d8 555 void HAL_SDADC_ErrorCallback(SDADC_HandleTypeDef* hsdadc);
Kojto 90:cb3d968589d8 556
Kojto 90:cb3d968589d8 557 /**
Kojto 90:cb3d968589d8 558 * @}
Kojto 90:cb3d968589d8 559 */
Kojto 90:cb3d968589d8 560
Kojto 90:cb3d968589d8 561 /** @defgroup SDADC_Exported_Functions_Group4 Peripheral State functions
Kojto 90:cb3d968589d8 562 * @{
Kojto 90:cb3d968589d8 563 */
Kojto 90:cb3d968589d8 564
Kojto 90:cb3d968589d8 565 /* Peripheral State and Error functions ***************************************/
Kojto 90:cb3d968589d8 566 HAL_SDADC_StateTypeDef HAL_SDADC_GetState(SDADC_HandleTypeDef* hsdadc);
Kojto 90:cb3d968589d8 567 uint32_t HAL_SDADC_GetError(SDADC_HandleTypeDef* hsdadc);
Kojto 90:cb3d968589d8 568
Kojto 90:cb3d968589d8 569 /* Private functions ---------------------------------------------------------*/
Kojto 90:cb3d968589d8 570
Kojto 90:cb3d968589d8 571 /**
Kojto 90:cb3d968589d8 572 * @}
Kojto 90:cb3d968589d8 573 */
Kojto 90:cb3d968589d8 574
Kojto 90:cb3d968589d8 575 /**
Kojto 90:cb3d968589d8 576 * @}
Kojto 90:cb3d968589d8 577 */
Kojto 90:cb3d968589d8 578
Kojto 90:cb3d968589d8 579 /**
Kojto 90:cb3d968589d8 580 * @}
Kojto 90:cb3d968589d8 581 */
Kojto 90:cb3d968589d8 582
Kojto 90:cb3d968589d8 583 /**
Kojto 90:cb3d968589d8 584 * @}
Kojto 90:cb3d968589d8 585 */
Kojto 90:cb3d968589d8 586
Kojto 90:cb3d968589d8 587 #endif /* defined(STM32F373xC) || defined(STM32F378xx) */
Kojto 90:cb3d968589d8 588
Kojto 90:cb3d968589d8 589 #ifdef __cplusplus
Kojto 90:cb3d968589d8 590 }
Kojto 90:cb3d968589d8 591 #endif
Kojto 90:cb3d968589d8 592
Kojto 90:cb3d968589d8 593 #endif /*__STM32F3xx_SDADC_H */
Kojto 90:cb3d968589d8 594
Kojto 90:cb3d968589d8 595
Kojto 90:cb3d968589d8 596 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/