Elektronikprojekt Grupp 13 / Mbed OS test_fft_grp13

Dependencies:   mbed-dsp

Fork of mbed-os-example-blinky by Elektronikprojekt Grupp 13

Files at this revision

API Documentation at this revision

Comitter:
KlaraBengtsson
Date:
Mon Apr 10 14:44:03 2017 +0000
Parent:
66:866bf1606317
Commit message:
K

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Apr 10 14:07:43 2017 +0000
+++ b/main.cpp	Mon Apr 10 14:44:03 2017 +0000
@@ -1,19 +1,23 @@
 #include "mbed.h"
 #include "arm_math.h"
 #include "arm_const_structs.h"
+#include "mbed-dsp.h"
 
 
-q15 testData1[] = {10, 20, 30, 40, 50, 60, 70, 80, 10, 20, 30, 40, 50, 60, 70, 80,10, 20, 30, 40, 50, 60, 70, 80, 10, 20, 30, 40, 50, 60, 70, 80};
-q15 testData2[] = {10, 20, 30, 40, 50, 60, 70, 80, 10, 20, 30, 40, 50, 60, 70, 80,10, 20, 30, 40, 50, 60, 70, 80, 10, 20, 30, 40, 50, 60, 70, 80};
-q31 finalData[];
+q31_t testData1[] = {10, 20, 30, 40, 50, 60, 70, 80, 10, 20, 30, 40, 50, 60, 70, 80,10, 20, 30, 40, 50, 60, 70, 80, 10, 20, 30, 40, 50, 60, 70, 80};
+q31_t testData2[] = {10, 20, 30, 40, 50, 60, 70, 80, 10, 20, 30, 40, 50, 60, 70, 80,10, 20, 30, 40, 50, 60, 70, 80, 10, 20, 30, 40, 50, 60, 70, 80};
+q31_t finalData[];
 int len1 = length(testData1);
 int len2 = length(testData2);
-q15 *p1 = &testData1(0);
-q15 *p2 = &testData2(0);
-q15 *p3 = &finalData(0);
+q31_t *p1 = &testData1(0);
+q31_t *p2 = &testData2(0);
+q31_t *p3 = &finalData(0);
+
 
-arm_correlate_q15(pi,len1,p2,len2,p3);
+int main(){
 
+    arm_correlate_q31(pi,len1,p2,len2,p3);
+}
 
 /*
 const int FFT_SIZE = 32;