![]() |
nRF Connect SDK API 3.3.99
|
| int tone_gen_size | ( | void * | tone, |
| size_t * | tone_size, | ||
| uint16_t | tone_freq_hz, | ||
| uint32_t | sample_freq_hz, | ||
| uint8_t | sample_bits, | ||
| uint8_t | carrier_bits, | ||
| float | amplitude ) |
#include <include/tone.h>
Generates one full pulse-code modulation (PCM) period of a tone with the given parameters.
| tone | User provided buffer. Must be large enough to hold the generated PCM tone, depending on settings. |
| tone_size | Resulting tone size in bytes. |
| tone_freq_hz | The desired tone frequency in the range [100..10000] Hz. |
| sample_freq_hz | Sampling frequency. |
| sample_bits | Number of bits to represent a sample (i.e. 8, 16, 24 or 32 bits). |
| carrier_bits | Number of bits to carry a sample (i.e. 8, 16 or 32 bit). |
| amplitude | Amplitude in the range [0..1]. |