aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-10-31 14:30:52 -0700
committerMartin Braun <martin.braun@ettus.com>2016-11-08 08:02:22 -0800
commit99c2730bc9db270560671f2d7d173768465ed51f (patch)
treebc4df495734a075ebe2f7917cf67dec6fb7d8177 /host/lib/usrp/e300/e300_remote_codec_ctrl.cpp
parent218f4b0b63927110df9dbbaa8353c346eee2d98a (diff)
downloaduhd-99c2730bc9db270560671f2d7d173768465ed51f.tar.gz
uhd-99c2730bc9db270560671f2d7d173768465ed51f.tar.bz2
uhd-99c2730bc9db270560671f2d7d173768465ed51f.zip
Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width types)
- Also removes all references to boost/cstdint.hpp and replaces it with stdint.h (The 'correct' replacement would be <cstdint>, but not all of our compilers support that).
Diffstat (limited to 'host/lib/usrp/e300/e300_remote_codec_ctrl.cpp')
-rw-r--r--host/lib/usrp/e300/e300_remote_codec_ctrl.cpp116
1 files changed, 58 insertions, 58 deletions
diff --git a/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp b/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp
index 6ec39131d..b7c46c17d 100644
--- a/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp
+++ b/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp
@@ -17,7 +17,7 @@
#include "e300_remote_codec_ctrl.hpp"
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <uhd/exception.hpp>
#include <uhd/utils/byteswap.hpp>
#include <cstring>
@@ -36,17 +36,17 @@ public:
{
}
- void set_timed_spi(uhd::spi_iface::sptr, boost::uint32_t ) {};
- void set_safe_spi(uhd::spi_iface::sptr, boost::uint32_t ) {};
+ void set_timed_spi(uhd::spi_iface::sptr, uint32_t ) {};
+ void set_safe_spi(uhd::spi_iface::sptr, uint32_t ) {};
double set_gain(const std::string &which, const double value)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_SET_GAIN);
- if (which == "TX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX1);
- else if (which == "TX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX2);
- else if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1);
- else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_SET_GAIN);
+ if (which == "TX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX1);
+ else if (which == "TX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX2);
+ else if (which == "RX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX1);
+ else if (which == "RX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX2);
else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string.");
_args.gain = value;
@@ -57,9 +57,9 @@ public:
double set_clock_rate(const double rate)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(
+ _args.action = uhd::htonx<uint32_t>(
transaction_t::ACTION_SET_CLOCK_RATE);
- _args.which = uhd::htonx<boost::uint32_t>(
+ _args.which = uhd::htonx<uint32_t>(
transaction_t::CHAIN_NONE); /*Unused*/
_args.rate = rate;
@@ -70,12 +70,12 @@ public:
void set_active_chains(bool tx1, bool tx2, bool rx1, bool rx2)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(
+ _args.action = uhd::htonx<uint32_t>(
transaction_t::ACTION_SET_ACTIVE_CHANS);
/*Unused*/
- _args.which = uhd::htonx<boost::uint32_t>(
+ _args.which = uhd::htonx<uint32_t>(
transaction_t::CHAIN_NONE);
- _args.bits = uhd::htonx<boost::uint32_t>(
+ _args.bits = uhd::htonx<uint32_t>(
(tx1 ? (1<<0) : 0) |
(tx2 ? (1<<1) : 0) |
(rx1 ? (1<<2) : 0) |
@@ -87,11 +87,11 @@ public:
double tune(const std::string &which, const double value)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_TUNE);
- if (which == "TX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX1);
- else if (which == "TX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX2);
- else if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1);
- else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_TUNE);
+ if (which == "TX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX1);
+ else if (which == "TX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX2);
+ else if (which == "RX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX1);
+ else if (which == "RX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX2);
else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string.");
_args.freq = value;
@@ -102,11 +102,11 @@ public:
double get_freq(const std::string &which)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_GET_FREQ);
- if (which == "TX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX1);
- else if (which == "TX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX2);
- else if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1);
- else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_GET_FREQ);
+ if (which == "TX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX1);
+ else if (which == "TX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX2);
+ else if (which == "RX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX1);
+ else if (which == "RX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX2);
else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string.");
_transact();
@@ -116,9 +116,9 @@ public:
void data_port_loopback(const bool on)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_SET_LOOPBACK);
- _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_NONE); /*Unused*/
- _args.bits = uhd::htonx<boost::uint32_t>(on ? 1 : 0);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_SET_LOOPBACK);
+ _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_NONE); /*Unused*/
+ _args.bits = uhd::htonx<uint32_t>(on ? 1 : 0);
_transact();
}
@@ -126,11 +126,11 @@ public:
sensor_value_t get_rssi(const std::string &which)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_GET_RSSI);
- if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1);
- else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_GET_RSSI);
+ if (which == "RX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX1);
+ else if (which == "RX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX2);
else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string.");
- _args.bits = uhd::htonx<boost::uint32_t>(0);
+ _args.bits = uhd::htonx<uint32_t>(0);
_transact();
return sensor_value_t("RSSI", _retval.rssi, "dB");
@@ -139,9 +139,9 @@ public:
sensor_value_t get_temperature()
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_GET_TEMPERATURE);
- _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_NONE); /*Unused*/
- _args.bits = uhd::htonx<boost::uint32_t>(0);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_GET_TEMPERATURE);
+ _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_NONE); /*Unused*/
+ _args.bits = uhd::htonx<uint32_t>(0);
_transact();
return sensor_value_t("temp", _retval.temp, "C");
@@ -150,11 +150,11 @@ public:
void set_dc_offset_auto(const std::string &which, const bool on)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_SET_DC_OFFSET_AUTO);
- if (which == "TX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX1);
- else if (which == "TX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX2);
- else if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1);
- else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_SET_DC_OFFSET_AUTO);
+ if (which == "TX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX1);
+ else if (which == "TX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX2);
+ else if (which == "RX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX1);
+ else if (which == "RX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX2);
else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string.");
_args.use_dc_correction = on ? 1 : 0;
@@ -164,11 +164,11 @@ public:
void set_iq_balance_auto(const std::string &which, const bool on)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_SET_IQ_BALANCE_AUTO);
- if (which == "TX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX1);
- else if (which == "TX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX2);
- else if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1);
- else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_SET_IQ_BALANCE_AUTO);
+ if (which == "TX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX1);
+ else if (which == "TX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX2);
+ else if (which == "RX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX1);
+ else if (which == "RX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX2);
else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string.");
_args.use_iq_correction = on ? 1 : 0;
@@ -178,11 +178,11 @@ public:
void set_agc(const std::string &which, bool enable)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_SET_AGC);
- if (which == "TX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX1);
- else if (which == "TX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX2);
- else if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1);
- else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_SET_AGC);
+ if (which == "TX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX1);
+ else if (which == "TX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX2);
+ else if (which == "RX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX1);
+ else if (which == "RX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX2);
else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string.");
_args.use_agc = enable ? 1 : 0;
@@ -192,12 +192,12 @@ public:
void set_agc_mode(const std::string &which, const std::string &mode)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_SET_AGC_MODE);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_SET_AGC_MODE);
- if (which == "TX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX1);
- else if (which == "TX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX2);
- else if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1);
- else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2);
+ if (which == "TX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX1);
+ else if (which == "TX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX2);
+ else if (which == "RX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX1);
+ else if (which == "RX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX2);
else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string.");
if(mode == "slow") {
@@ -215,11 +215,11 @@ public:
double set_bw_filter(const std::string &which, const double bw)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_SET_BW);
- if (which == "TX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX1);
- else if (which == "TX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX2);
- else if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1);
- else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_SET_BW);
+ if (which == "TX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX1);
+ else if (which == "TX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX2);
+ else if (which == "RX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX1);
+ else if (which == "RX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX2);
else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string.");
_args.bw = bw;