X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=usrp%2Fhost%2Finclude%2Fusrp%2Fdb_wbxng.h;fp=usrp%2Fhost%2Finclude%2Fusrp%2Fdb_wbxng.h;h=9a7829278731f1d1fa06c8186131b4b9912379ed;hb=c85f8b729f397dbe938630da5d47b85977e78215;hp=8611d4787debec97b1c56d03310d01bce1189cf5;hpb=34bf49d06e6b5e48c08d92e2b9e0794512fa761f;p=debian%2Fgnuradio diff --git a/usrp/host/include/usrp/db_wbxng.h b/usrp/host/include/usrp/db_wbxng.h index 8611d478..9a782927 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 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();