-
Notifications
You must be signed in to change notification settings - Fork 0
/
2rx_ad9361.h
68 lines (50 loc) · 1.59 KB
/
2rx_ad9361.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
Copyright (C) 2023 Gonzalo José Carracedo Carballal
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, version 3.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this program. If not, see
<http://www.gnu.org/licenses/>
*/
#ifndef _AD9361_H
#define _AD9361_H
#include <stdio.h>
#include <iio.h>
#include <sigutils/types.h>
#include <sigutils/ncqo.h>
#include <analyzer/source.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define AD9361_DEFAULT_BUFFER_SIZE 65536
struct suscan_source_ad9361 {
struct suscan_source_config *config;
suscan_source_t *source;
SUSCOUNT total_samples;
SUSCOUNT sample_size;
SUFLOAT samp_rate;
SUBOOL started;
SUBOOL running;
int nco_ndx;
struct iio_context *context;
struct iio_device *rx_dev;
struct iio_device *phy_dev;
struct iio_buffer *rx_buf;
struct iio_channel *phy_rx0, *phy_rx1;
struct iio_channel *rx0_i, *rx0_q;
struct iio_channel *rx1_i, *rx1_q;
struct iio_channel *alt_chan;
SUCOMPLEX *synth_buffer;
SUSCOUNT synth_buffer_size;
SUSCOUNT synth_buffer_consumed;
};
SUBOOL suscan_source_register_ad9361(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _AD9361_H */