Dear All:
I import adcsinglechannel project to CCS:
about TaskFxn0:
/*
* ======== taskFxn0 ========
* Open an ADC instance and get a sampling result from a one-shot conversion.
*/
Void taskFxn0(UArg arg0, UArg arg1)
{
ADC_Handle adc;
ADC_Params params;
int_fast16_t res;
ADC_Params_init(¶ms);
adc = ADC_open(Board_ADC0, ¶ms);
if (adc == NULL) {
System_abort("Error initializing ADC channel 0\n");
}
else {
System_printf("ADC channel 0 initialized\n");
}
/* Blocking mode conversion */
res = ADC_convert(adc, &adcValue0);
if (res == ADC_STATUS_SUCCESS) {
System_printf("ADC channel 0 convert result: 0x%x\n", adcValue0);
}
else {
System_printf("ADC channel 0 convert failed\n");
}
ADC_close(adc);
System_flush();
}
I get result:
if I want to read ADC channel 0 many times , what do I do?