diff options
author | Trung N Tran <trung.tran@ettus.com> | 2018-02-05 11:04:07 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-02-08 22:24:21 +0100 |
commit | d76918974ad467a4364d4c32948ce00a3afb59ff (patch) | |
tree | a5bc76081356938318d36774656188d361b122d7 /mpm/lib/mykonos/ad937x_device.cpp | |
parent | 832cbe095ae5e851aadddce66e1510d33a4430f3 (diff) | |
download | uhd-d76918974ad467a4364d4c32948ce00a3afb59ff.tar.gz uhd-d76918974ad467a4364d4c32948ce00a3afb59ff.tar.bz2 uhd-d76918974ad467a4364d4c32948ce00a3afb59ff.zip |
mpm: ad937x: implement set_bw_filter
Diffstat (limited to 'mpm/lib/mykonos/ad937x_device.cpp')
-rw-r--r-- | mpm/lib/mykonos/ad937x_device.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/mpm/lib/mykonos/ad937x_device.cpp b/mpm/lib/mykonos/ad937x_device.cpp index 885d45748..9b48a80bf 100644 --- a/mpm/lib/mykonos/ad937x_device.cpp +++ b/mpm/lib/mykonos/ad937x_device.cpp @@ -572,11 +572,29 @@ double ad937x_device::tune( double ad937x_device::set_bw_filter( const direction_t direction, - const chain_t chain, const double value ) { - // TODO: implement - return double(); + + switch (direction) + { + case TX_DIRECTION: + { + mykonos_config.device->tx->txProfile->rfBandwidth_Hz = value; + mykonos_config.device->tx->txProfile->txBbf3dBCorner_kHz = value/1000; + mykonos_config.device->tx->txProfile->txDac3dBCorner_kHz = value/1000; + break; + } + case RX_DIRECTION: + { + mykonos_config.device->rx->rxProfile->rfBandwidth_Hz = value; + mykonos_config.device->rx->rxProfile->rxBbf3dBCorner_kHz = value/1000; + break; + } + } + const auto state = _move_to_config_state(); + CALL_API(MYKONOS_writeArmProfile(mykonos_config.device)); + _restore_from_config_state(state); + return value; // TODO: what is coercer value? } |