ESP-IDF Firmware
Firmware architecture and call graph
Loading...
Searching...
No Matches
dsps_cplx_gen.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef _dsps_cplx_gen_H_
8#define _dsps_cplx_gen_H_
9
10#include "dsp_err.h"
12
13#ifdef __cplusplus
14extern "C"
15{
16#endif
17
18
27
28
36typedef struct cplx_sig_s {
37 void *lut;
38 int32_t lut_len;
39 float freq;
40 float phase;
42 int16_t free_status;
44
45
66esp_err_t dsps_cplx_gen_init(cplx_sig_t *cplx_gen, out_d_type d_type, void *lut, int32_t lut_len, float freq, float initial_phase);
67
68
81esp_err_t dsps_cplx_gen_freq_set(cplx_sig_t *cplx_gen, float freq);
82
83
93float dsps_cplx_gen_freq_get(cplx_sig_t *cplx_gen);
94
95
108esp_err_t dsps_cplx_gen_phase_set(cplx_sig_t *cplx_gen, float phase);
109
110
120float dsps_cplx_gen_phase_get(cplx_sig_t *cplx_gen);
121
122
137esp_err_t dsps_cplx_gen_set(cplx_sig_t *cplx_gen, float freq, float phase);
138
139
148void cplx_gen_free(cplx_sig_t *cplx_gen);
149
150
172esp_err_t dsps_cplx_gen_ansi(cplx_sig_t *cplx_gen, void *output, int32_t len);
173esp_err_t dsps_cplx_gen_ae32(cplx_sig_t *cplx_gen, void *output, int32_t len);
174
175
176#ifdef __cplusplus
177}
178#endif
179
180
181#if (dsps_cplx_gen_ae32_enbled || dsps_cplx_gen_aes3_enbled)
182#define dsps_cplx_gen dsps_cplx_gen_ae32
183#else // CONFIG_DSP_OPTIMIZED
184#define dsps_cplx_gen dsps_cplx_gen_ansi
185#endif // CONFIG_DSP_OPTIMIZED
186
187#endif // _dsps_cplx_gen_H_
esp_err_t dsps_cplx_gen_freq_set(cplx_sig_t *cplx_gen, float freq)
function sets the output frequency of the complex generator
esp_err_t dsps_cplx_gen_phase_set(cplx_sig_t *cplx_gen, float phase)
function sets the phase of the complex generator
esp_err_t dsps_cplx_gen_ae32(cplx_sig_t *cplx_gen, void *output, int32_t len)
esp_err_t dsps_cplx_gen_set(cplx_sig_t *cplx_gen, float freq, float phase)
function sets the output frequency and the phase of the complex generator
struct cplx_sig_s cplx_sig_t
Data struct of the complex signal generator.
esp_err_t dsps_cplx_gen_ansi(cplx_sig_t *cplx_gen, void *output, int32_t len)
The function generates a complex signal.
float dsps_cplx_gen_freq_get(cplx_sig_t *cplx_gen)
function gets the output frequency of the complex generator
esp_err_t dsps_cplx_gen_init(cplx_sig_t *cplx_gen, out_d_type d_type, void *lut, int32_t lut_len, float freq, float initial_phase)
Initialize strucure for complex generator.
float dsps_cplx_gen_phase_get(cplx_sig_t *cplx_gen)
function gets the phase of the complex generator
void cplx_gen_free(cplx_sig_t *cplx_gen)
function frees dynamically allocated memory, which was allocated in the init function
output_data_type
Ennum defining output data type of the complex generator.
@ F32_FLOAT
@ S16_FIXED
enum output_data_type out_d_type
Ennum defining output data type of the complex generator.
int esp_err_t
Definition esp_err.h:21
Data struct of the complex signal generator.
int32_t lut_len
out_d_type d_type
int16_t free_status