Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
main.cpp
- Committer:
- rik
- Date:
- 2017-03-28
- Revision:
- 0:8c128e047ec9
- Child:
- 1:099f1a4c5fc8
File content as of revision 0:8c128e047ec9:
#include "mbed.h"
#include "DFT.h"
#include "LookupTables.h"
#include "complexmath.h"
#include <math.h>
//TODO right values for the twiddle factors LUT equalizer LUT bitreverse LUT in LookupTables
//TODO Build all functions in FFT.cpp
//TODO fix main for a test wave and communication to serial
Serial pc(USBTX, USBRX);
float sampleDataIn [512];
float sampleDataOut[512];
int datalength = 512;//uitrekenen?
int main()
{
pc.baud(115200);
pc.printf ("building input:[");
for (int i=0; i<511; i++){
if (i%128<64){
sampleDataIn[i]=1000;
pc.printf ("%f,\t",sampleDatain[i]);
}
else{
sampleDataIn[i]=0;
pc.printf ("%f,\t",sampleDatain[i]);
}
sampleDataIn[511]=0;
pc.printf("%f]\r\n",sampleDataOut[511]);
performEqualizer(&sampleDataIn, &sampleDataOut,datalength);
pc.printf ("Equalized data :[");
for (int i=0; i<511; i++) {
pc.printf ("%f,\t",sampleDataOut[i]);
}
pc.printf("%f]\r\n",sampleDataOut[511]);
while(1) {
}
}