usrp: moved fx2 stuff into common folder

This commit is contained in:
Josh Blum 2011-07-01 14:03:04 -07:00
parent 16afe14e35
commit 38eefb2eea
7 changed files with 13 additions and 11 deletions

View file

@ -32,7 +32,7 @@ LIBUHD_APPEND_SOURCES(
INCLUDE_SUBDIRECTORY(cores)
INCLUDE_SUBDIRECTORY(dboard)
INCLUDE_SUBDIRECTORY(fx2)
INCLUDE_SUBDIRECTORY(common)
INCLUDE_SUBDIRECTORY(usrp1)
INCLUDE_SUBDIRECTORY(usrp2)
INCLUDE_SUBDIRECTORY(b100)

View file

@ -18,7 +18,7 @@
#ifndef INCLUDED_B100_IMPL_HPP
#define INCLUDED_B100_IMPL_HPP
#include "../fx2/fx2_ctrl.hpp"
#include "fx2_ctrl.hpp"
#include "b100_ctrl.hpp"
#include "clock_ctrl.hpp"
#include "codec_ctrl.hpp"

View file

@ -20,6 +20,7 @@
########################################################################
IF(ENABLE_USB)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/../firmware/fx2/common)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
LIBUHD_APPEND_SOURCES(
${CMAKE_CURRENT_SOURCE_DIR}/fx2_ctrl.cpp

View file

@ -18,11 +18,11 @@
#ifndef INCLUDED_USRP1_IFACE_HPP
#define INCLUDED_USRP1_IFACE_HPP
#include "fx2_ctrl.hpp"
#include "wb_iface.hpp"
#include <uhd/types/serial.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/utility.hpp>
#include "../fx2/fx2_ctrl.hpp"
/*!
* The usrp1 interface class:

View file

@ -52,11 +52,6 @@ static UHD_INLINE double from_time_dur(const pt::time_duration &time_dur){
/***********************************************************************
* constants
**********************************************************************/
static const int underflow_flags = 0
| async_metadata_t::EVENT_CODE_UNDERFLOW
| async_metadata_t::EVENT_CODE_UNDERFLOW_IN_PACKET
;
static const size_t vrt_send_header_offset_words32 = 1;
/***********************************************************************
@ -219,11 +214,17 @@ void usrp2_impl::io_impl::recv_pirate_loop(
fc_mon.update_fc_condition(uhd::ntohx(fc_word32));
continue;
}
//print the famous U, and push the metadata into the message queue
if (metadata.event_code & underflow_flags) UHD_MSG(fastpath) << "U";
//else UHD_MSG(often) << "metadata.event_code " << metadata.event_code << std::endl;
async_msg_fifo.push_with_pop_on_full(metadata);
if (metadata.event_code &
( async_metadata_t::EVENT_CODE_UNDERFLOW
| async_metadata_t::EVENT_CODE_UNDERFLOW_IN_PACKET)
) UHD_MSG(fastpath) << "U";
else if (metadata.event_code &
( async_metadata_t::EVENT_CODE_SEQ_ERROR
| async_metadata_t::EVENT_CODE_SEQ_ERROR_IN_BURST)
) UHD_MSG(fastpath) << "S";
}
else{
//TODO unknown received packet, may want to print error...