#include <stdio.h> | |
#include "ql_adc.h" | |
int main(int argc, char *argv[]) | |
{ | |
if(argc != 2) { | |
printf("ql_adc_test <0/1/2>\n"); | |
return -1; | |
} | |
int adc = atoi(argv[1]); | |
if(adc != 0 && adc != 1 && adc != 2) { | |
printf("ql_adc_test <0/1/2>\n"); | |
return -1; | |
} | |
int result = ql_adc_show((ADC_CHANNEL_E)(adc + 1)); | |
printf("ADC : %d\n", result); | |
return 0; | |
} | |