forked from sdr/gr-osmosdr
bladerf: use bladerf_get_channel_count where available
This commit is contained in:
parent
bee32d9f0d
commit
b4e69137f3
|
@ -423,15 +423,11 @@ bladerf_board_type bladerf_common::get_board_type()
|
||||||
|
|
||||||
size_t bladerf_common::get_max_channels(bladerf_direction direction)
|
size_t bladerf_common::get_max_channels(bladerf_direction direction)
|
||||||
{
|
{
|
||||||
if (BLADERF_RX == direction) {
|
#ifdef BLADERF_COMPATIBILITY
|
||||||
return _max_chans.find(get_board_type())->second.first;
|
return 1;
|
||||||
}
|
#else
|
||||||
|
return bladerf_get_channel_count(_dev.get(), (BLADERF_TX == direction));
|
||||||
if (BLADERF_TX == direction) {
|
#endif
|
||||||
return _max_chans.find(get_board_type())->second.second;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void bladerf_common::set_channel_enable(bladerf_channel ch, bool enable)
|
void bladerf_common::set_channel_enable(bladerf_channel ch, bool enable)
|
||||||
|
|
Loading…
Reference in New Issue