stm32f0xx_adc.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. /**
  2. ******************************************************************************
  3. * @file stm32f0xx_adc.h
  4. * @author MCD Application Team
  5. * @version V1.5.0
  6. * @date 05-December-2014
  7. * @brief This file contains all the functions prototypes for the ADC firmware
  8. * library
  9. ******************************************************************************
  10. * @attention
  11. *
  12. * <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2>
  13. *
  14. * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
  15. * You may not use this file except in compliance with the License.
  16. * You may obtain a copy of the License at:
  17. *
  18. * http://www.st.com/software_license_agreement_liberty_v2
  19. *
  20. * Unless required by applicable law or agreed to in writing, software
  21. * distributed under the License is distributed on an "AS IS" BASIS,
  22. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23. * See the License for the specific language governing permissions and
  24. * limitations under the License.
  25. *
  26. ******************************************************************************
  27. */
  28. /* Define to prevent recursive inclusion -------------------------------------*/
  29. #ifndef __STM32F0XX_ADC_H
  30. #define __STM32F0XX_ADC_H
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. /* Includes ------------------------------------------------------------------*/
  35. #include "stm32f0xx.h"
  36. /** @addtogroup STM32F0xx_StdPeriph_Driver
  37. * @{
  38. */
  39. /** @addtogroup ADC
  40. * @{
  41. */
  42. /* Exported types ------------------------------------------------------------*/
  43. /**
  44. * @brief ADC Init structure definition
  45. */
  46. typedef struct
  47. {
  48. uint32_t ADC_Resolution; /*!< Selects the resolution of the conversion.
  49. This parameter can be a value of @ref ADC_Resolution */
  50. FunctionalState ADC_ContinuousConvMode; /*!< Specifies whether the conversion is performed in
  51. Continuous or Single mode.
  52. This parameter can be set to ENABLE or DISABLE. */
  53. uint32_t ADC_ExternalTrigConvEdge; /*!< Selects the external trigger Edge and enables the
  54. trigger of a regular group. This parameter can be a value
  55. of @ref ADC_external_trigger_edge_conversion */
  56. uint32_t ADC_ExternalTrigConv; /*!< Defines the external trigger used to start the analog
  57. to digital conversion of regular channels. This parameter
  58. can be a value of @ref ADC_external_trigger_sources_for_channels_conversion */
  59. uint32_t ADC_DataAlign; /*!< Specifies whether the ADC data alignment is left or right.
  60. This parameter can be a value of @ref ADC_data_align */
  61. uint32_t ADC_ScanDirection; /*!< Specifies in which direction the channels will be scanned
  62. in the sequence.
  63. This parameter can be a value of @ref ADC_Scan_Direction */
  64. }ADC_InitTypeDef;
  65. /* Exported constants --------------------------------------------------------*/
  66. /** @defgroup ADC_Exported_Constants
  67. * @{
  68. */
  69. #define IS_ADC_ALL_PERIPH(PERIPH) ((PERIPH) == ADC1)
  70. /** @defgroup ADC_JitterOff
  71. * @{
  72. */
  73. /* These defines are obsolete and maintained for legacy purpose only. They are replaced by the ADC_ClockMode */
  74. #define ADC_JitterOff_PCLKDiv2 ADC_CFGR2_JITOFFDIV2
  75. #define ADC_JitterOff_PCLKDiv4 ADC_CFGR2_JITOFFDIV4
  76. #define IS_ADC_JITTEROFF(JITTEROFF) (((JITTEROFF) & 0x3FFFFFFF) == (uint32_t)RESET)
  77. /**
  78. * @}
  79. */
  80. /** @defgroup ADC_ClockMode
  81. * @{
  82. */
  83. #define ADC_ClockMode_AsynClk ((uint32_t)0x00000000) /*!< ADC Asynchronous clock mode */
  84. #define ADC_ClockMode_SynClkDiv2 ADC_CFGR2_CKMODE_0 /*!< Synchronous clock mode divided by 2 */
  85. #define ADC_ClockMode_SynClkDiv4 ADC_CFGR2_CKMODE_1 /*!< Synchronous clock mode divided by 4 */
  86. #define IS_ADC_CLOCKMODE(CLOCK) (((CLOCK) == ADC_ClockMode_AsynClk) ||\
  87. ((CLOCK) == ADC_ClockMode_SynClkDiv2) ||\
  88. ((CLOCK) == ADC_ClockMode_SynClkDiv4))
  89. /**
  90. * @}
  91. */
  92. /** @defgroup ADC_Resolution
  93. * @{
  94. */
  95. #define ADC_Resolution_12b ((uint32_t)0x00000000)
  96. #define ADC_Resolution_10b ADC_CFGR1_RES_0
  97. #define ADC_Resolution_8b ADC_CFGR1_RES_1
  98. #define ADC_Resolution_6b ADC_CFGR1_RES
  99. #define IS_ADC_RESOLUTION(RESOLUTION) (((RESOLUTION) == ADC_Resolution_12b) || \
  100. ((RESOLUTION) == ADC_Resolution_10b) || \
  101. ((RESOLUTION) == ADC_Resolution_8b) || \
  102. ((RESOLUTION) == ADC_Resolution_6b))
  103. /**
  104. * @}
  105. */
  106. /** @defgroup ADC_external_trigger_edge_conversion
  107. * @{
  108. */
  109. #define ADC_ExternalTrigConvEdge_None ((uint32_t)0x00000000)
  110. #define ADC_ExternalTrigConvEdge_Rising ADC_CFGR1_EXTEN_0
  111. #define ADC_ExternalTrigConvEdge_Falling ADC_CFGR1_EXTEN_1
  112. #define ADC_ExternalTrigConvEdge_RisingFalling ADC_CFGR1_EXTEN
  113. #define IS_ADC_EXT_TRIG_EDGE(EDGE) (((EDGE) == ADC_ExternalTrigConvEdge_None) || \
  114. ((EDGE) == ADC_ExternalTrigConvEdge_Rising) || \
  115. ((EDGE) == ADC_ExternalTrigConvEdge_Falling) || \
  116. ((EDGE) == ADC_ExternalTrigConvEdge_RisingFalling))
  117. /**
  118. * @}
  119. */
  120. /** @defgroup ADC_external_trigger_sources_for_channels_conversion
  121. * @{
  122. */
  123. /* TIM1 */
  124. #define ADC_ExternalTrigConv_T1_TRGO ((uint32_t)0x00000000)
  125. #define ADC_ExternalTrigConv_T1_CC4 ADC_CFGR1_EXTSEL_0
  126. /* TIM2 */
  127. #define ADC_ExternalTrigConv_T2_TRGO ADC_CFGR1_EXTSEL_1
  128. /* TIM3 */
  129. #define ADC_ExternalTrigConv_T3_TRGO ((uint32_t)(ADC_CFGR1_EXTSEL_0 | ADC_CFGR1_EXTSEL_1))
  130. /* TIM15 */
  131. #define ADC_ExternalTrigConv_T15_TRGO ADC_CFGR1_EXTSEL_2
  132. #define IS_ADC_EXTERNAL_TRIG_CONV(CONV) (((CONV) == ADC_ExternalTrigConv_T1_TRGO) || \
  133. ((CONV) == ADC_ExternalTrigConv_T1_CC4) || \
  134. ((CONV) == ADC_ExternalTrigConv_T2_TRGO) || \
  135. ((CONV) == ADC_ExternalTrigConv_T3_TRGO) || \
  136. ((CONV) == ADC_ExternalTrigConv_T15_TRGO))
  137. /**
  138. * @}
  139. */
  140. /** @defgroup ADC_data_align
  141. * @{
  142. */
  143. #define ADC_DataAlign_Right ((uint32_t)0x00000000)
  144. #define ADC_DataAlign_Left ADC_CFGR1_ALIGN
  145. #define IS_ADC_DATA_ALIGN(ALIGN) (((ALIGN) == ADC_DataAlign_Right) || \
  146. ((ALIGN) == ADC_DataAlign_Left))
  147. /**
  148. * @}
  149. */
  150. /** @defgroup ADC_Scan_Direction
  151. * @{
  152. */
  153. #define ADC_ScanDirection_Upward ((uint32_t)0x00000000)
  154. #define ADC_ScanDirection_Backward ADC_CFGR1_SCANDIR
  155. #define IS_ADC_SCAN_DIRECTION(DIRECTION) (((DIRECTION) == ADC_ScanDirection_Upward) || \
  156. ((DIRECTION) == ADC_ScanDirection_Backward))
  157. /**
  158. * @}
  159. */
  160. /** @defgroup ADC_DMA_Mode
  161. * @{
  162. */
  163. #define ADC_DMAMode_OneShot ((uint32_t)0x00000000)
  164. #define ADC_DMAMode_Circular ADC_CFGR1_DMACFG
  165. #define IS_ADC_DMA_MODE(MODE) (((MODE) == ADC_DMAMode_OneShot) || \
  166. ((MODE) == ADC_DMAMode_Circular))
  167. /**
  168. * @}
  169. */
  170. /** @defgroup ADC_analog_watchdog_selection
  171. * @{
  172. */
  173. #define ADC_AnalogWatchdog_Channel_0 ((uint32_t)0x00000000)
  174. #define ADC_AnalogWatchdog_Channel_1 ((uint32_t)0x04000000)
  175. #define ADC_AnalogWatchdog_Channel_2 ((uint32_t)0x08000000)
  176. #define ADC_AnalogWatchdog_Channel_3 ((uint32_t)0x0C000000)
  177. #define ADC_AnalogWatchdog_Channel_4 ((uint32_t)0x10000000)
  178. #define ADC_AnalogWatchdog_Channel_5 ((uint32_t)0x14000000)
  179. #define ADC_AnalogWatchdog_Channel_6 ((uint32_t)0x18000000)
  180. #define ADC_AnalogWatchdog_Channel_7 ((uint32_t)0x1C000000)
  181. #define ADC_AnalogWatchdog_Channel_8 ((uint32_t)0x20000000)
  182. #define ADC_AnalogWatchdog_Channel_9 ((uint32_t)0x24000000)
  183. #define ADC_AnalogWatchdog_Channel_10 ((uint32_t)0x28000000) /*!< Not available for STM32F031 devices */
  184. #define ADC_AnalogWatchdog_Channel_11 ((uint32_t)0x2C000000) /*!< Not available for STM32F031 devices */
  185. #define ADC_AnalogWatchdog_Channel_12 ((uint32_t)0x30000000) /*!< Not available for STM32F031 devices */
  186. #define ADC_AnalogWatchdog_Channel_13 ((uint32_t)0x34000000) /*!< Not available for STM32F031 devices */
  187. #define ADC_AnalogWatchdog_Channel_14 ((uint32_t)0x38000000) /*!< Not available for STM32F031 devices */
  188. #define ADC_AnalogWatchdog_Channel_15 ((uint32_t)0x3C000000) /*!< Not available for STM32F031 devices */
  189. #define ADC_AnalogWatchdog_Channel_16 ((uint32_t)0x40000000)
  190. #define ADC_AnalogWatchdog_Channel_17 ((uint32_t)0x44000000)
  191. #define ADC_AnalogWatchdog_Channel_18 ((uint32_t)0x48000000)
  192. #define IS_ADC_ANALOG_WATCHDOG_CHANNEL(CHANNEL) (((CHANNEL) == ADC_AnalogWatchdog_Channel_0) || \
  193. ((CHANNEL) == ADC_AnalogWatchdog_Channel_1) || \
  194. ((CHANNEL) == ADC_AnalogWatchdog_Channel_2) || \
  195. ((CHANNEL) == ADC_AnalogWatchdog_Channel_3) || \
  196. ((CHANNEL) == ADC_AnalogWatchdog_Channel_4) || \
  197. ((CHANNEL) == ADC_AnalogWatchdog_Channel_5) || \
  198. ((CHANNEL) == ADC_AnalogWatchdog_Channel_6) || \
  199. ((CHANNEL) == ADC_AnalogWatchdog_Channel_7) || \
  200. ((CHANNEL) == ADC_AnalogWatchdog_Channel_8) || \
  201. ((CHANNEL) == ADC_AnalogWatchdog_Channel_9) || \
  202. ((CHANNEL) == ADC_AnalogWatchdog_Channel_10) || \
  203. ((CHANNEL) == ADC_AnalogWatchdog_Channel_11) || \
  204. ((CHANNEL) == ADC_AnalogWatchdog_Channel_12) || \
  205. ((CHANNEL) == ADC_AnalogWatchdog_Channel_13) || \
  206. ((CHANNEL) == ADC_AnalogWatchdog_Channel_14) || \
  207. ((CHANNEL) == ADC_AnalogWatchdog_Channel_15) || \
  208. ((CHANNEL) == ADC_AnalogWatchdog_Channel_16) || \
  209. ((CHANNEL) == ADC_AnalogWatchdog_Channel_17) || \
  210. ((CHANNEL) == ADC_AnalogWatchdog_Channel_18))
  211. /**
  212. * @}
  213. */
  214. /** @defgroup ADC_sampling_times
  215. * @{
  216. */
  217. #define ADC_SampleTime_1_5Cycles ((uint32_t)0x00000000)
  218. #define ADC_SampleTime_7_5Cycles ((uint32_t)0x00000001)
  219. #define ADC_SampleTime_13_5Cycles ((uint32_t)0x00000002)
  220. #define ADC_SampleTime_28_5Cycles ((uint32_t)0x00000003)
  221. #define ADC_SampleTime_41_5Cycles ((uint32_t)0x00000004)
  222. #define ADC_SampleTime_55_5Cycles ((uint32_t)0x00000005)
  223. #define ADC_SampleTime_71_5Cycles ((uint32_t)0x00000006)
  224. #define ADC_SampleTime_239_5Cycles ((uint32_t)0x00000007)
  225. #define IS_ADC_SAMPLE_TIME(TIME) (((TIME) == ADC_SampleTime_1_5Cycles) || \
  226. ((TIME) == ADC_SampleTime_7_5Cycles) || \
  227. ((TIME) == ADC_SampleTime_13_5Cycles) || \
  228. ((TIME) == ADC_SampleTime_28_5Cycles) || \
  229. ((TIME) == ADC_SampleTime_41_5Cycles) || \
  230. ((TIME) == ADC_SampleTime_55_5Cycles) || \
  231. ((TIME) == ADC_SampleTime_71_5Cycles) || \
  232. ((TIME) == ADC_SampleTime_239_5Cycles))
  233. /**
  234. * @}
  235. */
  236. /** @defgroup ADC_thresholds
  237. * @{
  238. */
  239. #define IS_ADC_THRESHOLD(THRESHOLD) ((THRESHOLD) <= 0xFFF)
  240. /**
  241. * @}
  242. */
  243. /** @defgroup ADC_channels
  244. * @{
  245. */
  246. #define ADC_Channel_0 ADC_CHSELR_CHSEL0
  247. #define ADC_Channel_1 ADC_CHSELR_CHSEL1
  248. #define ADC_Channel_2 ADC_CHSELR_CHSEL2
  249. #define ADC_Channel_3 ADC_CHSELR_CHSEL3
  250. #define ADC_Channel_4 ADC_CHSELR_CHSEL4
  251. #define ADC_Channel_5 ADC_CHSELR_CHSEL5
  252. #define ADC_Channel_6 ADC_CHSELR_CHSEL6
  253. #define ADC_Channel_7 ADC_CHSELR_CHSEL7
  254. #define ADC_Channel_8 ADC_CHSELR_CHSEL8
  255. #define ADC_Channel_9 ADC_CHSELR_CHSEL9
  256. #define ADC_Channel_10 ADC_CHSELR_CHSEL10 /*!< Not available for STM32F031 devices */
  257. #define ADC_Channel_11 ADC_CHSELR_CHSEL11 /*!< Not available for STM32F031 devices */
  258. #define ADC_Channel_12 ADC_CHSELR_CHSEL12 /*!< Not available for STM32F031 devices */
  259. #define ADC_Channel_13 ADC_CHSELR_CHSEL13 /*!< Not available for STM32F031 devices */
  260. #define ADC_Channel_14 ADC_CHSELR_CHSEL14 /*!< Not available for STM32F031 devices */
  261. #define ADC_Channel_15 ADC_CHSELR_CHSEL15 /*!< Not available for STM32F031 devices */
  262. #define ADC_Channel_16 ADC_CHSELR_CHSEL16
  263. #define ADC_Channel_17 ADC_CHSELR_CHSEL17
  264. #define ADC_Channel_18 ADC_CHSELR_CHSEL18 /*!< Not available for STM32F030 devices */
  265. #define ADC_Channel_TempSensor ((uint32_t)ADC_Channel_16)
  266. #define ADC_Channel_Vrefint ((uint32_t)ADC_Channel_17)
  267. #define ADC_Channel_Vbat ((uint32_t)ADC_Channel_18) /*!< Not available for STM32F030 devices */
  268. #define IS_ADC_CHANNEL(CHANNEL) (((CHANNEL) != (uint32_t)RESET) && (((CHANNEL) & 0xFFF80000) == (uint32_t)RESET))
  269. /**
  270. * @}
  271. */
  272. /** @defgroup ADC_interrupts_definition
  273. * @{
  274. */
  275. #define ADC_IT_ADRDY ADC_IER_ADRDYIE
  276. #define ADC_IT_EOSMP ADC_IER_EOSMPIE
  277. #define ADC_IT_EOC ADC_IER_EOCIE
  278. #define ADC_IT_EOSEQ ADC_IER_EOSEQIE
  279. #define ADC_IT_OVR ADC_IER_OVRIE
  280. #define ADC_IT_AWD ADC_IER_AWDIE
  281. #define IS_ADC_CONFIG_IT(IT) (((IT) != (uint32_t)RESET) && (((IT) & 0xFFFFFF60) == (uint32_t)RESET))
  282. #define IS_ADC_GET_IT(IT) (((IT) == ADC_IT_ADRDY) || ((IT) == ADC_IT_EOSMP) || \
  283. ((IT) == ADC_IT_EOC) || ((IT) == ADC_IT_EOSEQ) || \
  284. ((IT) == ADC_IT_OVR) || ((IT) == ADC_IT_AWD))
  285. #define IS_ADC_CLEAR_IT(IT) (((IT) != (uint32_t)RESET) && (((IT) & 0xFFFFFF60) == (uint32_t)RESET))
  286. /**
  287. * @}
  288. */
  289. /** @defgroup ADC_flags_definition
  290. * @{
  291. */
  292. #define ADC_FLAG_ADRDY ADC_ISR_ADRDY
  293. #define ADC_FLAG_EOSMP ADC_ISR_EOSMP
  294. #define ADC_FLAG_EOC ADC_ISR_EOC
  295. #define ADC_FLAG_EOSEQ ADC_ISR_EOSEQ
  296. #define ADC_FLAG_OVR ADC_ISR_OVR
  297. #define ADC_FLAG_AWD ADC_ISR_AWD
  298. #define ADC_FLAG_ADEN ((uint32_t)0x01000001)
  299. #define ADC_FLAG_ADDIS ((uint32_t)0x01000002)
  300. #define ADC_FLAG_ADSTART ((uint32_t)0x01000004)
  301. #define ADC_FLAG_ADSTP ((uint32_t)0x01000010)
  302. #define ADC_FLAG_ADCAL ((uint32_t)0x81000000)
  303. #define IS_ADC_CLEAR_FLAG(FLAG) (((FLAG) != (uint32_t)RESET) && (((FLAG) & 0xFFFFFF60) == (uint32_t)RESET))
  304. #define IS_ADC_GET_FLAG(FLAG) (((FLAG) == ADC_FLAG_ADRDY) || ((FLAG) == ADC_FLAG_EOSMP) || \
  305. ((FLAG) == ADC_FLAG_EOC) || ((FLAG) == ADC_FLAG_EOSEQ) || \
  306. ((FLAG) == ADC_FLAG_AWD) || ((FLAG) == ADC_FLAG_OVR) || \
  307. ((FLAG) == ADC_FLAG_ADEN) || ((FLAG) == ADC_FLAG_ADDIS) || \
  308. ((FLAG) == ADC_FLAG_ADSTART) || ((FLAG) == ADC_FLAG_ADSTP) || \
  309. ((FLAG) == ADC_FLAG_ADCAL))
  310. /**
  311. * @}
  312. */
  313. /**
  314. * @}
  315. */
  316. /* Exported macro ------------------------------------------------------------*/
  317. /* Exported functions ------------------------------------------------------- */
  318. /* Function used to set the ADC configuration to the default reset state *****/
  319. void ADC_DeInit(ADC_TypeDef* ADCx);
  320. /* Initialization and Configuration functions *********************************/
  321. void ADC_Init(ADC_TypeDef* ADCx, ADC_InitTypeDef* ADC_InitStruct);
  322. void ADC_StructInit(ADC_InitTypeDef* ADC_InitStruct);
  323. void ADC_ClockModeConfig(ADC_TypeDef* ADCx, uint32_t ADC_ClockMode);
  324. void ADC_Cmd(ADC_TypeDef* ADCx, FunctionalState NewState);
  325. /* This Function is obsolete and maintained for legacy purpose only.
  326. ADC_ClockModeConfig() function should be used instead */
  327. void ADC_JitterCmd(ADC_TypeDef* ADCx, uint32_t ADC_JitterOff, FunctionalState NewState);
  328. /* Power saving functions *****************************************************/
  329. void ADC_AutoPowerOffCmd(ADC_TypeDef* ADCx, FunctionalState NewState);
  330. void ADC_WaitModeCmd(ADC_TypeDef* ADCx, FunctionalState NewState);
  331. /* Analog Watchdog configuration functions ************************************/
  332. void ADC_AnalogWatchdogCmd(ADC_TypeDef* ADCx, FunctionalState NewState);
  333. void ADC_AnalogWatchdogThresholdsConfig(ADC_TypeDef* ADCx, uint16_t HighThreshold,uint16_t LowThreshold);
  334. void ADC_AnalogWatchdogSingleChannelConfig(ADC_TypeDef* ADCx, uint32_t ADC_AnalogWatchdog_Channel);
  335. void ADC_AnalogWatchdogSingleChannelCmd(ADC_TypeDef* ADCx, FunctionalState NewState);
  336. /* Temperature Sensor , Vrefint and Vbat management function ******************/
  337. void ADC_TempSensorCmd(FunctionalState NewState);
  338. void ADC_VrefintCmd(FunctionalState NewState);
  339. void ADC_VbatCmd(FunctionalState NewState); /*!< Not applicable for STM32F030 devices */
  340. /* Channels Configuration functions *******************************************/
  341. void ADC_ChannelConfig(ADC_TypeDef* ADCx, uint32_t ADC_Channel, uint32_t ADC_SampleTime);
  342. void ADC_ContinuousModeCmd(ADC_TypeDef* ADCx, FunctionalState NewState);
  343. void ADC_DiscModeCmd(ADC_TypeDef* ADCx, FunctionalState NewState);
  344. void ADC_OverrunModeCmd(ADC_TypeDef* ADCx, FunctionalState NewState);
  345. uint32_t ADC_GetCalibrationFactor(ADC_TypeDef* ADCx);
  346. void ADC_StopOfConversion(ADC_TypeDef* ADCx);
  347. void ADC_StartOfConversion(ADC_TypeDef* ADCx);
  348. uint16_t ADC_GetConversionValue(ADC_TypeDef* ADCx);
  349. /* Regular Channels DMA Configuration functions *******************************/
  350. void ADC_DMACmd(ADC_TypeDef* ADCx, FunctionalState NewState);
  351. void ADC_DMARequestModeConfig(ADC_TypeDef* ADCx, uint32_t ADC_DMARequestMode);
  352. /* Interrupts and flags management functions **********************************/
  353. void ADC_ITConfig(ADC_TypeDef* ADCx, uint32_t ADC_IT, FunctionalState NewState);
  354. FlagStatus ADC_GetFlagStatus(ADC_TypeDef* ADCx, uint32_t ADC_FLAG);
  355. void ADC_ClearFlag(ADC_TypeDef* ADCx, uint32_t ADC_FLAG);
  356. ITStatus ADC_GetITStatus(ADC_TypeDef* ADCx, uint32_t ADC_IT);
  357. void ADC_ClearITPendingBit(ADC_TypeDef* ADCx, uint32_t ADC_IT);
  358. #ifdef __cplusplus
  359. }
  360. #endif
  361. #endif /*__STM32F0XX_ADC_H */
  362. /**
  363. * @}
  364. */
  365. /**
  366. * @}
  367. */
  368. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/