Analog to digital conversion module.
More...
Analog to digital conversion module.
Please refer to the use of Samples
int SU_ADC_DisableChn |
( |
uint32_t |
chn_num | ) |
|
Disable an ADC channel.
- Parameters
-
[in] | chn_num | The channel num you want do stop. |
- Return values
-
0 | Success |
Non-0 | Failure,return error code. |
- Attention
- None
int SU_ADC_EnableChn |
( |
uint32_t |
chn_num | ) |
|
Enable an ADC channel.
- Parameters
-
[in] | chn_num | The channel number you want to use. |
- Return values
-
0 | Success |
Non-0 | Failure,retrun error code |
- Attention
- None
ADC module deinit.
- Return values
-
0 | Success |
Non-0 | Failure,return error code |
- Attention
- None
int SU_ADC_GetChnValue |
( |
uint32_t |
chn_num, |
|
|
int * |
value |
|
) |
| |
Get the ADC value of the channel chn_num.
- Parameters
-
[in] | chn_num | The channel number |
[out] | value | ADC value obtained |
- Return values
-
0 | Success |
Non-0 | Failure,return error code |
- Attention
- None
ADC module init.
- Return values
-
0 | Success |
Non-0 | Failureļ¼return error code |
- Attention
- None