From 927e795da332fc0903c311d07bdd0344efe31a95 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 16 Jun 2011 11:50:05 -0700 Subject: uhd: replaced boolean for thread loop w/ boost::this_thread::interruption_requested --- host/lib/usrp/usrp2/io_impl.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index ffe9a88e7..df452942c 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -146,7 +146,6 @@ struct usrp2_impl::io_impl{ } ~io_impl(void){ - recv_pirate_crew_raiding = false; recv_pirate_crew.interrupt_all(); recv_pirate_crew.join_all(); } @@ -185,7 +184,6 @@ struct usrp2_impl::io_impl{ //methods and variables for the pirate crew void recv_pirate_loop(boost::barrier &, usrp2_mboard_impl::sptr, zero_copy_if::sptr, size_t); boost::thread_group recv_pirate_crew; - bool recv_pirate_crew_raiding; bounded_buffer async_msg_fifo; }; @@ -201,14 +199,13 @@ void usrp2_impl::io_impl::recv_pirate_loop( zero_copy_if::sptr err_xport, size_t index ){ - recv_pirate_crew_raiding = true; spawn_barrier.wait(); set_thread_priority_safe(); //store a reference to the flow control monitor (offset by max dsps) flow_control_monitor &fc_mon = *(this->fc_mons[index*usrp2_mboard_impl::MAX_NUM_DSPS]); - while(recv_pirate_crew_raiding){ + while (not boost::this_thread::interruption_requested()){ managed_recv_buffer::sptr buff = err_xport->get_recv_buff(); if (not buff.get()) continue; //ignore timeout/error buffers -- cgit v1.2.3 From 54caee78f5bc224dde995dffd6250418b586a0bb Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 16 Jun 2011 13:54:46 -0700 Subject: uhd: replaced boolean for thread loop w/ boost::this_thread::interruption_requested --- host/lib/usrp/b100/b100_ctrl.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/b100/b100_ctrl.cpp b/host/lib/usrp/b100/b100_ctrl.cpp index 4d4520e1e..40b6435ac 100644 --- a/host/lib/usrp/b100/b100_ctrl.cpp +++ b/host/lib/usrp/b100/b100_ctrl.cpp @@ -51,7 +51,6 @@ public: ctrl_data_t read(boost::uint32_t addr, size_t len); ~b100_ctrl_impl(void) { - bbl_out_marauding = false; viking_marauders.interrupt_all(); viking_marauders.join_all(); } @@ -67,7 +66,6 @@ private: bounded_buffer sync_ctrl_fifo; bounded_buffer async_msg_fifo; boost::thread_group viking_marauders; - bool bbl_out_marauding; uhd::transport::usb_zero_copy::sptr _ctrl_transport; boost::uint8_t _seq; @@ -168,11 +166,10 @@ ctrl_data_t b100_ctrl_impl::read(boost::uint32_t addr, size_t len) { * wait for a control operation to finish before starting another one. **********************************************************************/ void b100_ctrl_impl::viking_marauder_loop(boost::barrier &spawn_barrier) { - bbl_out_marauding = true; spawn_barrier.wait(); set_thread_priority_safe(); - while(bbl_out_marauding){ + while (not boost::this_thread::interruption_requested()){ managed_recv_buffer::sptr rbuf = _ctrl_transport->get_recv_buff(); if(!rbuf.get()) continue; //that's ok, there are plenty of villages to pillage! const boost::uint16_t *pkt_buf = rbuf->cast(); -- cgit v1.2.3 From 16e783aa9c7257717d80a375ffeb592d0386f911 Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Thu, 16 Jun 2011 13:59:15 -0700 Subject: N210 R4 lost fix for ADC data termination --- host/lib/usrp/usrp2/codec_ctrl.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/usrp2/codec_ctrl.cpp b/host/lib/usrp/usrp2/codec_ctrl.cpp index ee0ef9ceb..06bf83b15 100644 --- a/host/lib/usrp/usrp2/codec_ctrl.cpp +++ b/host/lib/usrp/usrp2/codec_ctrl.cpp @@ -87,7 +87,9 @@ public: _ads62p44_regs.power_down = ads62p44_regs_t::POWER_DOWN_NORMAL; _ads62p44_regs.output_interface = ads62p44_regs_t::OUTPUT_INTERFACE_LVDS; _ads62p44_regs.lvds_current = ads62p44_regs_t::LVDS_CURRENT_2_5MA; + _ads62p44_regs.lvds_data_term = ads62p44_regs_t::LVDS_DATA_TERM_100; this->send_ads62p44_reg(0x11); + this->send_ads62p44_reg(0x12); this->send_ads62p44_reg(0x14); this->set_rx_analog_gain(1); break; -- cgit v1.2.3 From bc87971891df7f47c8240a24d2a602c6ae63bbc2 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 14 Jun 2011 19:52:30 +0100 Subject: e100: bug fix w/ SID parsing (endianess) --- host/lib/usrp/usrp_e100/io_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/usrp_e100/io_impl.cpp b/host/lib/usrp/usrp_e100/io_impl.cpp index 91b129276..998a715fe 100644 --- a/host/lib/usrp/usrp_e100/io_impl.cpp +++ b/host/lib/usrp/usrp_e100/io_impl.cpp @@ -123,7 +123,7 @@ void usrp_e100_impl::io_impl::recv_pirate_loop( const boost::uint32_t *vrt_hdr = buff->cast(); //handle an rx data packet or inline message - if (uhd::ntohx(vrt_hdr[1]) == rx_data_inline_sid){ //ASSUME has_sid + if (uhd::wtohx(vrt_hdr[1]) == rx_data_inline_sid){ //ASSUME has_sid if (fp_recv_debug) UHD_LOGV(always) << "this is rx_data_inline_sid\n"; //same number of frames as the data transport -> always immediate recv_pirate_booty.push_with_wait(buff); -- cgit v1.2.3