X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=usrp2%2Fhost%2Flib%2Fusrp2_impl.h;h=8928751b31f16610431dbdbd0059652478ef319f;hb=8056ff424a153dd5bab95bdda1758efe5ed9b246;hp=d9701287e8ec5528e0533cc98f6edf8784469d3a;hpb=297479844e3d9a6eea54fa69147e6a20c0bfc412;p=debian%2Fgnuradio diff --git a/usrp2/host/lib/usrp2_impl.h b/usrp2/host/lib/usrp2_impl.h index d9701287..8928751b 100644 --- a/usrp2/host/lib/usrp2_impl.h +++ b/usrp2/host/lib/usrp2_impl.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2008 Free Software Foundation, Inc. + * Copyright 2008,2009 Free Software Foundation, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +27,8 @@ #include "ring.h" #include +#define MAX_SUBPKT_LEN 252 + namespace usrp2 { class eth_buffer; @@ -55,6 +57,7 @@ namespace usrp2 { static const size_t NCHANS = 32; eth_buffer *d_eth_buf; + std::string d_ifc_name; pktfilter *d_pf; std::string d_addr; // FIXME: use u2_mac_addr_t instead usrp2_thread *d_bg_thread; @@ -106,6 +109,7 @@ namespace usrp2 { data_handler::result handle_control_packet(const void *base, size_t len); data_handler::result handle_data_packet(const void *base, size_t len); bool dboard_info(); + bool reset_db(); public: impl(const std::string &ifc, props *p); @@ -114,6 +118,7 @@ namespace usrp2 { void bg_loop(); std::string mac_addr() const { return d_addr; } // FIXME: convert from u2_mac_addr_t + std::string ifc_name() const { return d_ifc_name; } // Rx @@ -121,6 +126,7 @@ namespace usrp2 { double rx_gain_min() { return d_rx_db_info.gain_min; } double rx_gain_max() { return d_rx_db_info.gain_max; } double rx_gain_db_per_step() { return d_rx_db_info.gain_step_size; } + bool set_rx_lo_offset(double frequency); bool set_rx_center_freq(double frequency, tune_result *result); double rx_freq_min() { return d_rx_db_info.freq_min; } double rx_freq_max() { return d_rx_db_info.freq_max; } @@ -139,11 +145,13 @@ namespace usrp2 { double tx_gain_min() { return d_tx_db_info.gain_min; } double tx_gain_max() { return d_tx_db_info.gain_max; } double tx_gain_db_per_step() { return d_tx_db_info.gain_step_size; } + bool set_tx_lo_offset(double frequency); bool set_tx_center_freq(double frequency, tune_result *result); double tx_freq_min() { return d_tx_db_info.freq_min; } double tx_freq_max() { return d_tx_db_info.freq_max; } bool set_tx_interp(int interpolation_factor); int tx_interp() { return d_tx_interp; } + void default_tx_scale_iq(int interpolation_factor, int *scale_i, int *scale_q); bool set_tx_scale_iq(int scale_i, int scale_q); bool tx_32fc(unsigned int channel, @@ -174,7 +182,9 @@ namespace usrp2 { bool burn_mac_addr(const std::string &new_addr); bool sync_to_pps(); - std::vector peek(uint32_t addr, uint32_t len); + bool sync_every_pps(bool enable); + std::vector peek32(uint32_t addr, uint32_t words); + bool poke32(uint32_t addr, const std::vector &data); }; } // namespace usrp2