Zephyr API Documentation
4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
mchp_pic32cz_ca_adc.h
Go to the documentation of this file.
1
6
12
13
#ifndef INCLUDE_ZEPHYR_DT_BINDINGS_ADC_PIC32CZ_CA_ADC_H_
14
#define INCLUDE_ZEPHYR_DT_BINDINGS_ADC_PIC32CZ_CA_ADC_H_
15
16
#define ADC_CORE0_BIT BIT(0)
17
#define ADC_CORE1_BIT BIT(1)
18
#define ADC_CORE2_BIT BIT(2)
19
#define ADC_CORE3_BIT BIT(3)
20
21
/* ADC Core that do not support differential inputs */
22
#define ADC_CORES_NO_DIFF_SUPPORT ADC_CORE0_BIT
23
/*
24
* This SoC has 4 ADC instances (ADC0..ADC3) that do NOT share the same
25
* channel map:
26
* - ADC0 has 16 external channels (AIN0..AIN15) and no internal channel.
27
* - ADC1, ADC2 and ADC3 each have only 6 external channels (AIN0..AIN5)
28
* plus a single internal channel at index 6, so channel index 6 means
29
* something different on every instance:
30
* ADC1 -> VDDCORE, ADC2 -> Temp Sensor, ADC3 -> 1.2V IVREF.
31
* AIN6..AIN15 below are therefore only valid for ADC0.
32
*/
33
34
/* External analog inputs (all 16 valid on ADC0 only; ADC1/2/3: AIN0..AIN5 only) */
35
#define MCHP_ADC_AIN0 0x00
36
#define MCHP_ADC_AIN1 0x01
37
#define MCHP_ADC_AIN2 0x02
38
#define MCHP_ADC_AIN3 0x03
39
#define MCHP_ADC_AIN4 0x04
40
#define MCHP_ADC_AIN5 0x05
41
#define MCHP_ADC_AIN6 0x06
42
#define MCHP_ADC_AIN7 0x07
43
#define MCHP_ADC_AIN8 0x08
44
#define MCHP_ADC_AIN9 0x09
45
#define MCHP_ADC_AIN10 0x0A
46
#define MCHP_ADC_AIN11 0x0B
47
#define MCHP_ADC_AIN12 0x0C
48
#define MCHP_ADC_AIN13 0x0D
49
#define MCHP_ADC_AIN14 0x0E
50
#define MCHP_ADC_AIN15 0x0F
51
52
/*
53
* Internal ADC sources - each is the single internal channel (index 6) of
54
* one specific ADC1/ADC2/ADC3 instance; NOT available on ADC0, and each
55
* macro is only meaningful on the ADC instance named in its description.
56
*/
57
#define MCHP_ADC_VDD_CORE 0x06
58
#define MCHP_ADC_TEMP_SENS 0x06
59
#define MCHP_ADC_IVREF_1_2 0x06
60
61
#endif
/* INCLUDE_ZEPHYR_DT_BINDINGS_ADC_PIC32CZ_CA_ADC_H_ */
zephyr
dt-bindings
adc
mchp_pic32cz_ca_adc.h
Generated on
for Zephyr API Documentation by
1.16.1