2 * rtl-sdr, turns your Realtek RTL2832 based DVB dongle into a SDR receiver
3 * Copyright (C) 2016, 2017 Konsulko Group
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 #define RTL_FM_DEFAULT_BUF_LENGTH (1 * 16384)
25 #define RTL_FM_MAXIMUM_OVERSAMPLE 16
26 #define RTL_FM_MAXIMUM_BUF_LENGTH (RTL_FM_MAXIMUM_OVERSAMPLE * RTL_FM_DEFAULT_BUF_LENGTH)
32 typedef void (*rtl_fm_output_fn_t)(int16_t *result, int result_len, void *data);
34 int rtl_fm_init(uint32_t freq,
36 uint32_t resample_rate,
37 rtl_fm_output_fn_t output_fn,
38 void *output_fn_data);
40 void rtl_fm_start(void);
42 void rtl_fm_set_freq(uint32_t freq);
44 void rtl_fm_set_freq_callback(void (*callback)(uint32_t, void *),
47 uint32_t rtl_fm_get_freq(void);
49 void rtl_fm_stop(void);
51 void rtl_fm_scan_start(int direction,
52 void (*callback)(uint32_t, void *),
58 void rtl_fm_scan_stop(void);
60 void rtl_fm_scan_set_squelch_level(int level);
62 void rtl_fm_scan_set_squelch_limit(int count);
64 void rtl_fm_cleanup(void);