EFM32 Happy Gecko Software Documentation  efm32hg-doc-5.1.2
efm32hg_vcmp.h
Go to the documentation of this file.
1 /**************************************************************************/
32 /**************************************************************************/
36 /**************************************************************************/
41 typedef struct
42 {
43  __IOM uint32_t CTRL;
44  __IOM uint32_t INPUTSEL;
45  __IM uint32_t STATUS;
46  __IOM uint32_t IEN;
47  __IM uint32_t IF;
48  __IOM uint32_t IFS;
49  __IOM uint32_t IFC;
50 } VCMP_TypeDef;
52 /**************************************************************************/
57 /* Bit fields for VCMP CTRL */
58 #define _VCMP_CTRL_RESETVALUE 0x47000000UL
59 #define _VCMP_CTRL_MASK 0x4F030715UL
60 #define VCMP_CTRL_EN (0x1UL << 0)
61 #define _VCMP_CTRL_EN_SHIFT 0
62 #define _VCMP_CTRL_EN_MASK 0x1UL
63 #define _VCMP_CTRL_EN_DEFAULT 0x00000000UL
64 #define VCMP_CTRL_EN_DEFAULT (_VCMP_CTRL_EN_DEFAULT << 0)
65 #define VCMP_CTRL_INACTVAL (0x1UL << 2)
66 #define _VCMP_CTRL_INACTVAL_SHIFT 2
67 #define _VCMP_CTRL_INACTVAL_MASK 0x4UL
68 #define _VCMP_CTRL_INACTVAL_DEFAULT 0x00000000UL
69 #define VCMP_CTRL_INACTVAL_DEFAULT (_VCMP_CTRL_INACTVAL_DEFAULT << 2)
70 #define VCMP_CTRL_HYSTEN (0x1UL << 4)
71 #define _VCMP_CTRL_HYSTEN_SHIFT 4
72 #define _VCMP_CTRL_HYSTEN_MASK 0x10UL
73 #define _VCMP_CTRL_HYSTEN_DEFAULT 0x00000000UL
74 #define VCMP_CTRL_HYSTEN_DEFAULT (_VCMP_CTRL_HYSTEN_DEFAULT << 4)
75 #define _VCMP_CTRL_WARMTIME_SHIFT 8
76 #define _VCMP_CTRL_WARMTIME_MASK 0x700UL
77 #define _VCMP_CTRL_WARMTIME_DEFAULT 0x00000000UL
78 #define _VCMP_CTRL_WARMTIME_4CYCLES 0x00000000UL
79 #define _VCMP_CTRL_WARMTIME_8CYCLES 0x00000001UL
80 #define _VCMP_CTRL_WARMTIME_16CYCLES 0x00000002UL
81 #define _VCMP_CTRL_WARMTIME_32CYCLES 0x00000003UL
82 #define _VCMP_CTRL_WARMTIME_64CYCLES 0x00000004UL
83 #define _VCMP_CTRL_WARMTIME_128CYCLES 0x00000005UL
84 #define _VCMP_CTRL_WARMTIME_256CYCLES 0x00000006UL
85 #define _VCMP_CTRL_WARMTIME_512CYCLES 0x00000007UL
86 #define VCMP_CTRL_WARMTIME_DEFAULT (_VCMP_CTRL_WARMTIME_DEFAULT << 8)
87 #define VCMP_CTRL_WARMTIME_4CYCLES (_VCMP_CTRL_WARMTIME_4CYCLES << 8)
88 #define VCMP_CTRL_WARMTIME_8CYCLES (_VCMP_CTRL_WARMTIME_8CYCLES << 8)
89 #define VCMP_CTRL_WARMTIME_16CYCLES (_VCMP_CTRL_WARMTIME_16CYCLES << 8)
90 #define VCMP_CTRL_WARMTIME_32CYCLES (_VCMP_CTRL_WARMTIME_32CYCLES << 8)
91 #define VCMP_CTRL_WARMTIME_64CYCLES (_VCMP_CTRL_WARMTIME_64CYCLES << 8)
92 #define VCMP_CTRL_WARMTIME_128CYCLES (_VCMP_CTRL_WARMTIME_128CYCLES << 8)
93 #define VCMP_CTRL_WARMTIME_256CYCLES (_VCMP_CTRL_WARMTIME_256CYCLES << 8)
94 #define VCMP_CTRL_WARMTIME_512CYCLES (_VCMP_CTRL_WARMTIME_512CYCLES << 8)
95 #define VCMP_CTRL_IRISE (0x1UL << 16)
96 #define _VCMP_CTRL_IRISE_SHIFT 16
97 #define _VCMP_CTRL_IRISE_MASK 0x10000UL
98 #define _VCMP_CTRL_IRISE_DEFAULT 0x00000000UL
99 #define VCMP_CTRL_IRISE_DEFAULT (_VCMP_CTRL_IRISE_DEFAULT << 16)
100 #define VCMP_CTRL_IFALL (0x1UL << 17)
101 #define _VCMP_CTRL_IFALL_SHIFT 17
102 #define _VCMP_CTRL_IFALL_MASK 0x20000UL
103 #define _VCMP_CTRL_IFALL_DEFAULT 0x00000000UL
104 #define VCMP_CTRL_IFALL_DEFAULT (_VCMP_CTRL_IFALL_DEFAULT << 17)
105 #define _VCMP_CTRL_BIASPROG_SHIFT 24
106 #define _VCMP_CTRL_BIASPROG_MASK 0xF000000UL
107 #define _VCMP_CTRL_BIASPROG_DEFAULT 0x00000007UL
108 #define VCMP_CTRL_BIASPROG_DEFAULT (_VCMP_CTRL_BIASPROG_DEFAULT << 24)
109 #define VCMP_CTRL_HALFBIAS (0x1UL << 30)
110 #define _VCMP_CTRL_HALFBIAS_SHIFT 30
111 #define _VCMP_CTRL_HALFBIAS_MASK 0x40000000UL
112 #define _VCMP_CTRL_HALFBIAS_DEFAULT 0x00000001UL
113 #define VCMP_CTRL_HALFBIAS_DEFAULT (_VCMP_CTRL_HALFBIAS_DEFAULT << 30)
115 /* Bit fields for VCMP INPUTSEL */
116 #define _VCMP_INPUTSEL_RESETVALUE 0x00000000UL
117 #define _VCMP_INPUTSEL_MASK 0x0000013FUL
118 #define _VCMP_INPUTSEL_TRIGLEVEL_SHIFT 0
119 #define _VCMP_INPUTSEL_TRIGLEVEL_MASK 0x3FUL
120 #define _VCMP_INPUTSEL_TRIGLEVEL_DEFAULT 0x00000000UL
121 #define VCMP_INPUTSEL_TRIGLEVEL_DEFAULT (_VCMP_INPUTSEL_TRIGLEVEL_DEFAULT << 0)
122 #define VCMP_INPUTSEL_LPREF (0x1UL << 8)
123 #define _VCMP_INPUTSEL_LPREF_SHIFT 8
124 #define _VCMP_INPUTSEL_LPREF_MASK 0x100UL
125 #define _VCMP_INPUTSEL_LPREF_DEFAULT 0x00000000UL
126 #define VCMP_INPUTSEL_LPREF_DEFAULT (_VCMP_INPUTSEL_LPREF_DEFAULT << 8)
128 /* Bit fields for VCMP STATUS */
129 #define _VCMP_STATUS_RESETVALUE 0x00000000UL
130 #define _VCMP_STATUS_MASK 0x00000003UL
131 #define VCMP_STATUS_VCMPACT (0x1UL << 0)
132 #define _VCMP_STATUS_VCMPACT_SHIFT 0
133 #define _VCMP_STATUS_VCMPACT_MASK 0x1UL
134 #define _VCMP_STATUS_VCMPACT_DEFAULT 0x00000000UL
135 #define VCMP_STATUS_VCMPACT_DEFAULT (_VCMP_STATUS_VCMPACT_DEFAULT << 0)
136 #define VCMP_STATUS_VCMPOUT (0x1UL << 1)
137 #define _VCMP_STATUS_VCMPOUT_SHIFT 1
138 #define _VCMP_STATUS_VCMPOUT_MASK 0x2UL
139 #define _VCMP_STATUS_VCMPOUT_DEFAULT 0x00000000UL
140 #define VCMP_STATUS_VCMPOUT_DEFAULT (_VCMP_STATUS_VCMPOUT_DEFAULT << 1)
142 /* Bit fields for VCMP IEN */
143 #define _VCMP_IEN_RESETVALUE 0x00000000UL
144 #define _VCMP_IEN_MASK 0x00000003UL
145 #define VCMP_IEN_EDGE (0x1UL << 0)
146 #define _VCMP_IEN_EDGE_SHIFT 0
147 #define _VCMP_IEN_EDGE_MASK 0x1UL
148 #define _VCMP_IEN_EDGE_DEFAULT 0x00000000UL
149 #define VCMP_IEN_EDGE_DEFAULT (_VCMP_IEN_EDGE_DEFAULT << 0)
150 #define VCMP_IEN_WARMUP (0x1UL << 1)
151 #define _VCMP_IEN_WARMUP_SHIFT 1
152 #define _VCMP_IEN_WARMUP_MASK 0x2UL
153 #define _VCMP_IEN_WARMUP_DEFAULT 0x00000000UL
154 #define VCMP_IEN_WARMUP_DEFAULT (_VCMP_IEN_WARMUP_DEFAULT << 1)
156 /* Bit fields for VCMP IF */
157 #define _VCMP_IF_RESETVALUE 0x00000000UL
158 #define _VCMP_IF_MASK 0x00000003UL
159 #define VCMP_IF_EDGE (0x1UL << 0)
160 #define _VCMP_IF_EDGE_SHIFT 0
161 #define _VCMP_IF_EDGE_MASK 0x1UL
162 #define _VCMP_IF_EDGE_DEFAULT 0x00000000UL
163 #define VCMP_IF_EDGE_DEFAULT (_VCMP_IF_EDGE_DEFAULT << 0)
164 #define VCMP_IF_WARMUP (0x1UL << 1)
165 #define _VCMP_IF_WARMUP_SHIFT 1
166 #define _VCMP_IF_WARMUP_MASK 0x2UL
167 #define _VCMP_IF_WARMUP_DEFAULT 0x00000000UL
168 #define VCMP_IF_WARMUP_DEFAULT (_VCMP_IF_WARMUP_DEFAULT << 1)
170 /* Bit fields for VCMP IFS */
171 #define _VCMP_IFS_RESETVALUE 0x00000000UL
172 #define _VCMP_IFS_MASK 0x00000003UL
173 #define VCMP_IFS_EDGE (0x1UL << 0)
174 #define _VCMP_IFS_EDGE_SHIFT 0
175 #define _VCMP_IFS_EDGE_MASK 0x1UL
176 #define _VCMP_IFS_EDGE_DEFAULT 0x00000000UL
177 #define VCMP_IFS_EDGE_DEFAULT (_VCMP_IFS_EDGE_DEFAULT << 0)
178 #define VCMP_IFS_WARMUP (0x1UL << 1)
179 #define _VCMP_IFS_WARMUP_SHIFT 1
180 #define _VCMP_IFS_WARMUP_MASK 0x2UL
181 #define _VCMP_IFS_WARMUP_DEFAULT 0x00000000UL
182 #define VCMP_IFS_WARMUP_DEFAULT (_VCMP_IFS_WARMUP_DEFAULT << 1)
184 /* Bit fields for VCMP IFC */
185 #define _VCMP_IFC_RESETVALUE 0x00000000UL
186 #define _VCMP_IFC_MASK 0x00000003UL
187 #define VCMP_IFC_EDGE (0x1UL << 0)
188 #define _VCMP_IFC_EDGE_SHIFT 0
189 #define _VCMP_IFC_EDGE_MASK 0x1UL
190 #define _VCMP_IFC_EDGE_DEFAULT 0x00000000UL
191 #define VCMP_IFC_EDGE_DEFAULT (_VCMP_IFC_EDGE_DEFAULT << 0)
192 #define VCMP_IFC_WARMUP (0x1UL << 1)
193 #define _VCMP_IFC_WARMUP_SHIFT 1
194 #define _VCMP_IFC_WARMUP_MASK 0x2UL
195 #define _VCMP_IFC_WARMUP_DEFAULT 0x00000000UL
196 #define VCMP_IFC_WARMUP_DEFAULT (_VCMP_IFC_WARMUP_DEFAULT << 1)
__IOM uint32_t CTRL
Definition: efm32hg_vcmp.h:43
__IM uint32_t IF
Definition: efm32hg_vcmp.h:47
__IOM uint32_t IFS
Definition: efm32hg_vcmp.h:48
__IOM uint32_t IEN
Definition: efm32hg_vcmp.h:46
__IOM uint32_t IFC
Definition: efm32hg_vcmp.h:49
__IOM uint32_t INPUTSEL
Definition: efm32hg_vcmp.h:44
__IM uint32_t STATUS
Definition: efm32hg_vcmp.h:45