aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/usrp2/io_impl.cpp6
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp2
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp8
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.hpp12
4 files changed, 10 insertions, 18 deletions
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp
index 485cc2bd9..b6ab919e7 100644
--- a/host/lib/usrp/usrp2/io_impl.cpp
+++ b/host/lib/usrp/usrp2/io_impl.cpp
@@ -48,8 +48,8 @@ void usrp2_impl::io_init(void){
send_buff->done(sizeof(data));
//setup RX DSP regs
- std::cout << "RX samples per packet: " << max_rx_samps_per_packet() << std::endl;
- _iface->poke32(FR_RX_CTRL_NSAMPS_PER_PKT, max_rx_samps_per_packet());
+ std::cout << "RX samples per packet: " << get_max_recv_samps_per_packet() << std::endl;
+ _iface->poke32(FR_RX_CTRL_NSAMPS_PER_PKT, get_max_recv_samps_per_packet());
_iface->poke32(FR_RX_CTRL_NCHANNELS, 1);
_iface->poke32(FR_RX_CTRL_CLEAR_OVERRUN, 1); //reset
_iface->poke32(FR_RX_CTRL_VRT_HEADER, 0
@@ -77,7 +77,7 @@ size_t usrp2_impl::send(
io_type, _tx_otw_type, //input and output types to convert
get_master_clock_freq(), //master clock tick rate
_data_transport, //zero copy interface
- max_tx_samps_per_packet()
+ get_max_send_samps_per_packet()
);
}
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index a10529102..f17efd88e 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -111,7 +111,7 @@ void usrp2_impl::issue_ddc_stream_cmd(const stream_cmd_t &stream_cmd){
//issue the stream command
_iface->poke32(FR_RX_CTRL_STREAM_CMD, FR_RX_CTRL_MAKE_CMD(
- (inst_samps)? stream_cmd.num_samps : ((inst_chain)? max_rx_samps_per_packet() : 1),
+ (inst_samps)? stream_cmd.num_samps : ((inst_chain)? get_max_recv_samps_per_packet() : 1),
(stream_cmd.stream_now)? 1 : 0,
(inst_chain)? 1 : 0,
(inst_reload)? 1 : 0
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 3b7156802..af3ec216a 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -210,14 +210,6 @@ void usrp2_impl::get(const wax::obj &key_, wax::obj &val){
val = prop_names_t(1, "");
return;
- case DEVICE_PROP_MAX_RX_SAMPLES:
- val = max_rx_samps_per_packet();
- return;
-
- case DEVICE_PROP_MAX_TX_SAMPLES:
- val = max_tx_samps_per_packet();
- return;
-
default: UHD_THROW_PROP_GET_ERROR();
}
}
diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp
index ad674f594..afea9683c 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.hpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.hpp
@@ -104,12 +104,18 @@ public:
~usrp2_impl(void);
//the io interface
+ size_t get_max_send_samps_per_packet(void) const{
+ return _max_tx_bytes_per_packet/_tx_otw_type.get_sample_size();
+ }
size_t send(
const boost::asio::const_buffer &,
const uhd::tx_metadata_t &,
const uhd::io_type_t &,
uhd::device::send_mode_t
);
+ size_t get_max_recv_samps_per_packet(void) const{
+ return _max_rx_bytes_per_packet/_rx_otw_type.get_sample_size();
+ }
size_t recv(
const boost::asio::mutable_buffer &,
uhd::rx_metadata_t &,
@@ -146,12 +152,6 @@ private:
_mtu - _hdrs -
uhd::transport::vrt::max_header_words32*sizeof(boost::uint32_t)
;
- size_t max_rx_samps_per_packet(void){
- return _max_rx_bytes_per_packet/_rx_otw_type.get_sample_size();
- }
- size_t max_tx_samps_per_packet(void){
- return _max_tx_bytes_per_packet/_tx_otw_type.get_sample_size();
- }
vrt_packet_handler::recv_state _packet_handler_recv_state;
vrt_packet_handler::send_state _packet_handler_send_state;