SDRAngel
4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
devices
bladerf1
devicebladerf1values.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016-2017 Edouard Griffiths, F4EXB //
3
// //
4
// This program is free software; you can redistribute it and/or modify //
5
// it under the terms of the GNU General Public License as published by //
6
// the Free Software Foundation as version 3 of the License, or //
7
// (at your option) any later version. //
8
// //
9
// This program is distributed in the hope that it will be useful, //
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
12
// GNU General Public License V3 for more details. //
13
// //
14
// You should have received a copy of the GNU General Public License //
15
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
17
18
#include "../bladerf1/devicebladerf1values.h"
19
20
21
unsigned
int
DeviceBladeRF1Bandwidths::m_nb_halfbw
= 16;
22
unsigned
int
DeviceBladeRF1Bandwidths::m_halfbw
[] = {
23
750,
24
875,
25
1250,
26
1375,
27
1500,
28
1920,
29
2500,
30
2750,
31
3000,
32
3500,
33
4375,
34
5000,
35
6000,
36
7000,
37
10000,
38
14000};
39
40
unsigned
int
DeviceBladeRF1Bandwidths::getBandwidth
(
unsigned
int
bandwidth_index)
41
{
42
if
(bandwidth_index <
m_nb_halfbw
)
43
{
44
return
m_halfbw
[bandwidth_index] * 2;
45
}
46
else
47
{
48
return
m_halfbw
[0] * 2;
49
}
50
}
51
52
unsigned
int
DeviceBladeRF1Bandwidths::getBandwidthIndex
(
unsigned
int
bandwidth)
53
{
54
for
(
unsigned
int
i
=0;
i
<
m_nb_halfbw
;
i
++)
55
{
56
if
(bandwidth/2000 ==
m_halfbw
[
i
])
57
{
58
return
i
;
59
}
60
}
61
62
return
0;
63
}
64
65
unsigned
int
DeviceBladeRF1Bandwidths::getNbBandwidths
()
66
{
67
return
DeviceBladeRF1Bandwidths::m_nb_halfbw
;
68
}
69
70
71
DeviceBladeRF1Bandwidths::m_halfbw
static unsigned int m_halfbw[]
Definition:
devicebladerf1values.h:29
DeviceBladeRF1Bandwidths::getBandwidthIndex
static unsigned int getBandwidthIndex(unsigned int bandwidth)
Definition:
devicebladerf1values.cpp:52
DeviceBladeRF1Bandwidths::m_nb_halfbw
static unsigned int m_nb_halfbw
Definition:
devicebladerf1values.h:30
i
int32_t i
Definition:
decimators.h:244
DeviceBladeRF1Bandwidths::getBandwidth
static unsigned int getBandwidth(unsigned int bandwidth_index)
Definition:
devicebladerf1values.cpp:40
DeviceBladeRF1Bandwidths::getNbBandwidths
static unsigned int getNbBandwidths()
Definition:
devicebladerf1values.cpp:65
Generated on Fri Aug 2 2019 17:56:29 for SDRAngel by
1.8.13