21#define OUTPUT_SINE_SIGNAL_LEN 10
24#define OUTPUT_SINE_AUDIO_LEN 100
27#define INPUT_BUFF_LEN 2048
30#define BUFF_TO_DFT_LEN ( INPUT_BUFF_LEN / 2 )
33#define FREQ_DOMAIN_LEN ( BUFF_TO_DFT_LEN / 2 )
36#define POLAR_FORM_LEN FREQ_DOMAIN_LEN
39#define ADC_MAX_VALUE 4095
42#define REF_VOLTAGE 3.3f
45#define ADC_HALF_COMPLETE_FLAG 0
48#define ADC_FULL_COMPLETE_FLAG 1
#define FREQ_DOMAIN_LEN
Number of frequency domain bins (quarter of the input buffer length).
Definition app_signal.h:33
#define BUFF_TO_DFT_LEN
Number of samples to be used for the FFT (half of the input buffer length).
Definition app_signal.h:30
struct SIG_Handle_t SIG_Handle_t
Handle structure for managing signal processing tasks.
void sig_start(SIG_Handle_t *const handle)
Starts the signal processing by initializing ADC and DAC, and starting timers.
Definition app_signal.c:52
#define POLAR_FORM_LEN
Length of the polar form array (same as frequency domain length).
Definition app_signal.h:36
SIG_Handle_t sig_handle
Definition app_signal.c:40
void sig_load_samples(SIG_Handle_t *const handle, uint8_t flag)
Loads samples from the ADC buffer into the processing buffers.
Definition app_signal.c:80
size_t sig_perform_fft(SIG_Handle_t *const handle)
Performs FFT on the loaded signal data and computes magnitude and phase.
Definition app_signal.c:110
#define INPUT_BUFF_LEN
Length of the input buffer for ADC samples.
Definition app_signal.h:27
Structure to hold ADC conversion values from two channels.
Definition app_signal.h:55
uint16_t adc2
Definition app_signal.h:57
uint16_t adc1
Definition app_signal.h:56
Structure representing a complex number in the frequency domain.
Definition app_signal.h:65
float32_t imaginary_part
Definition app_signal.h:67
float32_t real_part
Definition app_signal.h:66
Handle structure for managing signal processing tasks.
Definition app_signal.h:85
SIG_PolarForm_t rx_coil_polar[POLAR_FORM_LEN]
Definition app_signal.h:94
SIG_FreqDomain_t tx_coil_freq_domain[FREQ_DOMAIN_LEN]
Definition app_signal.h:92
SIG_FreqDomain_t rx_coil_freq_domain[FREQ_DOMAIN_LEN]
Definition app_signal.h:91
float32_t tx_coil_sig_to_dft[BUFF_TO_DFT_LEN]
Definition app_signal.h:89
SIG_PolarForm_t tx_coil_polar[POLAR_FORM_LEN]
Definition app_signal.h:95
float32_t rx_coil_sig_to_dft[BUFF_TO_DFT_LEN]
Definition app_signal.h:88
SIG_ADCRegister_t input_sig[INPUT_BUFF_LEN]
Definition app_signal.h:86