Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2 | Rev 5 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | /** |
1 | /** |
| 2 | ****************************************************************************** |
2 | ****************************************************************************** |
| 3 | * @file stm32f1xx_hal_adc_ex.h |
3 | * @file stm32f1xx_hal_adc_ex.h |
| 4 | * @author MCD Application Team |
4 | * @author MCD Application Team |
| 5 | * @version V1.0.1 |
5 | * @version V1.0.4 |
| 6 | * @date 31-July-2015 |
6 | * @date 29-April-2016 |
| 7 | * @brief Header file of ADC HAL extension module. |
7 | * @brief Header file of ADC HAL extension module. |
| 8 | ****************************************************************************** |
8 | ****************************************************************************** |
| 9 | * @attention |
9 | * @attention |
| 10 | * |
10 | * |
| 11 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
11 | * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> |
| 12 | * |
12 | * |
| 13 | * Redistribution and use in source and binary forms, with or without modification, |
13 | * Redistribution and use in source and binary forms, with or without modification, |
| 14 | * are permitted provided that the following conditions are met: |
14 | * are permitted provided that the following conditions are met: |
| 15 | * 1. Redistributions of source code must retain the above copyright notice, |
15 | * 1. Redistributions of source code must retain the above copyright notice, |
| 16 | * this list of conditions and the following disclaimer. |
16 | * this list of conditions and the following disclaimer. |
| Line 205... | Line 205... | ||
| 205 | #define ADC_EXTERNALTRIGCONV_T1_CC3 ADC1_2_3_EXTERNALTRIG_T1_CC3 |
205 | #define ADC_EXTERNALTRIGCONV_T1_CC3 ADC1_2_3_EXTERNALTRIG_T1_CC3 |
| 206 | 206 | ||
| 207 | #if defined (STM32F101xE) || defined (STM32F101xG) || defined (STM32F103xE) || defined (STM32F103xG) || defined (STM32F105xC) || defined (STM32F107xC) |
207 | #if defined (STM32F101xE) || defined (STM32F101xG) || defined (STM32F103xE) || defined (STM32F103xG) || defined (STM32F105xC) || defined (STM32F107xC) |
| 208 | /*!< Note: TIM8_TRGO is available on ADC1 and ADC2 only in high-density and */ |
208 | /*!< Note: TIM8_TRGO is available on ADC1 and ADC2 only in high-density and */ |
| 209 | /* XL-density devices. */ |
209 | /* XL-density devices. */ |
| 210 | /* To use it on ADC or ADC2, a rempap of trigger must be done from */ |
210 | /* To use it on ADC or ADC2, a remap of trigger must be done from */ |
| 211 | /* EXTI line 11 to TIM8_TRGO with macro: */ |
211 | /* EXTI line 11 to TIM8_TRGO with macro: */ |
| 212 | /* __HAL_AFIO_REMAP_ADC1_ETRGREG_ENABLE() */ |
212 | /* __HAL_AFIO_REMAP_ADC1_ETRGREG_ENABLE() */ |
| 213 | /* __HAL_AFIO_REMAP_ADC2_ETRGREG_ENABLE() */ |
213 | /* __HAL_AFIO_REMAP_ADC2_ETRGREG_ENABLE() */ |
| 214 | 214 | ||
| 215 | /* Note for internal constant value management: If TIM8_TRGO is available, */ |
215 | /* Note for internal constant value management: If TIM8_TRGO is available, */ |
| Line 249... | Line 249... | ||
| 249 | #define ADC_EXTERNALTRIGINJECCONV_T1_TRGO ADC1_2_3_EXTERNALTRIGINJEC_T1_TRGO |
249 | #define ADC_EXTERNALTRIGINJECCONV_T1_TRGO ADC1_2_3_EXTERNALTRIGINJEC_T1_TRGO |
| 250 | 250 | ||
| 251 | #if defined (STM32F101xE) || defined (STM32F101xG) || defined (STM32F103xE) || defined (STM32F103xG) || defined (STM32F105xC) || defined (STM32F107xC) |
251 | #if defined (STM32F101xE) || defined (STM32F101xG) || defined (STM32F103xE) || defined (STM32F103xG) || defined (STM32F105xC) || defined (STM32F107xC) |
| 252 | /*!< Note: TIM8_CC4 is available on ADC1 and ADC2 only in high-density and */ |
252 | /*!< Note: TIM8_CC4 is available on ADC1 and ADC2 only in high-density and */ |
| 253 | /* XL-density devices. */ |
253 | /* XL-density devices. */ |
| 254 | /* To use it on ADC or ADC2, a rempap of trigger must be done from */ |
254 | /* To use it on ADC1 or ADC2, a remap of trigger must be done from */ |
| 255 | /* EXTI line 11 to TIM8_TRGO with macro: */ |
255 | /* EXTI line 11 to TIM8_CC4 with macro: */ |
| 256 | /* __HAL_AFIO_REMAP_ADC1_ETRGINJ_ENABLE() */ |
256 | /* __HAL_AFIO_REMAP_ADC1_ETRGINJ_ENABLE() */ |
| 257 | /* __HAL_AFIO_REMAP_ADC2_ETRGINJ_ENABLE() */ |
257 | /* __HAL_AFIO_REMAP_ADC2_ETRGINJ_ENABLE() */ |
| 258 | 258 | ||
| 259 | /* Note for internal constant value management: If TIM8_CC4 is available, */ |
259 | /* Note for internal constant value management: If TIM8_CC4 is available, */ |
| 260 | /* its definition is set to value for ADC1&ADC2 by default and changed to */ |
260 | /* its definition is set to value for ADC1&ADC2 by default and changed to */ |
| Line 299... | Line 299... | ||
| 299 | 299 | ||
| 300 | /** @defgroup ADCEx_Internal_HAL_driver_Ext_trig_src_Regular ADC Extended Internal HAL driver trigger selection for regular group |
300 | /** @defgroup ADCEx_Internal_HAL_driver_Ext_trig_src_Regular ADC Extended Internal HAL driver trigger selection for regular group |
| 301 | * @{ |
301 | * @{ |
| 302 | */ |
302 | */ |
| 303 | /* List of external triggers of regular group for ADC1, ADC2, ADC3 (if ADC */ |
303 | /* List of external triggers of regular group for ADC1, ADC2, ADC3 (if ADC */ |
| 304 | /* instance is availble on the selected device). */ |
304 | /* instance is available on the selected device). */ |
| 305 | /* (used internally by HAL driver. To not use into HAL structure parameters) */ |
305 | /* (used internally by HAL driver. To not use into HAL structure parameters) */ |
| 306 | 306 | ||
| 307 | /* External triggers of regular group for ADC1&ADC2 (if ADCx available) */ |
307 | /* External triggers of regular group for ADC1&ADC2 (if ADCx available) */ |
| 308 | #define ADC1_2_EXTERNALTRIG_T1_CC1 ((uint32_t) 0x00000000) |
308 | #define ADC1_2_EXTERNALTRIG_T1_CC1 ((uint32_t) 0x00000000) |
| 309 | #define ADC1_2_EXTERNALTRIG_T1_CC2 ((uint32_t)( ADC_CR2_EXTSEL_0)) |
309 | #define ADC1_2_EXTERNALTRIG_T1_CC2 ((uint32_t)( ADC_CR2_EXTSEL_0)) |
| Line 336... | Line 336... | ||
| 336 | 336 | ||
| 337 | /** @defgroup ADCEx_Internal_HAL_driver_Ext_trig_src_Injected ADC Extended Internal HAL driver trigger selection for injected group |
337 | /** @defgroup ADCEx_Internal_HAL_driver_Ext_trig_src_Injected ADC Extended Internal HAL driver trigger selection for injected group |
| 338 | * @{ |
338 | * @{ |
| 339 | */ |
339 | */ |
| 340 | /* List of external triggers of injected group for ADC1, ADC2, ADC3 (if ADC */ |
340 | /* List of external triggers of injected group for ADC1, ADC2, ADC3 (if ADC */ |
| 341 | /* instance is availble on the selected device). */ |
341 | /* instance is available on the selected device). */ |
| 342 | /* (used internally by HAL driver. To not use into HAL structure parameters) */ |
342 | /* (used internally by HAL driver. To not use into HAL structure parameters) */ |
| 343 | 343 | ||
| 344 | /* External triggers of injected group for ADC1&ADC2 (if ADCx available) */ |
344 | /* External triggers of injected group for ADC1&ADC2 (if ADCx available) */ |
| 345 | #define ADC1_2_EXTERNALTRIGINJEC_T2_TRGO ((uint32_t)( ADC_CR2_JEXTSEL_1 )) |
345 | #define ADC1_2_EXTERNALTRIGINJEC_T2_TRGO ((uint32_t)( ADC_CR2_JEXTSEL_1 )) |
| 346 | #define ADC1_2_EXTERNALTRIGINJEC_T2_CC1 ((uint32_t)( ADC_CR2_JEXTSEL_1 | ADC_CR2_JEXTSEL_0)) |
346 | #define ADC1_2_EXTERNALTRIGINJEC_T2_CC1 ((uint32_t)( ADC_CR2_JEXTSEL_1 | ADC_CR2_JEXTSEL_0)) |