TMPM4KxA Group Peripheral Driver User Manual  V1.0.4.0
txz_adc_ch.h
Go to the documentation of this file.
1 
14 /*------------------------------------------------------------------------------*/
15 /* Define to prevent recursive inclusion */
16 /*------------------------------------------------------------------------------*/
17 #ifndef __ADC_CH_H
18 #define __ADC_CH_H
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 /*------------------------------------------------------------------------------*/
25 /* Includes */
26 /*------------------------------------------------------------------------------*/
27 #include "txz_driver_def.h"
28 
39 /*------------------------------------------------------------------------------*/
40 /* Macro Definition */
41 /*------------------------------------------------------------------------------*/
47 /* no define */
48  /* End of group ADC_Exported_define */
52 
53 /*------------------------------------------------------------------------------*/
54 /* Enumerated Type Definition */
55 /*------------------------------------------------------------------------------*/
61 /* no define */
62  /* End of group ADC_Exported_define */
66 
67 /*------------------------------------------------------------------------------*/
68 /* Structure Definition */
69 /*------------------------------------------------------------------------------*/
75 /*----------------------------------*/
79 /*----------------------------------*/
80 typedef struct
81 {
82  uint32_t interrupt;
84  uint32_t type;
86  uint32_t ain;
89 
90 /*----------------------------------*/
94 /*----------------------------------*/
95 typedef struct
96 {
97  __IO uint32_t *p_tset;
98  __I uint32_t *p_reg;
100 } adc_ch_t;
101  /* End of group ADC_Exported_typedef */
105 
106 /*------------------------------------------------------------------------------*/
107 /* Functions */
108 /*------------------------------------------------------------------------------*/
113 TXZ_Result adc_ch_init(adc_ch_t *p_obj);
114 TXZ_Result adc_ch_deinit(adc_ch_t *p_obj);
115 TXZ_Result adc_ch_int_enable(adc_ch_t *p_obj);
116 TXZ_Result adc_ch_int_disable(adc_ch_t *p_obj);
117 TXZ_Result adc_ch_get_value(adc_ch_t *p_obj, uint32_t *p_value); /* End of group ADC_Exported_functions */
121  /* End of group ADC */
125  /* End of group Periph_Driver */
129 
130 #ifdef __cplusplus
131 }
132 #endif /* __cplusplus */
133 #endif /* __ADC_CH_H */
134 
135 
__IO uint32_t * p_tset
Definition: txz_adc_ch.h:97
TXZ_Result adc_ch_int_disable(adc_ch_t *p_obj)
Disable Interrupt.
Definition: txz_adc_ch.c:260
Initialize Setting.
Definition: txz_adc_ch.h:80
TXZ_Result adc_ch_init(adc_ch_t *p_obj)
Initialize the ADC Channel object.
Definition: txz_adc_ch.c:144
TXZ_Result adc_ch_get_value(adc_ch_t *p_obj, uint32_t *p_value)
Get conversion value.
Definition: txz_adc_ch.c:299
TXZ_Result adc_ch_deinit(adc_ch_t *p_obj)
Release the ADC Channel object.
Definition: txz_adc_ch.c:184
TXZ_Result adc_ch_int_enable(adc_ch_t *p_obj)
Enable Interrupt.
Definition: txz_adc_ch.c:221
adc_ch_initial_setting_t init
Definition: txz_adc_ch.h:99
__I uint32_t * p_reg
Definition: txz_adc_ch.h:98
uint32_t type
Definition: txz_adc_ch.h:84
All common macro and definition for TXZ peripheral drivers.
uint32_t ain
Definition: txz_adc_ch.h:86
uint32_t interrupt
Definition: txz_adc_ch.h:82
ADC handle structure definenition.
Definition: txz_adc_ch.h:95