diff --git a/include/fft/fft.h b/include/fft/fft.h index e1a8a18..4ac8ac5 100644 --- a/include/fft/fft.h +++ b/include/fft/fft.h @@ -8,4 +8,4 @@ #define FFT_BIN(num, re) (uint16_t)((float)(num + 0.5) * re) #define FFT_INDEX(freq, re) (uint16_t)((float)freq / re) -int FFT(q15_t *data); +void FFT(q15_t *data); diff --git a/src/fft/fft.c b/src/fft/fft.c index 71d4f76..79f9fac 100644 --- a/src/fft/fft.c +++ b/src/fft/fft.c @@ -84,7 +84,7 @@ static inline void butterfly(q15_t *data) { } } -int FFT(q15_t *data) { +void FFT(q15_t *data) { for (uint16_t i = 0; i < N; i++) { res[Re(i)] = data[i]; // real res[Im(i)] = 0; // imaginary @@ -93,6 +93,4 @@ int FFT(q15_t *data) { butterfly(res); bitreversal((q31_t *)res); for (uint16_t i = 0; i < N; i++) data[i] = (q15_t)abs(res[Re(i)]); - - return 0; }