aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-06-05 13:29:23 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 11:49:09 -0800
commit8aaf42a280b8ef58e1068a22c049c914b9803f99 (patch)
treefac24f88a28034135be3e5069389e9ef80dc8f38 /host/include
parent15bdf9b64b3245e1bf7a7603faf71ce72e1dac69 (diff)
downloaduhd-8aaf42a280b8ef58e1068a22c049c914b9803f99.tar.gz
uhd-8aaf42a280b8ef58e1068a22c049c914b9803f99.tar.bz2
uhd-8aaf42a280b8ef58e1068a22c049c914b9803f99.zip
utils: soft_register: Remove 16-bit mode
This mode is never used, and makes it more cumbersome to maintain this code.
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/utils/soft_register.hpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/host/include/uhd/utils/soft_register.hpp b/host/include/uhd/utils/soft_register.hpp
index b31f36be7..cae056313 100644
--- a/host/include/uhd/utils/soft_register.hpp
+++ b/host/include/uhd/utils/soft_register.hpp
@@ -215,9 +215,7 @@ public:
// If flush mode is ALWAYS, the dirty flag should get optimized
// out by the compiler because it is never read
if (_flush_mode == ALWAYS_FLUSH || _soft_copy.is_dirty()) {
- if (get_bitwidth() <= 16) {
- _iface->poke16(_wr_addr, static_cast<uint16_t>(_soft_copy));
- } else if (get_bitwidth() <= 32) {
+ if (get_bitwidth() <= 32) {
_iface->poke32(_wr_addr, static_cast<uint32_t>(_soft_copy));
} else if (get_bitwidth() <= 64) {
_iface->poke64(_wr_addr, static_cast<uint64_t>(_soft_copy));
@@ -239,9 +237,7 @@ public:
UHD_INLINE void refresh()
{
if (readable && _iface) {
- if (get_bitwidth() <= 16) {
- _soft_copy = static_cast<reg_data_t>(_iface->peek16(_rd_addr));
- } else if (get_bitwidth() <= 32) {
+ if (get_bitwidth() <= 32) {
_soft_copy = static_cast<reg_data_t>(_iface->peek32(_rd_addr));
} else if (get_bitwidth() <= 64) {
_soft_copy = static_cast<reg_data_t>(_iface->peek64(_rd_addr));
@@ -385,18 +381,11 @@ private:
* - soft_reg<bits>_<mode>_sync_t: Soft register object with a synchronized soft-copy.
* Thread safe but with memory/speed overhead.
* where:
- * - <bits> = {16, 32 or 64}
+ * - <bits> = {32 or 64}
* - <mode> = {wo(write-only), rw(read-write) or ro(read-only)}
*
*/
-// 16-bit shortcuts
-typedef soft_register_t<uint16_t, false, true> soft_reg16_wo_t;
-typedef soft_register_t<uint16_t, true, false> soft_reg16_ro_t;
-typedef soft_register_t<uint16_t, true, true> soft_reg16_rw_t;
-typedef soft_register_sync_t<uint16_t, false, true> soft_reg16_wo_sync_t;
-typedef soft_register_sync_t<uint16_t, true, false> soft_reg16_ro_sync_t;
-typedef soft_register_sync_t<uint16_t, true, true> soft_reg16_rw_sync_t;
// 32-bit shortcuts
typedef soft_register_t<uint32_t, false, true> soft_reg32_wo_t;
typedef soft_register_t<uint32_t, true, false> soft_reg32_ro_t;