aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/e300/e300_regs.hpp
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2015-08-10 23:14:20 -0700
committerAshish Chaudhari <ashish@ettus.com>2015-08-10 23:14:20 -0700
commitb5c81677078f56b3e671ebeaca1e3b803c2f4ef9 (patch)
treea1b17b4be203331de7e146e94051f26be5a20102 /host/lib/usrp/e300/e300_regs.hpp
parent16e149fe6fcc1bc18adea3eeeefad2c7ee93b2e0 (diff)
parent28327c8e8a810b19da126116d0dc4c26b643baed (diff)
downloaduhd-b5c81677078f56b3e671ebeaca1e3b803c2f4ef9.tar.gz
uhd-b5c81677078f56b3e671ebeaca1e3b803c2f4ef9.tar.bz2
uhd-b5c81677078f56b3e671ebeaca1e3b803c2f4ef9.zip
Merge branch 'master' into ashish/register_api
Diffstat (limited to 'host/lib/usrp/e300/e300_regs.hpp')
-rw-r--r--host/lib/usrp/e300/e300_regs.hpp62
1 files changed, 37 insertions, 25 deletions
diff --git a/host/lib/usrp/e300/e300_regs.hpp b/host/lib/usrp/e300/e300_regs.hpp
index 5736ebfd4..846c759a4 100644
--- a/host/lib/usrp/e300/e300_regs.hpp
+++ b/host/lib/usrp/e300/e300_regs.hpp
@@ -18,36 +18,48 @@
#ifndef INCLUDED_E300_REGS_HPP
#define INCLUDED_E300_REGS_HPP
-#include <boost/cstdint.hpp>
+#include <stdint.h>
+#include <uhd/config.hpp>
-#define TOREG(x) ((x)*4)
+namespace uhd { namespace usrp { namespace e300 { namespace radio {
-#define localparam static const int
+static UHD_INLINE uint32_t sr_addr(const uint32_t offset)
+{
+ return offset * 4;
+}
+
+static const uint32_t DACSYNC = 5;
+static const uint32_t LOOPBACK = 6;
+static const uint32_t TEST = 7;
+static const uint32_t SPI = 8;
+static const uint32_t GPIO = 16;
+static const uint32_t MISC_OUTS = 24;
+static const uint32_t READBACK = 32;
+static const uint32_t TX_CTRL = 64;
+static const uint32_t RX_CTRL = 96;
+static const uint32_t TIME = 128;
+static const uint32_t RX_DSP = 144;
+static const uint32_t TX_DSP = 184;
+static const uint32_t LEDS = 195;
+static const uint32_t FP_GPIO = 200;
+static const uint32_t RX_FRONT = 208;
+static const uint32_t TX_FRONT = 216;
+static const uint32_t CODEC_IDLE = 250;
-localparam SR_TEST = 7;
-localparam SR_SPI = 8;
-localparam SR_GPIO = 16;
-localparam SR_MISC_OUTS = 24;
-localparam SR_READBACK = 32;
-localparam SR_TX_CTRL = 64;
-localparam SR_RX_CTRL = 96;
-localparam SR_TIME = 128;
-localparam SR_RX_DSP = 144;
-localparam SR_TX_DSP = 184;
-localparam SR_LEDS = 195;
-localparam SR_FP_GPIO = 200;
-localparam SR_RX_FRONT = 208;
-localparam SR_TX_FRONT = 216;
-localparam SR_CODEC_IDLE = 250;
+static const uint32_t RB32_GPIO = 0;
+static const uint32_t RB32_SPI = 4;
+static const uint32_t RB64_TIME_NOW = 8;
+static const uint32_t RB64_TIME_PPS = 16;
+static const uint32_t RB32_TEST = 24;
+static const uint32_t RB32_RX = 28;
+static const uint32_t RB32_FP_GPIO = 32;
+static const uint32_t RB32_MISC_INS = 36;
+static const uint32_t RB64_CODEC_READBACK = 40;
+static const uint32_t RB32_RADIO_NUM = 48;
+}}}} // namespace
-localparam RB32_SPI = 4;
-localparam RB64_TIME_NOW = 8;
-localparam RB64_TIME_PPS = 16;
-localparam RB32_TEST = 24;
-localparam RB32_FP_GPIO = 32;
-localparam RB64_CODEC_READBACK = 40;
-localparam RB32_RADIO_NUM = 48;
+#define localparam static const int
localparam ST_RX_ENABLE = 20;
localparam ST_TX_ENABLE = 19;