efm32_adc.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. /***************************************************************************//**
  2. * @file
  3. * @brief Analog to Digital Converter (ADC) peripheral API for EFM32.
  4. * @author Energy Micro AS
  5. * @version 1.3.0
  6. *******************************************************************************
  7. * @section License
  8. * <b>(C) Copyright 2010 Energy Micro AS, http://www.energymicro.com</b>
  9. *******************************************************************************
  10. *
  11. * This source code is the property of Energy Micro AS. The source and compiled
  12. * code may only be used on Energy Micro "EFM32" microcontrollers.
  13. *
  14. * This copyright notice may not be removed from the source code nor changed.
  15. *
  16. * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
  17. * obligation to support this Software. Energy Micro AS is providing the
  18. * Software "AS IS", with no express or implied warranties of any kind,
  19. * including, but not limited to, any implied warranties of merchantability
  20. * or fitness for any particular purpose or warranties against infringement
  21. * of any proprietary rights of a third party.
  22. *
  23. * Energy Micro AS will not be liable for any consequential, incidental, or
  24. * special damages, or any other relief, or for any claim by any third party,
  25. * arising from your use of this Software.
  26. *
  27. ******************************************************************************/
  28. #ifndef __EFM32_ADC_H
  29. #define __EFM32_ADC_H
  30. #include <stdbool.h>
  31. #include "efm32.h"
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35. /***************************************************************************//**
  36. * @addtogroup EFM32_Library
  37. * @{
  38. ******************************************************************************/
  39. /***************************************************************************//**
  40. * @addtogroup ADC
  41. * @{
  42. ******************************************************************************/
  43. /*******************************************************************************
  44. ******************************** ENUMS ************************************
  45. ******************************************************************************/
  46. /** Acquisition time (in ADC clock cycles). */
  47. typedef enum
  48. {
  49. adcAcqTime1 = _ADC_SINGLECTRL_AT_1CYCLE, /**< 1 clock cycle. */
  50. adcAcqTime2 = _ADC_SINGLECTRL_AT_2CYCLES, /**< 2 clock cycles. */
  51. adcAcqTime4 = _ADC_SINGLECTRL_AT_4CYCLES, /**< 4 clock cycles. */
  52. adcAcqTime8 = _ADC_SINGLECTRL_AT_8CYCLES, /**< 8 clock cycles. */
  53. adcAcqTime16 = _ADC_SINGLECTRL_AT_16CYCLES, /**< 16 clock cycles. */
  54. adcAcqTime32 = _ADC_SINGLECTRL_AT_32CYCLES, /**< 32 clock cycles. */
  55. adcAcqTime64 = _ADC_SINGLECTRL_AT_64CYCLES, /**< 64 clock cycles. */
  56. adcAcqTime128 = _ADC_SINGLECTRL_AT_128CYCLES, /**< 128 clock cycles. */
  57. adcAcqTime256 = _ADC_SINGLECTRL_AT_256CYCLES /**< 256 clock cycles. */
  58. } ADC_AcqTime_TypeDef;
  59. /** Lowpass filter mode. */
  60. typedef enum
  61. {
  62. /** No filter or decoupling capacitor. */
  63. adcLPFilterBypass = _ADC_CTRL_LPFMODE_BYPASS,
  64. /** On-chip RC filter. */
  65. adcLPFilterRC = _ADC_CTRL_LPFMODE_RCFILT,
  66. /** On-chip decoupling capacitor. */
  67. adcLPFilterDeCap = _ADC_CTRL_LPFMODE_DECAP
  68. } ADC_LPFilter_TypeDef;
  69. /** Oversample rate select. */
  70. typedef enum
  71. {
  72. /** 2 samples per conversion result. */
  73. adcOvsRateSel2 = _ADC_CTRL_OVSRSEL_X2,
  74. /** 4 samples per conversion result. */
  75. adcOvsRateSel4 = _ADC_CTRL_OVSRSEL_X4,
  76. /** 8 samples per conversion result. */
  77. adcOvsRateSel8 = _ADC_CTRL_OVSRSEL_X8,
  78. /** 16 samples per conversion result. */
  79. adcOvsRateSel16 = _ADC_CTRL_OVSRSEL_X16,
  80. /** 32 samples per conversion result. */
  81. adcOvsRateSel32 = _ADC_CTRL_OVSRSEL_X32,
  82. /** 64 samples per conversion result. */
  83. adcOvsRateSel64 = _ADC_CTRL_OVSRSEL_X64,
  84. /** 128 samples per conversion result. */
  85. adcOvsRateSel128 = _ADC_CTRL_OVSRSEL_X128,
  86. /** 256 samples per conversion result. */
  87. adcOvsRateSel256 = _ADC_CTRL_OVSRSEL_X256,
  88. /** 512 samples per conversion result. */
  89. adcOvsRateSel512 = _ADC_CTRL_OVSRSEL_X512,
  90. /** 1024 samples per conversion result. */
  91. adcOvsRateSel1024 = _ADC_CTRL_OVSRSEL_X1024,
  92. /** 2048 samples per conversion result. */
  93. adcOvsRateSel2048 = _ADC_CTRL_OVSRSEL_X2048,
  94. /** 4096 samples per conversion result. */
  95. adcOvsRateSel4096 = _ADC_CTRL_OVSRSEL_X4096
  96. } ADC_OvsRateSel_TypeDef;
  97. /** Peripheral Reflex System signal used to trigger single sample. */
  98. typedef enum
  99. {
  100. adcPRSSELCh0 = _ADC_SINGLECTRL_PRSSEL_PRSCH0, /**< PRS channel 0. */
  101. adcPRSSELCh1 = _ADC_SINGLECTRL_PRSSEL_PRSCH1, /**< PRS channel 1. */
  102. adcPRSSELCh2 = _ADC_SINGLECTRL_PRSSEL_PRSCH2, /**< PRS channel 2. */
  103. adcPRSSELCh3 = _ADC_SINGLECTRL_PRSSEL_PRSCH3, /**< PRS channel 3. */
  104. adcPRSSELCh4 = _ADC_SINGLECTRL_PRSSEL_PRSCH4, /**< PRS channel 4. */
  105. adcPRSSELCh5 = _ADC_SINGLECTRL_PRSSEL_PRSCH5, /**< PRS channel 5. */
  106. adcPRSSELCh6 = _ADC_SINGLECTRL_PRSSEL_PRSCH6, /**< PRS channel 6. */
  107. adcPRSSELCh7 = _ADC_SINGLECTRL_PRSSEL_PRSCH7 /**< PRS channel 7. */
  108. } ADC_PRSSEL_TypeDef;
  109. /** Reference to ADC sample. */
  110. typedef enum
  111. {
  112. /** Internal 1.25V reference. */
  113. adcRef1V25 = _ADC_SINGLECTRL_REF_1V25,
  114. /** Internal 2.5V reference. */
  115. adcRef2V5 = _ADC_SINGLECTRL_REF_2V5,
  116. /** Buffered VDD. */
  117. adcRefVDD = _ADC_SINGLECTRL_REF_VDD,
  118. /** Internal differential 5V reference. */
  119. adcRef5VDIFF = _ADC_SINGLECTRL_REF_5VDIFF,
  120. /** Single ended ext. ref. from pin 6. */
  121. adcRefExtSingle = _ADC_SINGLECTRL_REF_EXTSINGLE,
  122. /** Differential ext. ref. from pin 6 and 7. */
  123. adcRef2xExtDiff = _ADC_SINGLECTRL_REF_2XEXTDIFF,
  124. /** Unbuffered 2xVDD. */
  125. adcRef2xVDD = _ADC_SINGLECTRL_REF_2XVDD
  126. } ADC_Ref_TypeDef;
  127. /** Sample resolution. */
  128. typedef enum
  129. {
  130. adcRes12Bit = _ADC_SINGLECTRL_RES_12BIT, /**< 12 bit sampling. */
  131. adcRes8Bit = _ADC_SINGLECTRL_RES_8BIT, /**< 8 bit sampling. */
  132. adcRes6Bit = _ADC_SINGLECTRL_RES_6BIT, /**< 6 bit sampling. */
  133. adcResOVS = _ADC_SINGLECTRL_RES_OVS /**< Oversampling. */
  134. } ADC_Res_TypeDef;
  135. /** Single sample input selection. */
  136. typedef enum
  137. {
  138. /* Differential mode disabled */
  139. adcSingleInpCh0 = _ADC_SINGLECTRL_INPUTSEL_CH0, /**< Channel 0. */
  140. adcSingleInpCh1 = _ADC_SINGLECTRL_INPUTSEL_CH1, /**< Channel 1. */
  141. adcSingleInpCh2 = _ADC_SINGLECTRL_INPUTSEL_CH2, /**< Channel 2. */
  142. adcSingleInpCh3 = _ADC_SINGLECTRL_INPUTSEL_CH3, /**< Channel 3. */
  143. adcSingleInpCh4 = _ADC_SINGLECTRL_INPUTSEL_CH4, /**< Channel 4. */
  144. adcSingleInpCh5 = _ADC_SINGLECTRL_INPUTSEL_CH5, /**< Channel 5. */
  145. adcSingleInpCh6 = _ADC_SINGLECTRL_INPUTSEL_CH6, /**< Channel 6. */
  146. adcSingleInpCh7 = _ADC_SINGLECTRL_INPUTSEL_CH7, /**< Channel 7. */
  147. adcSingleInpTemp = _ADC_SINGLECTRL_INPUTSEL_TEMP, /**< Temperature reference. */
  148. adcSingleInpVDDDiv3 = _ADC_SINGLECTRL_INPUTSEL_VDDDIV3, /**< VDD divided by 3. */
  149. adcSingleInpVDD = _ADC_SINGLECTRL_INPUTSEL_VDD, /**< VDD. */
  150. adcSingleInpVSS = _ADC_SINGLECTRL_INPUTSEL_VSS, /**< VSS. */
  151. adcSingleInpVrefDiv2 = _ADC_SINGLECTRL_INPUTSEL_VREFDIV2, /**< Vref divided by 2. */
  152. adcSingleInpDACOut0 = _ADC_SINGLECTRL_INPUTSEL_DAC0OUT0, /**< DAC output 0. */
  153. adcSingleInpDACOut1 = _ADC_SINGLECTRL_INPUTSEL_DAC0OUT1, /**< DAC output 1. */
  154. /* TBD: Use define when available */
  155. adcSingleInpATEST = 15, /**< ATEST. */
  156. /* Differential mode enabled */
  157. adcSingleInpCh0Ch1 = _ADC_SINGLECTRL_INPUTSEL_CH0CH1, /**< Positive Ch0, negative Ch1. */
  158. adcSingleInpCh2Ch3 = _ADC_SINGLECTRL_INPUTSEL_CH2CH3, /**< Positive Ch2, negative Ch3. */
  159. adcSingleInpCh4Ch5 = _ADC_SINGLECTRL_INPUTSEL_CH4CH5, /**< Positive Ch4, negative Ch5. */
  160. adcSingleInpCh6Ch7 = _ADC_SINGLECTRL_INPUTSEL_CH6CH7, /**< Positive Ch6, negative Ch7. */
  161. /* TBD: Use define when available */
  162. adcSingleInpDiff0 = 4 /**< Differential 0. */
  163. } ADC_SingleInput_TypeDef;
  164. /** Acquisition time (in ADC clock cycles). */
  165. typedef enum
  166. {
  167. /** Start single conversion. */
  168. adcStartSingle = ADC_CMD_SINGLESTART,
  169. /** Start scan sequence. */
  170. adcStartScan = ADC_CMD_SCANSTART,
  171. /**
  172. * Start scan sequence and single conversion, typically used when tailgating
  173. * single conversion after scan sequence.
  174. */
  175. adcStartScanAndSingle = ADC_CMD_SCANSTART | ADC_CMD_SINGLESTART
  176. } ADC_Start_TypeDef;
  177. /** Warm-up mode. */
  178. typedef enum
  179. {
  180. /** ADC shutdown after each conversion. */
  181. adcWarmupNormal = _ADC_CTRL_WARMUPMODE_NORMAL,
  182. /** Do not warm-up bandgap references. */
  183. adcWarmupFastBG = _ADC_CTRL_WARMUPMODE_FASTBG,
  184. /** Reference selected for scan mode kept warm.*/
  185. adcWarmupKeepScanRefWarm = _ADC_CTRL_WARMUPMODE_KEEPSCANREFWARM,
  186. /** ADC and reference selected for scan mode kept warm.*/
  187. adcWarmupKeepADCWarm = _ADC_CTRL_WARMUPMODE_KEEPADCWARM
  188. } ADC_Warmup_TypeDef;
  189. /*******************************************************************************
  190. ******************************* STRUCTS ***********************************
  191. ******************************************************************************/
  192. /** ADC init structure, common for single conversion and scan sequence. */
  193. typedef struct
  194. {
  195. /**
  196. * Oversampling rate select. In order to have any effect, oversampling must
  197. * be enabled for single/scan mode.
  198. */
  199. ADC_OvsRateSel_TypeDef ovsRateSel;
  200. /** Lowpass or decoupling capacitor filter to use. */
  201. ADC_LPFilter_TypeDef lpfMode;
  202. /** Warm-up mode to use for ADC. */
  203. ADC_Warmup_TypeDef warmUpMode;
  204. /**
  205. * Timebase used for ADC warm up. Select N to give (N+1)HFPERCLK cycles.
  206. * (Additional delay is added for bandgap references, please refer to the
  207. * reference manual.) Normally, N should be selected so that the timebase
  208. * is at least 1 us. See ADC_TimebaseCalcDefault() for a way to obtain
  209. * a suggested timebase of at least 1 us.
  210. */
  211. uint8_t timebase;
  212. /** Clock division factor N, ADC clock = HFPERCLK / (N + 1). */
  213. uint8_t prescale;
  214. /** Enable/disable conversion tailgating. */
  215. bool tailgate;
  216. } ADC_Init_TypeDef;
  217. /** Default config for ADC init structure. */
  218. #define ADC_INIT_DEFAULT \
  219. { adcOvsRateSel2, /* 2x oversampling (if enabled). */ \
  220. adcLPFilterBypass, /* No input filter selected. */ \
  221. adcWarmupNormal, /* ADC shutdown after each conversion. */ \
  222. _ADC_CTRL_TIMEBASE_DEFAULT, /* Use HW default value. */ \
  223. _ADC_CTRL_PRESC_DEFAULT, /* Use HW default value. */ \
  224. false /* Do not use tailgate. */ \
  225. }
  226. /** Scan sequence init structure. */
  227. typedef struct
  228. {
  229. /**
  230. * Peripheral reflex system trigger selection. Only applicable if @p prsEnable
  231. * is enabled.
  232. */
  233. ADC_PRSSEL_TypeDef prsSel;
  234. /** Acquisition time (in ADC clock cycles). */
  235. ADC_AcqTime_TypeDef acqTime;
  236. /**
  237. * Sample reference selection. Notice that for external references, the
  238. * ADC calibration register must be set explicitly.
  239. */
  240. ADC_Ref_TypeDef reference;
  241. /** Sample resolution. */
  242. ADC_Res_TypeDef resolution;
  243. /**
  244. * Input scan selection. If single ended (@p diff is false), use logical
  245. * combination of ADC_SCANCTRL_INPUTMASK_CHx defines. If differential input
  246. * (@p diff is true), use logical combination of ADC_SCANCTRL_INPUTMASK_CHxCHy
  247. * defines. (Notice underscore prefix for defines used.)
  248. */
  249. uint32_t input;
  250. /** Select if single ended or differential input. */
  251. bool diff;
  252. /** Peripheral reflex system trigger enable. */
  253. bool prsEnable;
  254. /** Select if left adjustment should be done. */
  255. bool leftAdjust;
  256. /** Select if continuous conversion until explicit stop. */
  257. bool rep;
  258. } ADC_InitScan_TypeDef;
  259. /** Default config for ADC scan init structure. */
  260. #define ADC_INITSCAN_DEFAULT \
  261. { adcPRSSELCh0, /* PRS ch0 (if enabled). */ \
  262. adcAcqTime1, /* 1 ADC_CLK cycle acquisition time. */ \
  263. adcRef1V25, /* 1.25V internal reference. */ \
  264. adcRes12Bit, /* 12 bit resolution. */ \
  265. 0, /* No input selected. */ \
  266. false, /* Single ended input. */ \
  267. false, /* PRS disabled. */ \
  268. false, /* Right adjust. */ \
  269. false /* Deactivate conversion after one scan sequence. */ \
  270. }
  271. /** Single conversion init structure. */
  272. typedef struct
  273. {
  274. /**
  275. * Peripheral reflex system trigger selection. Only applicable if @p prsEnable
  276. * is enabled.
  277. */
  278. ADC_PRSSEL_TypeDef prsSel;
  279. /** Acquisition time (in ADC clock cycles). */
  280. ADC_AcqTime_TypeDef acqTime;
  281. /**
  282. * Sample reference selection. Notice that for external references, the
  283. * ADC calibration register must be set explicitly.
  284. */
  285. ADC_Ref_TypeDef reference;
  286. /** Sample resolution. */
  287. ADC_Res_TypeDef resolution;
  288. /**
  289. * Sample input selection, use single ended or differential input according
  290. * to setting of @p diff.
  291. */
  292. ADC_SingleInput_TypeDef input;
  293. /** Select if single ended or differential input. */
  294. bool diff;
  295. /** Peripheral reflex system trigger enable. */
  296. bool prsEnable;
  297. /** Select if left adjustment should be done. */
  298. bool leftAdjust;
  299. /** Select if continuous conversion until explicit stop. */
  300. bool rep;
  301. } ADC_InitSingle_TypeDef;
  302. /** Default config for ADC single conversion init structure. */
  303. #define ADC_INITSINGLE_DEFAULT \
  304. { adcPRSSELCh0, /* PRS ch0 (if enabled). */ \
  305. adcAcqTime1, /* 1 ADC_CLK cycle acquisition time. */ \
  306. adcRef1V25, /* 1.25V internal reference. */ \
  307. adcRes12Bit, /* 12 bit resolution. */ \
  308. adcSingleInpCh0, /* CH0 input selected. */ \
  309. false, /* Single ended input. */ \
  310. false, /* PRS disabled. */ \
  311. false, /* Right adjust. */ \
  312. false /* Deactivate conversion after one scan sequence. */ \
  313. }
  314. /*******************************************************************************
  315. ***************************** PROTOTYPES **********************************
  316. ******************************************************************************/
  317. /***************************************************************************//**
  318. * @brief
  319. * Get single conversion result.
  320. *
  321. * @note
  322. * Do only use if single conversion data valid.
  323. *
  324. * @param[in] adc
  325. * Pointer to ADC peripheral register block.
  326. *
  327. * @return
  328. *
  329. ******************************************************************************/
  330. static __INLINE uint32_t ADC_DataSingleGet(ADC_TypeDef *adc)
  331. {
  332. return(adc->SINGLEDATA);
  333. }
  334. /***************************************************************************//**
  335. * @brief
  336. * Get scan result.
  337. *
  338. * @note
  339. * Do only use if scan data valid.
  340. *
  341. * @param[in] adc
  342. * Pointer to ADC peripheral register block.
  343. ******************************************************************************/
  344. static __INLINE uint32_t ADC_DataScanGet(ADC_TypeDef *adc)
  345. {
  346. return(adc->SCANDATA);
  347. }
  348. void ADC_Init(ADC_TypeDef *adc, const ADC_Init_TypeDef *init);
  349. void ADC_InitScan(ADC_TypeDef *adc, const ADC_InitScan_TypeDef *init);
  350. void ADC_InitSingle(ADC_TypeDef *adc, const ADC_InitSingle_TypeDef *init);
  351. /***************************************************************************//**
  352. * @brief
  353. * Clear one or more pending ADC interrupts.
  354. *
  355. * @param[in] adc
  356. * Pointer to ADC peripheral register block.
  357. *
  358. * @param[in] flags
  359. * Pending ADC interrupt source to clear. Use a logical OR combination of
  360. * valid interrupt flags for the ADC module (ADC_IF_nnn).
  361. ******************************************************************************/
  362. static __INLINE void ADC_IntClear(ADC_TypeDef *adc, uint32_t flags)
  363. {
  364. adc->IFC = flags;
  365. }
  366. /***************************************************************************//**
  367. * @brief
  368. * Disable one or more ADC interrupts.
  369. *
  370. * @param[in] adc
  371. * Pointer to ADC peripheral register block.
  372. *
  373. * @param[in] flags
  374. * ADC interrupt sources to disable. Use a logical OR combination of
  375. * valid interrupt flags for the ADC module (ADC_IF_nnn).
  376. ******************************************************************************/
  377. static __INLINE void ADC_IntDisable(ADC_TypeDef *adc, uint32_t flags)
  378. {
  379. adc->IEN &= ~(flags);
  380. }
  381. /***************************************************************************//**
  382. * @brief
  383. * Enable one or more ADC interrupts.
  384. *
  385. * @note
  386. * Depending on the use, a pending interrupt may already be set prior to
  387. * enabling the interrupt. Consider using ADC_IntClear() prior to enabling
  388. * if such a pending interrupt should be ignored.
  389. *
  390. * @param[in] adc
  391. * Pointer to ADC peripheral register block.
  392. *
  393. * @param[in] flags
  394. * ADC interrupt sources to enable. Use a logical OR combination of
  395. * valid interrupt flags for the ADC module (ADC_IF_nnn).
  396. ******************************************************************************/
  397. static __INLINE void ADC_IntEnable(ADC_TypeDef *adc, uint32_t flags)
  398. {
  399. adc->IEN |= flags;
  400. }
  401. /***************************************************************************//**
  402. * @brief
  403. * Get pending ADC interrupt flags.
  404. *
  405. * @note
  406. * The event bits are not cleared by the use of this function.
  407. *
  408. * @param[in] adc
  409. * Pointer to ADC peripheral register block.
  410. *
  411. * @return
  412. * ADC interrupt sources pending. A logical OR combination of valid
  413. * interrupt flags for the ADC module (ADC_IF_nnn).
  414. ******************************************************************************/
  415. static __INLINE uint32_t ADC_IntGet(ADC_TypeDef *adc)
  416. {
  417. return(adc->IF);
  418. }
  419. /***************************************************************************//**
  420. * @brief
  421. * Set one or more pending ADC interrupts from SW.
  422. *
  423. * @param[in] adc
  424. * Pointer to ADC peripheral register block.
  425. *
  426. * @param[in] flags
  427. * ADC interrupt sources to set to pending. Use a logical OR combination of
  428. * valid interrupt flags for the ADC module (ADC_IF_nnn).
  429. ******************************************************************************/
  430. static __INLINE void ADC_IntSet(ADC_TypeDef *adc, uint32_t flags)
  431. {
  432. adc->IFS = flags;
  433. }
  434. uint8_t ADC_PrescaleCalc(uint32_t adcFreq, uint32_t hfperFreq);
  435. /***************************************************************************//**
  436. * @brief
  437. * Start scan sequence and/or single conversion.
  438. *
  439. * @param[in] adc
  440. * Pointer to ADC peripheral register block.
  441. *
  442. * @param[in] cmd
  443. * Command indicating which type of sampling to start.
  444. ******************************************************************************/
  445. static __INLINE void ADC_Start(ADC_TypeDef *adc, ADC_Start_TypeDef cmd)
  446. {
  447. adc->CMD = (uint32_t) cmd;
  448. }
  449. void ADC_Reset(ADC_TypeDef *adc);
  450. uint8_t ADC_TimebaseCalc(uint32_t hfperFreq);
  451. /** @} (end addtogroup ADC) */
  452. /** @} (end addtogroup EFM32_Library) */
  453. #ifdef __cplusplus
  454. }
  455. #endif
  456. #endif /* __EFM32_ADC_H */