forked from acco/chti23
49 lines
1.2 KiB
C
49 lines
1.2 KiB
C
|
|
|
|
#include "DriverJeuLaser.h"
|
|
#include "stdio.h"
|
|
|
|
extern int DFT_ModuleAuCarre(short int* , char);
|
|
extern int DFT_reel(short int* , char);
|
|
extern int DFT_imag(short int* , char);
|
|
extern short int LeSignal[];
|
|
extern short int TabCos[];
|
|
extern short int TabSin[];
|
|
int resultat_reel, resultat_imag, resultat_module_carre;
|
|
|
|
//void DFT_ModuleAuCarre( short int * Signal64ech, char k, long int * resultat){
|
|
// int acumReel = 0;
|
|
// int acumImag = 0;
|
|
// for (int i= 0; i< 64; i++){
|
|
// acumReel += Signal64ech[i]*TabCos[(i*k)%64];
|
|
// acumImag += Signal64ech[i]*TabSin[(i*k)%64];
|
|
// }
|
|
// *resultat = acumReel*acumReel + acumImag*acumImag;
|
|
//}
|
|
|
|
int main(void)
|
|
{
|
|
|
|
// ===========================================================================
|
|
// ============= INIT PERIPH (faites qu'une seule fois) =====================
|
|
// ===========================================================================
|
|
|
|
// Après exécution : le coeur CPU est clocké à 72MHz ainsi que tous les timers
|
|
CLOCK_Configure();
|
|
|
|
|
|
|
|
resultat_reel = DFT_reel(LeSignal,17);
|
|
resultat_imag = DFT_imag(LeSignal,17);
|
|
resultat_module_carre =DFT_ModuleAuCarre(LeSignal,17);
|
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
|
|
while (1)
|
|
{
|
|
}
|
|
}
|
|
|