Hi Mark
I have a problem with the server. The server breaks down when I use this task especially when I use fnbufferdec function, only work mybe 20 sec and reset the server.
I hope you can help me
Best Regards
this is the code that I am using:
CHAR fabuffer[1];
CHAR *faptrBuffer=fabuffer;
void fnMyFirstTask(TTASKTABLE *ptrTaskTable)
{
int iADC_delay = -1;
ADC_SETUP adc_setup; // interrupt configuration parameters
ADC_RESULTS results;
adc_setup.int_type = ADC_INTERRUPT; // identifier when configuring
adc_setup.int_adc_bit = 0;
adc_setup.int_adc_result = &results;
adc_setup.int_adc_mode = (ADC_READ_ONLY | ADC_GET_RESULT | ADC_ALL_RESULTS);
do {
fnConfigureInterrupt((void *)&adc_setup); // get result
iADC_delay++;
} while (results.ucADC_status[0] == ADC_RESULT_NOT_READY); // 'poll until the result is ready
if (results.ucADC_status[0] != ADC_RESULT_NOT_READY) {
fnDebugMsg("ADC value = ");
faptrBuffer = fnBufferDec((results.sADC_value[0]>>6), 2, faptrBuffer);
fnDebugDec((results.sADC_value[0]>>6), 2);
fnDebugMsg("\r\n");
fnDebugMsg("Wait = ");
fnDebugDec(iADC_delay, 0); // display the wait count value
fnDebugMsg("\r\n");
}
else {
fnDebugMsg("ADC not ready\r\n");
}
}