Wave generator
The wave generator is a simple library that generates the value of a wave signal.
The wave signal parameters are defined as wave_gen_param
.
The wave_gen_generate_value()
generates the value of the wave signal at a given time.
Configuration
Set CONFIG_WAVE_GEN_LIB
to enable the wave generator library.
API documentation
Header file:
include/wave_gen.h
Source files:
lib/wave_gen/
- group wave_gen
Library for generating wave signals.
Enums
Functions
-
int wave_gen_generate_value(uint32_t time, const struct wave_gen_param *params, double *out_val)
Generate wave value.
- Parameters:
time – [in] Time for generated value.
params – [in] Parameters describing generated wave signal.
out_val – [out] Pointer to the variable that is used to store generated value.
- Return values:
0 – If the operation was successful. Otherwise, a (negative) error code is returned.
-
struct wave_gen_param
- #include <wave_gen.h>
Generated wave parameters.
-
int wave_gen_generate_value(uint32_t time, const struct wave_gen_param *params, double *out_val)