|
|
|
@ -2278,10 +2278,10 @@ void read_adc_process(int sig_num)
|
|
|
|
// read ADC
|
|
|
|
// read ADC
|
|
|
|
// printf("read_adc_process\n");
|
|
|
|
// printf("read_adc_process\n");
|
|
|
|
if (wav_position > (BUFFER_SIZE - 1)) {
|
|
|
|
if (wav_position > (BUFFER_SIZE - 1)) {
|
|
|
|
wav_position++;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// reset to start
|
|
|
|
// reset to start
|
|
|
|
wav_position = 0;
|
|
|
|
wav_position = 0;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
wav_position++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
adc_buffer[wav_position] = 0;
|
|
|
|
adc_buffer[wav_position] = 0;
|
|
|
|
if(read(adc_file, data, 1) != 1)
|
|
|
|
if(read(adc_file, data, 1) != 1)
|
|
|
|
|