nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
tone.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
11#ifndef __TONE_H__
12#define __TONE_H__
13
21#include <stdint.h>
22#include <stddef.h>
23
40int tone_gen(int16_t *tone, size_t *tone_size, uint16_t tone_freq_hz, uint32_t smpl_freq_hz,
41 float amplitude);
42
47#endif /* __TONE_H__ */
int tone_gen(int16_t *tone, size_t *tone_size, uint16_t tone_freq_hz, uint32_t smpl_freq_hz, float amplitude)
Generates one full pulse-code modulation (PCM) period of a tone with the given parameters.