mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 09:18:54 -05:00
BladeRF: cleanup: removed useless fixed sample rates support
This commit is contained in:
parent
1fda69c667
commit
7767d538f6
@ -84,61 +84,6 @@ struct bladerf *DeviceBladeRF::open_bladerf_from_serial(const char *serial)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const unsigned int BladerfSampleRates::m_nb_rates = 22;
|
|
||||||
const unsigned int BladerfSampleRates::m_rates[BladerfSampleRates::m_nb_rates] = {
|
|
||||||
1536000,
|
|
||||||
1600000,
|
|
||||||
2000000,
|
|
||||||
2304000,
|
|
||||||
2400000,
|
|
||||||
3072000,
|
|
||||||
3200000,
|
|
||||||
4333333, // for GSM
|
|
||||||
4608000,
|
|
||||||
4800000,
|
|
||||||
6144000,
|
|
||||||
7680000,
|
|
||||||
9216000,
|
|
||||||
9600000,
|
|
||||||
10752000,
|
|
||||||
12288000,
|
|
||||||
18432000,
|
|
||||||
19200000,
|
|
||||||
24576000,
|
|
||||||
30720000,
|
|
||||||
36864000,
|
|
||||||
39936000};
|
|
||||||
|
|
||||||
unsigned int BladerfSampleRates::getRate(unsigned int rate_index)
|
|
||||||
{
|
|
||||||
if (rate_index < m_nb_rates)
|
|
||||||
{
|
|
||||||
return m_rates[rate_index];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return m_rates[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int BladerfSampleRates::getRateIndex(unsigned int rate)
|
|
||||||
{
|
|
||||||
for (unsigned int i=0; i < m_nb_rates; i++)
|
|
||||||
{
|
|
||||||
if (rate == m_rates[i])
|
|
||||||
{
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int BladerfSampleRates::getNbRates()
|
|
||||||
{
|
|
||||||
return BladerfSampleRates::m_nb_rates;
|
|
||||||
}
|
|
||||||
|
|
||||||
const unsigned int BladerfBandwidths::m_nb_halfbw = 16;
|
const unsigned int BladerfBandwidths::m_nb_halfbw = 16;
|
||||||
const unsigned int BladerfBandwidths::m_halfbw[BladerfBandwidths::m_nb_halfbw] = {
|
const unsigned int BladerfBandwidths::m_halfbw[BladerfBandwidths::m_nb_halfbw] = {
|
||||||
750,
|
750,
|
||||||
|
@ -30,16 +30,6 @@ private:
|
|||||||
static struct bladerf *open_bladerf_from_serial(const char *serial);
|
static struct bladerf *open_bladerf_from_serial(const char *serial);
|
||||||
};
|
};
|
||||||
|
|
||||||
class BladerfSampleRates {
|
|
||||||
public:
|
|
||||||
static unsigned int getRate(unsigned int rate_index);
|
|
||||||
static unsigned int getRateIndex(unsigned int rate);
|
|
||||||
static unsigned int getNbRates();
|
|
||||||
private:
|
|
||||||
static const unsigned int m_nb_rates;
|
|
||||||
static const unsigned int m_rates[];
|
|
||||||
};
|
|
||||||
|
|
||||||
class BladerfBandwidths {
|
class BladerfBandwidths {
|
||||||
public:
|
public:
|
||||||
static unsigned int getBandwidth(unsigned int bandwidth_index);
|
static unsigned int getBandwidth(unsigned int bandwidth_index);
|
||||||
|
Loading…
Reference in New Issue
Block a user