diff options
| author | Mark Meserve <mark.meserve@ni.com> | 2019-04-24 16:05:40 -0500 | 
|---|---|---|
| committer | Martin Braun <martin.braun@ettus.com> | 2019-05-02 14:36:21 -0700 | 
| commit | 23ed46556763a216d59b7521b0e8910ef3791287 (patch) | |
| tree | 7a8a22d18abf1d5df46f7daf94805a34aa0d32ff /host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp | |
| parent | 47c2ba9054fa48991c398b9f245958072f2c7c65 (diff) | |
| download | uhd-23ed46556763a216d59b7521b0e8910ef3791287.tar.gz uhd-23ed46556763a216d59b7521b0e8910ef3791287.tar.bz2 uhd-23ed46556763a216d59b7521b0e8910ef3791287.zip | |
twinrx: add lo charge pump properties
Diffstat (limited to 'host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp')
| -rw-r--r-- | host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp | 50 | 
1 files changed, 50 insertions, 0 deletions
| diff --git a/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp b/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp index 7ed01f624..29342ce51 100644 --- a/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp +++ b/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp @@ -469,6 +469,56 @@ public:          return coerced_freq;      } +    double set_lo1_charge_pump(channel_t ch, double current, bool commit = true) +    { +        boost::lock_guard<boost::mutex> lock(_mutex); +        double coerced_current = 0.0; +        if (ch == CH1 or ch == BOTH) { +            coerced_current = +                _lo1_iface[size_t(CH1)]->set_charge_pump_current(current, false); +        } +        if (ch == CH2 or ch == BOTH) { +            coerced_current = +                _lo1_iface[size_t(CH2)]->set_charge_pump_current(current, false); +        } + +        if (commit) { +            _commit(); +        } +        return coerced_current; +    } + +    double set_lo2_charge_pump(channel_t ch, double current, bool commit = true) +    { +        boost::lock_guard<boost::mutex> lock(_mutex); +        double coerced_current = 0.0; +        if (ch == CH1 or ch == BOTH) { +            coerced_current = +                _lo2_iface[size_t(CH1)]->set_charge_pump_current(current, false); +        } +        if (ch == CH2 or ch == BOTH) { +            coerced_current = +                _lo2_iface[size_t(CH2)]->set_charge_pump_current(current, false); +        } + +        if (commit) { +            _commit(); +        } +        return coerced_current; +    } + +    uhd::meta_range_t get_lo1_charge_pump_range() +    { +        // assume that both channels have the same range +        return _lo1_iface[size_t(CH1)]->get_charge_pump_current_range(); +    } + +    uhd::meta_range_t get_lo2_charge_pump_range() +    { +        // assume that both channels have the same range +        return _lo2_iface[size_t(CH1)]->get_charge_pump_current_range(); +    } +      bool read_lo1_locked(channel_t ch)      {          boost::lock_guard<boost::mutex> lock(_mutex); | 
