diff options
author | Ben Hilburn <ben.hilburn@ettus.com> | 2014-04-10 13:05:30 -0700 |
---|---|---|
committer | Ben Hilburn <ben.hilburn@ettus.com> | 2014-04-10 13:05:30 -0700 |
commit | d3459ad697b4c38354731eb6e6fc1075b194d5ea (patch) | |
tree | cdc8fb0fbf8cee90d3b3d279b31b0372f1f04a57 /host/lib/usrp/b200 | |
parent | bab808d883366123a944ce047a0b88a1b3ce1117 (diff) | |
parent | dfd019c5b76446830031c0c2352f0558dd48c210 (diff) | |
download | uhd-d3459ad697b4c38354731eb6e6fc1075b194d5ea.tar.gz uhd-d3459ad697b4c38354731eb6e6fc1075b194d5ea.tar.bz2 uhd-d3459ad697b4c38354731eb6e6fc1075b194d5ea.zip |
Merge branch 'martin/warn_sampling_rate'
Warn users if they request a sample rate greater than the interface bandwidth.
Diffstat (limited to 'host/lib/usrp/b200')
-rw-r--r-- | host/lib/usrp/b200/b200_impl.cpp | 1 | ||||
-rw-r--r-- | host/lib/usrp/b200/b200_impl.hpp | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index 9dd3a424d..84310a9fe 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -250,6 +250,7 @@ b200_impl::b200_impl(const device_addr_t &device_addr) ctrl_xport_args ); while (_ctrl_transport->get_recv_buff(0.0)){} //flush ctrl xport + _tree->create<double>(mb_path / "link_max_rate").set((usb_speed == 3) ? B200_MAX_RATE_USB3 : B200_MAX_RATE_USB2); //////////////////////////////////////////////////////////////////// // Async task structure diff --git a/host/lib/usrp/b200/b200_impl.hpp b/host/lib/usrp/b200/b200_impl.hpp index 7d98a8f8d..c3508c550 100644 --- a/host/lib/usrp/b200/b200_impl.hpp +++ b/host/lib/usrp/b200/b200_impl.hpp @@ -47,11 +47,13 @@ static const boost::uint8_t B200_FW_COMPAT_NUM_MAJOR = 0x04; static const boost::uint8_t B200_FW_COMPAT_NUM_MINOR = 0x00; static const boost::uint16_t B200_FPGA_COMPAT_NUM = 0x03; -static const double B200_LINK_RATE_BPS = (5e9)/8; //practical link rate (5 Gbps) static const double B200_BUS_CLOCK_RATE = 100e6; static const double B200_DEFAULT_TICK_RATE = 32e6; static const boost::uint32_t B200_GPSDO_ST_NONE = 0x83; +static const size_t B200_MAX_RATE_USB2 = 32000000; // bytes/s +static const size_t B200_MAX_RATE_USB3 = 500000000; // bytes/s + #define FLIP_SID(sid) (((sid)<<16)|((sid)>>16)) static const boost::uint32_t B200_CTRL0_MSG_SID = 0x00000010; |