blob: d82a5b947a76f23f4080f8952084eca7b07bebe6 [file] [log] [blame]
b.liud440f9f2025-04-18 10:44:31 +08001#include <stdio.h>
2#include "ql_adc.h"
3
4int main(int argc, char *argv[])
5{
6 if(argc != 2) {
7 printf("ql_adc_test <0/1/2>\n");
8 return -1;
9 }
10
11 int adc = atoi(argv[1]);
12 if(adc != 0 && adc != 1 && adc != 2) {
13 printf("ql_adc_test <0/1/2>\n");
14 return -1;
15 }
16
17 int result = ql_adc_show((ADC_CHANNEL_E)(adc + 1));
18
19 printf("ADC : %d\n", result);
20
21 return 0;
22}
23