Hi,
I am modifing the ADC data logger (sensor controller) for adding new ADC data, but there is a syntax error ( adcReadFifo( output.pSamples[output.head[n]] ) ):
// Enable the ADC
adcEnableSync(ADC_REF_FIXED, ADC_SAMPLE_TIME_2P7_US, ADC_TRIGGER_MANUAL);
// Sample the sensor
U16 idx;
for ( U16 n = 0; n < ADC_CH_NUM; n++) {
if ( n == 0 ) {
adcSelectGpioInput( AUXIO_A_SENSOR_OUTPUT );
}else {
adcSelectGpioInput( AUXIO_A_VBE );
}
adcGenManualTrigger();
//idx = n;
//n = output.head[n];
if ( n == 0 ) {
adcReadFifo( output.pSamples[output.head[n]] );
utilIncrAndWrap( output.head[n], BUFFER_SIZE; output.head[n] ); // Syntax error
}else {
adcReadFifo( output.Samples2[n] );
utilIncrAndWrap( output.head[n], BUFFER_SIZE_2; output.head[n] );
}
//n = idx;
output.Cnt[n] = output.Cnt[n] + 1;
}
// Disable the ADC
adcDisable();
// Schedule the next execution
fwScheduleTask(1);
I receive syntax from compiler: invalid for variable write access, do you know why ?
Best regards
LB