Changeset 9756
- Timestamp:
- 10/08/08 17:22:47
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/db_flexrf.cc
r9755 r9756 37 37 #define CLOCK_OUT (1 << 0) 38 38 39 flexrf_base::flexrf_base(usrp_basic *usrp, int which, int _power_on)40 : db_base(usrp, which ), d_power_on(_power_on)39 flexrf_base::flexrf_base(usrp_basic *usrp, int which, bool tx, int _power_on) 40 : db_base(usrp, which, tx), d_power_on(_power_on) 41 41 { 42 42 /* … … 55 55 56 56 set_auto_tr(false); 57 58 /*59 std::string title;60 if(debug_using_gui) {61 title = "FlexRF Debug Rx";62 if(d_tx) {63 title = "FlexRF Debug Tx";64 }65 d_gui = flexrf_debug_gui.flexrf_debug_gui(title);66 d_gui.Show(true);67 }68 */69 57 } 70 58 … … 302 290 303 291 flexrf_base_tx::flexrf_base_tx(usrp_basic *usrp, int which, int _power_on) 304 : flexrf_base(usrp, which, _power_on)292 : flexrf_base(usrp, which, true, _power_on) 305 293 { 306 294 /* … … 309 297 */ 310 298 311 d_usrp = (usrp_basic_tx*)usrp;312 d_tx = true;313 314 299 if(which == 0) { 315 300 d_spi_enable = SPI_ENABLE_TX_A; … … 408 393 409 394 flexrf_base_rx::flexrf_base_rx(usrp_basic *usrp, int which, int _power_on) 410 : flexrf_base(usrp, which, _power_on)395 : flexrf_base(usrp, which, false, _power_on) 411 396 { 412 397 /* … … 414 399 @param which: 0 or 1 corresponding to side RX_A or RX_B respectively. 415 400 */ 416 417 d_usrp = (usrp_basic_rx*)usrp;418 d_tx = false;419 401 420 402 if(which == 0) { … … 657 639 } 658 640 659 double660 _AD4360_common::freq_min()661 {662 throw 0;663 }664 665 double666 _AD4360_common::freq_max()667 {668 throw 0;669 }670 671 641 //---------------------------------------------------------------------- 672 642 gnuradio/branches/developers/eb/cppdb-wip/usrp/host/lib/legacy/db_flexrf.h
r9754 r9756 34 34 { 35 35 public: 36 flexrf_base(usrp_basic *usrp, int which, int _power_on=0);36 flexrf_base(usrp_basic *usrp, int which, bool tx, int _power_on=0); 37 37 ~flexrf_base(); 38 38 … … 89 89 bool set_enable(bool on); 90 90 bool set_gain(float gain); 91 92 protected:93 usrp_basic_tx *d_usrp;94 91 }; 95 92 … … 104 101 bool select_rx_antenna(const std::string &which_antenna); 105 102 bool set_gain(float gain); 106 107 protected:108 usrp_basic_rx *d_usrp;109 103 }; 110 104 … … 118 112 virtual ~_AD4360_common(); 119 113 120 virtual double freq_min() ;121 virtual double freq_max() ;114 virtual double freq_min() = 0; 115 virtual double freq_max() = 0; 122 116 123 117 bool _compute_regs(double refclk_freq, double freq, int &retR,
