px-fwlib
0.10.0
Cross-platform embedded library and documentation for 8/16/32-bit microcontrollers
generated with
Doxygen
1.9.2
px_adc_cfg_template.h
1
#ifndef __PX_ADC_CFG_H__
2
#define __PX_ADC_CFG_H__
3
/* =============================================================================
4
____ ___ ____ ___ _ _ ___ __ __ ___ __ __ TM
5
| _ \ |_ _| / ___| / _ \ | \ | | / _ \ | \/ | |_ _| \ \/ /
6
| |_) | | | | | | | | | | \| | | | | | | |\/| | | | \ /
7
| __/ | | | |___ | |_| | | |\ | | |_| | | | | | | | / \
8
|_| |___| \____| \___/ |_| \_| \___/ |_| |_| |___| /_/\_\
9
10
Copyright (c) 2018 Pieter Conradie <https://piconomix.com>
11
12
License: MIT
13
https://github.com/piconomix/px-fwlib/blob/master/LICENSE.md
14
15
Title: px_adc_cfg.h : ADC Peripheral Driver configuration
16
Author(s): Pieter Conradie
17
Creation Date: 2018-11-04
18
19
============================================================================= */
20
21
/**
22
* @addtogroup STM32_ADC
23
*
24
* @{
25
*/
26
27
/* _____STANDARD INCLUDES____________________________________________________ */
28
29
/* _____PROJECT INCLUDES_____________________________________________________ */
30
#include "px_defs.h"
31
32
/* _____DEFINITIONS__________________________________________________________ */
33
/// Enable/disable support for ADC1 peripheral
34
#define PX_ADC_CFG_ADC1_EN 1
35
36
/// Specify ADC clock source (see 'px_adc_cfg_clk_t')
37
#define PX_ADC_CFG_CLK PX_ADC_CFG_CLK_PCLK
38
39
/// Specify ADC sampling time (see 'px_adc_cfg_sample_time_t')
40
#define PX_ADC_CFG_SAMPLE_TIME PX_ADC_CFG_SAMPLE_TIME_7_5
41
42
/// Specify ADC resolution (see 'px_adc_cfg_res_t')
43
#define PX_ADC_CFG_RES PX_ADC_CFG_RES_12_BITS
44
45
/// Specify ADC oversampling (see 'px_adc_cfg_oversampling_t')
46
#define PX_ADC_CFG_OVERSAMPLING PX_ADC_CFG_OVERSAMPLING_NONE
47
48
/// Specify ADC oversampling (see 'px_adc_cfg_oversampling_shift_t')
49
#define PX_ADC_CFG_OVERSAMPLING_SHIFT PX_ADC_CFG_OVERSAMPLING_SHIFT_NONE
50
51
/// @}
52
#endif