diff options
author | Johnathan Corgan | 2010-06-04 23:01:56 -0700 |
---|---|---|
committer | Johnathan Corgan | 2010-06-04 23:01:56 -0700 |
commit | 0ea8bff6d0c62e0ddd0a344365c5e345d0a10d07 (patch) | |
tree | de455c32956fba3658b6f772775a3162efd94a80 /usrp/host/include | |
parent | d784c4321114a83454493337393c5e2f5656e1e9 (diff) | |
parent | c85f8b729f397dbe938630da5d47b85977e78215 (diff) | |
download | gnuradio-0ea8bff6d0c62e0ddd0a344365c5e345d0a10d07.tar.gz gnuradio-0ea8bff6d0c62e0ddd0a344365c5e345d0a10d07.tar.bz2 gnuradio-0ea8bff6d0c62e0ddd0a344365c5e345d0a10d07.zip |
Merge branch 'maint'
* maint:
Fixed WBX RX PLL enable
Refactor WBX and adf4350 to avoid passing usrp pointer
Clean up annoying class structure in wbx
Fixing wbx to use _refclk_freq()
Typo in error message
Diffstat (limited to 'usrp/host/include')
-rw-r--r-- | usrp/host/include/usrp/db_wbxng.h | 39 |
1 files changed, 11 insertions, 28 deletions
diff --git a/usrp/host/include/usrp/db_wbxng.h b/usrp/host/include/usrp/db_wbxng.h index 8611d4787..9a7829278 100644 --- a/usrp/host/include/usrp/db_wbxng.h +++ b/usrp/host/include/usrp/db_wbxng.h @@ -30,7 +30,7 @@ class adf4350; class wbxng_base : public db_base { public: - wbxng_base(usrp_basic_sptr usrp, int which, int _power_on=0); + wbxng_base(usrp_basic_sptr usrp, int which); ~wbxng_base(); struct freq_result_t set_freq(double freq); @@ -40,31 +40,30 @@ public: double freq_max(); protected: - bool _lock_detect(); + void _write_spi(std::string data); + int _refclk_divisor(); + bool _get_locked(); bool _set_pga(float pga_gain); - int power_on() { return d_power_on; } - int power_off() { return 0; } - bool d_first; int d_spi_format; int d_spi_enable; int d_power_on; int d_PD; - adf4350 *d_common; + boost::shared_ptr<adf4350> d_common; }; // ---------------------------------------------------------------- -class wbxng_base_tx : public wbxng_base +class db_wbxng_tx : public wbxng_base { protected: void shutdown(); public: - wbxng_base_tx(usrp_basic_sptr usrp, int which, int _power_on=0); - ~wbxng_base_tx(); + db_wbxng_tx(usrp_basic_sptr usrp, int which); + ~db_wbxng_tx(); float gain_min(); float gain_max(); @@ -75,36 +74,20 @@ public: bool set_gain(float gain); }; -class wbxng_base_rx : public wbxng_base +class db_wbxng_rx : public wbxng_base { protected: void shutdown(); bool _set_attn(float attn); public: - wbxng_base_rx(usrp_basic_sptr usrp, int which, int _power_on=0); - ~wbxng_base_rx(); + db_wbxng_rx(usrp_basic_sptr usrp, int which); + ~db_wbxng_rx(); bool set_auto_tr(bool on); bool select_rx_antenna(int which_antenna); bool select_rx_antenna(const std::string &which_antenna); bool set_gain(float gain); -}; - -// ---------------------------------------------------------------- - -class db_wbxng_tx : public wbxng_base_tx -{ - public: - db_wbxng_tx(usrp_basic_sptr usrp, int which); - ~db_wbxng_tx(); -}; - -class db_wbxng_rx : public wbxng_base_rx -{ -public: - db_wbxng_rx(usrp_basic_sptr usrp, int which); - ~db_wbxng_rx(); float gain_min(); float gain_max(); |