summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-02-26 18:57:03 -0800
committerJosh Blum <josh@joshknows.com>2010-02-26 18:57:03 -0800
commit606b896cb964c38ddfed0f0e5785237f9a4d0034 (patch)
tree55d7978e1d6d732867078bf9f9ead7a28092bfe3 /host
parenta4452018d17329ca02fbda85cc6b6ac21084094a (diff)
downloaduhd-606b896cb964c38ddfed0f0e5785237f9a4d0034.tar.gz
uhd-606b896cb964c38ddfed0f0e5785237f9a4d0034.tar.bz2
uhd-606b896cb964c38ddfed0f0e5785237f9a4d0034.zip
fix for io types
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/usrp2/io_impl.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp
index 43334ddc6..c9a7b5fa4 100644
--- a/host/lib/usrp/usrp2/io_impl.cpp
+++ b/host/lib/usrp/usrp2/io_impl.cpp
@@ -26,8 +26,8 @@ using namespace uhd::usrp;
/***********************************************************************
* Constants
**********************************************************************/
-typedef std::complex<float> fc32_t;
-typedef std::complex<int16_t> sc16_t;
+typedef std::complex<float> fc32_t;
+typedef std::complex<short> sc16_t;
static const float float_scale_factor = pow(2.0, 15);
@@ -159,7 +159,7 @@ size_t usrp2_impl::send(
const uhd::metadata_t &metadata,
const std::string &type
){
- if (type == "fc32"){
+ if (type == "32fc"){
size_t num_samps = boost::asio::buffer_size(buff)/sizeof(fc32_t);
boost::shared_array<sc16_t> raw_mem(new sc16_t[num_samps]);
boost::asio::mutable_buffer raw_buff(raw_mem.get(), num_samps*sizeof(sc16_t));
@@ -173,7 +173,7 @@ size_t usrp2_impl::send(
return send_raw(raw_buff, metadata);
}
- if (type == "sc16"){
+ if (type == "16sc"){
#ifdef HAVE_BIG_ENDIAN
return send_raw(buff, metadata);
#else
@@ -202,7 +202,7 @@ size_t usrp2_impl::recv(
uhd::metadata_t &metadata,
const std::string &type
){
- if (type == "fc32"){
+ if (type == "32fc"){
size_t num_samps = boost::asio::buffer_size(buff)/sizeof(fc32_t);
boost::shared_array<sc16_t> raw_mem(new sc16_t[num_samps]);
boost::asio::mutable_buffer raw_buff(raw_mem.get(), num_samps*sizeof(sc16_t));
@@ -218,7 +218,7 @@ size_t usrp2_impl::recv(
return num_samps;
}
- if (type == "sc16"){
+ if (type == "16sc"){
#ifdef HAVE_BIG_ENDIAN
return recv_raw(buff, metadata);
#else