TMPM4G(1) Group Peripheral Driver User Manual  V1.0.0.0
txz_adc_include.h
Go to the documentation of this file.
1 
13 /*------------------------------------------------------------------------------*/
14 /* Define to prevent recursive inclusion */
15 /*------------------------------------------------------------------------------*/
16 #ifndef __ADC_INCLUDE_H
17 #define __ADC_INCLUDE_H
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 /*------------------------------------------------------------------------------*/
24 /* Includes */
25 /*------------------------------------------------------------------------------*/
26 #include "txz_driver_def.h"
27 #include "txz_hal.h"
28 
39 /*------------------------------------------------------------------------------*/
40 /* Macro Definition */
41 /*------------------------------------------------------------------------------*/
52 #define ADC_NULL ((void *)0) /* End of group NULL_Pointer */
56 
62 #define ADC_PARAM_OK ((int32_t)1)
63 #define ADC_PARAM_NG ((int32_t)0) /* End of group Parameter_Result */
67 
82 /* ADEN */
83 #define ADxCR0_ADEN_DISABLE ((uint32_t)0x00000000)
84 #define ADxCR0_ADEN_ENABLE ((uint32_t)0x00000080)
85 /* HPSGL */
86 #define ADxCR0_HPSGL_ENABLE ((uint32_t)0x00000004)
87 /* SGL */
88 #define ADxCR0_SGL_ENABLE ((uint32_t)0x00000002)
89 /* CNT */
90 #define ADxCR0_CNT_MASK ((uint32_t)0x00000001)
91 #define ADxCR0_CNT_DISABLE ((uint32_t)0x00000000)
92 #define ADxCR0_CNT_ENABLE ((uint32_t)0x00000001) /* End of group ADxCR0 */
96 
113 /* HPDMEN */
114 #define ADxCR1_HPDMEN_DISABLE ((uint32_t)0x00000000)
115 #define ADxCR1_HPDMEN_ENABLE ((uint32_t)0x00000080)
116 /* CNTDMEN */
117 #define ADxCR1_CNTDMEN_DISABLE ((uint32_t)0x00000000)
118 #define ADxCR1_CNTDMEN_ENABLE ((uint32_t)0x00000040)
119 /* SGLDMEN */
120 #define ADxCR1_SGLDMEN_DISABLE ((uint32_t)0x00000000)
121 #define ADxCR1_SGLDMEN_ENABLE ((uint32_t)0x00000020)
122 /* TRGDMEN */
123 #define ADxCR1_TRGDMEN_DISABLE ((uint32_t)0x00000000)
124 #define ADxCR1_TRGDMEN_ENABLE ((uint32_t)0x00000010)
125 /* HPTRGEN */
126 #define ADxCR1_HPTRGEN_DISABLE ((uint32_t)0x00000000)
127 #define ADxCR1_HPTRGEN_ENABLE ((uint32_t)0x00000002)
128 /* TRGEN */
129 #define ADxCR1_TRGEN_DISABLE ((uint32_t)0x00000000)
130 #define ADxCR1_TRGEN_ENABLE ((uint32_t)0x00000001) /* End of group ADxCR1 */
134 
150 /* ADBF */
151 #define ADxST_ADBF_MASK ((uint32_t)0x00000080)
152 #define ADxST_ADBF_IDLE ((uint32_t)0x00000000)
153 #define ADxST_ADBF_RUN ((uint32_t)0x00000080)
154 /* CNTF */
155 #define ADxST_CNTF_MASK ((uint32_t)0x00000008)
156 #define ADxST_CNTF_IDLE ((uint32_t)0x00000000)
157 #define ADxST_CNTF_RUN ((uint32_t)0x00000008)
158 /* SNGF */
159 #define ADxST_SNGF_MASK ((uint32_t)0x00000004)
160 #define ADxST_SNGF_IDLE ((uint32_t)0x00000000)
161 #define ADxST_SNGF_RUN ((uint32_t)0x00000004)
162 /* TRGF */
163 #define ADxST_TRGF_MASK ((uint32_t)0x00000002)
164 #define ADxST_TRGF_IDLE ((uint32_t)0x00000000)
165 #define ADxST_TRGF_RUN ((uint32_t)0x00000002)
166 /* PMDF */
167 #define ADxST_HPF_MASK ((uint32_t)0x00000001)
168 #define ADxST_HPF_IDLE ((uint32_t)0x00000000)
169 #define ADxST_HPF_RUN ((uint32_t)0x00000001) /* End of group ADxST */
173 
185 /* RCUT */
186 #define ADxMOD0_RCUT_NORMAL ((uint32_t)0x00000000)
187 #define ADxMOD0_RCUT_IREF_CUT ((uint32_t)0x00000002)
188 /* DACON */
189 #define ADxMOD0_DACON_OFF ((uint32_t)0x00000000)
190 #define ADxMOD0_DACON_ON ((uint32_t)0x00000001) /* End of group ADxMOD0 */
194 
208 /* CMP3EN */
209 #define ADxCMPEN_CMP3EN_DISABLE ((uint32_t)0x00000000)
210 #define ADxCMPEN_CMP3EN_ENABLE ((uint32_t)0x00000008)
211 /* CMP2EN */
212 #define ADxCMPEN_CMP2EN_DISABLE ((uint32_t)0x00000000)
213 #define ADxCMPEN_CMP2EN_ENABLE ((uint32_t)0x00000004)
214 /* CMP1EN */
215 #define ADxCMPEN_CMP1EN_DISABLE ((uint32_t)0x00000000)
216 #define ADxCMPEN_CMP1EN_ENABLE ((uint32_t)0x00000002)
217 /* CMP0EN */
218 #define ADxCMPEN_CMP0EN_DISABLE ((uint32_t)0x00000000)
219 #define ADxCMPEN_CMP0EN_ENABLE ((uint32_t)0x00000001) /* End of name ADxCMPEN Macro Definition */
223 
236 /* ENINT0 */
237 #define ADxTSETn_ENINT_MASK ((uint32_t)0x00000080)
238 #define ADxTSETn_ENINT_DISABLE ((uint32_t)0x00000000)
239 #define ADxTSETn_ENINT_ENABLE ((uint32_t)0x00000080)
240 /* TRGS0[1:0] */
241 #define ADxTSETn_TRGS_DISABLE ((uint32_t)0x00000000)
242 #define ADxTSETn_TRGS_CNT ((uint32_t)0x00000100)
243 #define ADxTSETn_TRGS_SGL ((uint32_t)0x00000200)
244 #define ADxTSETn_TRGS_TRG ((uint32_t)0x00000300)
245 #define ADxTSETn_TRGS_PRI ((uint32_t)0x00000400) /* End of name ADxTSETn Macro Definition */
249 
266 /* ADOVRF_Mn */
267 #define ADxREGn_ADOVRF_Mn_MASK ((uint32_t)0x20000000)
268 #define ADxREGn_ADOVRF_Mn_OFF ((uint32_t)0x00000000)
269 #define ADxREGn_ADOVRF_Mn_ON ((uint32_t)0x20000000)
270 /* ADRF_Mn */
271 #define ADxREGn_ADRF_Mn_MASK ((uint32_t)0x10000000)
272 #define ADxREGn_ADRF_Mn_OFF ((uint32_t)0x00000000)
273 #define ADxREGn_ADRF_Mn_ON ((uint32_t)0x10000000)
274 /* ADR_Mn */
275 #define ADxREGn_ADR_Mn_MASK ((uint32_t)0x0FFF0000)
276 /* ADRn */
277 #define ADxREGn_ADRn_MASK ((uint32_t)0x0000FFF0)
278 /* ADOVRFn */
279 #define ADxREGn_ADOVRFn_MASK ((uint32_t)0x00000002)
280 #define ADxREGn_ADOVRFn_OFF ((uint32_t)0x00000000)
281 #define ADxREGn_ADOVRFn_ON ((uint32_t)0x00000002)
282 /* ADRFn */
283 #define ADxREGn_ADRFn_MASK ((uint32_t)0x00000001)
284 #define ADxREGn_ADRFn_OFF ((uint32_t)0x00000000)
285 #define ADxREGn_ADRFn_ON ((uint32_t)0x00000001) /* End of name ADxREGn Macro Definition */
289  /* End of group ADC_Private_define */
293 
294 
295 /*------------------------------------------------------------------------------*/
296 /* Enumerated Type Definition */
297 /*------------------------------------------------------------------------------*/
303 /* no define */
304  /* End of group ADC_Private_define */
308 
309 
310 /*------------------------------------------------------------------------------*/
311 /* Structure Definition */
312 /*------------------------------------------------------------------------------*/
318 /* no define */
319  /* End of group ADC_Private_typedef */
323 
324 /*------------------------------------------------------------------------------*/
325 /* Inline Functions */
326 /*------------------------------------------------------------------------------*/
331 /* no define */ /* End of group ADC_Private_functions */
335  /* End of group ADC */
339  /* End of group Periph_Driver */
343 
344 #ifdef __cplusplus
345 }
346 #endif /* __cplusplus */
347 #endif /* __ADC_INCLUDE_H */
348 
349 
This file provides all the functions prototypes for driver common part.
All common macro and definition for TXZ peripheral drivers.