126 #include "stm32fxxx_hal.h"
129 #include "arm_math.h"
130 #include "arm_const_structs.h"
139 #ifndef LIB_ALLOC_FUNC
140 #define LIB_ALLOC_FUNC malloc
144 #ifndef LIB_FREE_FUNC
145 #define LIB_FREE_FUNC free
167 const arm_cfft_instance_f32*
S;
250 #define TM_FFT_GetMaxValue(FFT) ((FFT)->MaxValue)
258 #define TM_FFT_GetMaxIndex(FFT) ((FFT)->MaxIndex)
266 #define TM_FFT_GetFFTSize(FFT) ((FFT)->FFT_Size)
275 #define TM_FFT_GetFromBuffer(FFT, index) ((FFT)->Output[(uint16_t)(index)])
const arm_cfft_instance_f32 * S
Definition: tm_stm32_fft.h:167
void TM_FFT_SetBuffers_F32(TM_FFT_F32_t *FFT, float32_t *InputBuffer, float32_t *OutputBuffer)
Sets input and output buffers for FFT calculations.
uint16_t FFT_Size
Definition: tm_stm32_fft.h:164
void TM_FFT_Free_F32(TM_FFT_F32_t *FFT)
Free input and output buffers.
FFT main structure for 32-bit float.
Definition: tm_stm32_fft.h:161
uint8_t UseMalloc
Definition: tm_stm32_fft.h:165
uint8_t TM_FFT_Init_F32(TM_FFT_F32_t *FFT, uint16_t FFT_Size, uint8_t use_malloc)
Initializes and prepares FFT structure for signal operations.
float32_t * Input
Definition: tm_stm32_fft.h:162
float32_t * Output
Definition: tm_stm32_fft.h:163
uint32_t MaxIndex
Definition: tm_stm32_fft.h:169
float32_t MaxValue
Definition: tm_stm32_fft.h:168
uint8_t TM_FFT_AddToBuffer(TM_FFT_F32_t *FFT, float32_t sampleValue)
Adds new sample to input buffer in FFT array.
uint8_t TM_FFT_AddToBufferWithImag(TM_FFT_F32_t *FFT, float32_t Real, float32_t Imag)
Adds new sample (real and imaginary part if needed) to input buffer in FFT array. ...
void TM_FFT_Process_F32(TM_FFT_F32_t *FFT)
Processes and calculates FFT from InputBuffer and saves data to Output buffer.
uint16_t Count
Definition: tm_stm32_fft.h:166