aboutsummaryrefslogtreecommitdiffstats
path: root/lab4/RTDSP/intio.c
diff options
context:
space:
mode:
Diffstat (limited to 'lab4/RTDSP/intio.c')
-rw-r--r--lab4/RTDSP/intio.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/lab4/RTDSP/intio.c b/lab4/RTDSP/intio.c
index 6e19045..3798072 100644
--- a/lab4/RTDSP/intio.c
+++ b/lab4/RTDSP/intio.c
@@ -36,7 +36,7 @@
// Some functions to help with writing/reading the audio ports when using interrupts.
#include <helper_functions_ISR.h>
-#include "Matlab/filter_coeff_2.txt"
+#include "Matlab/filter_coeff.txt"
// Some functions to help with configuring hardware
#include "helper_functions_polling.h"
@@ -141,19 +141,10 @@ void ISR_AIC()
// mono_write_16Bit(sample_in);
}
-//Convolve the
+// Perform linear convolution
short non_circ_fir()
{
-/* double y[N + M - 1];
- int i, M, j;
- M = sizeof(b)/sizeof(b[0]);
-
- for (i = 0; i < N + M - 1; i++) {
- for (j = 0; j < i -1; j++) {
- y[i] = y[i] + b[j]*h[i-j-1];
- }
-
- }*/
+
double y = 0;
int M, i;
M = sizeof(b) / sizeof(b[0]);
@@ -162,3 +153,4 @@ short non_circ_fir()
}
return y*32767;
}
+