diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-04-19 16:55:25 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-04-19 16:55:25 +0200 |
commit | 0e8b0c38b5100a0be3c1ce87935fda1daf7f2cb2 (patch) | |
tree | 1972fa142bed47a64527779c50c069c12f6bef3e /src/glutt-o-logique | |
parent | 882e3bb1c298343daf66f705bd4036c98c4f4b9f (diff) | |
download | glutte-o-matic-0e8b0c38b5100a0be3c1ce87935fda1daf7f2cb2.tar.gz glutte-o-matic-0e8b0c38b5100a0be3c1ce87935fda1daf7f2cb2.tar.bz2 glutte-o-matic-0e8b0c38b5100a0be3c1ce87935fda1daf7f2cb2.zip |
tone: do Q1 and Q2 calculation inside IRQ
Diffstat (limited to 'src/glutt-o-logique')
-rw-r--r-- | src/glutt-o-logique/audio_in.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glutt-o-logique/audio_in.c b/src/glutt-o-logique/audio_in.c index b73e98c..3eee2b3 100644 --- a/src/glutt-o-logique/audio_in.c +++ b/src/glutt-o-logique/audio_in.c @@ -72,6 +72,9 @@ void ADC_IRQHandler() ADC_ClearITPendingBit(ADC2, ADC_IT_EOC); + tone_detect_push_sample_from_irq(value); + +#if 0 /* input range: 0 to 2^12 * output range: -32768 to 32767 */ adc2_values[adc2_current_buffer][adc2_values_end++] = (int32_t)value - (1 << 11); @@ -88,6 +91,7 @@ void ADC_IRQHandler() adc2_lost_samples += AUDIO_IN_BUF_LEN; } } +#endif } else { adc2_lost_samples++; |