nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
wave_gen.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
11#ifndef _WAVE_GEN_H
12#define _WAVE_GEN_H
13
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#include <zephyr/types.h>
26
34
36};
37
43
45 uint32_t period_ms;
46
48 double offset;
49
51 double amplitude;
52
54 double noise;
55};
56
67int wave_gen_generate_value(uint32_t time, const struct wave_gen_param *params, double *out_val);
68
69#ifdef __cplusplus
70}
71#endif
72
77#endif /* _WAVE_GEN_H */
int wave_gen_generate_value(uint32_t time, const struct wave_gen_param *params, double *out_val)
Generate wave value.
wave_gen_type
Available generated wave types.
Definition: wave_gen.h:29
@ WAVE_GEN_TYPE_SQUARE
Definition: wave_gen.h:32
@ WAVE_GEN_TYPE_TRIANGLE
Definition: wave_gen.h:31
@ WAVE_GEN_TYPE_COUNT
Definition: wave_gen.h:35
@ WAVE_GEN_TYPE_SINE
Definition: wave_gen.h:30
@ WAVE_GEN_TYPE_NONE
Definition: wave_gen.h:33
double offset
Definition: wave_gen.h:48
uint32_t period_ms
Definition: wave_gen.h:45
enum wave_gen_type type
Definition: wave_gen.h:42
double noise
Definition: wave_gen.h:54
double amplitude
Definition: wave_gen.h:51
Generated wave parameters.
Definition: wave_gen.h:40