From 8aaf42a280b8ef58e1068a22c049c914b9803f99 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 5 Jun 2019 13:29:23 -0700 Subject: utils: soft_register: Remove 16-bit mode This mode is never used, and makes it more cumbersome to maintain this code. --- host/include/uhd/utils/soft_register.hpp | 17 +++-------------- host/lib/usrp/multi_usrp.cpp | 14 -------------- 2 files changed, 3 insertions(+), 28 deletions(-) (limited to 'host') 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(_soft_copy)); - } else if (get_bitwidth() <= 32) { + if (get_bitwidth() <= 32) { _iface->poke32(_wr_addr, static_cast(_soft_copy)); } else if (get_bitwidth() <= 64) { _iface->poke64(_wr_addr, static_cast(_soft_copy)); @@ -239,9 +237,7 @@ public: UHD_INLINE void refresh() { if (readable && _iface) { - if (get_bitwidth() <= 16) { - _soft_copy = static_cast(_iface->peek16(_rd_addr)); - } else if (get_bitwidth() <= 32) { + if (get_bitwidth() <= 32) { _soft_copy = static_cast(_iface->peek32(_rd_addr)); } else if (get_bitwidth() <= 64) { _soft_copy = static_cast(_iface->peek64(_rd_addr)); @@ -385,18 +381,11 @@ private: * - soft_reg__sync_t: Soft register object with a synchronized soft-copy. * Thread safe but with memory/speed overhead. * where: - * - = {16, 32 or 64} + * - = {32 or 64} * - = {wo(write-only), rw(read-write) or ro(read-only)} * */ -// 16-bit shortcuts -typedef soft_register_t soft_reg16_wo_t; -typedef soft_register_t soft_reg16_ro_t; -typedef soft_register_t soft_reg16_rw_t; -typedef soft_register_sync_t soft_reg16_wo_sync_t; -typedef soft_register_sync_t soft_reg16_ro_sync_t; -typedef soft_register_sync_t soft_reg16_rw_sync_t; // 32-bit shortcuts typedef soft_register_t soft_reg32_wo_t; typedef soft_register_t soft_reg32_ro_t; diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 19d710349..5789c8a72 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -2368,13 +2368,6 @@ public: } switch (reg.get_bitwidth()) { - case 16: - if (reg.is_readable()) - uhd::soft_register_base::cast(reg).write(field, static_cast(value)); - else - uhd::soft_register_base::cast(reg).write(field, static_cast(value)); - break; - case 32: if (reg.is_readable()) uhd::soft_register_base::cast(reg).write(field, static_cast(value)); @@ -2411,13 +2404,6 @@ public: } switch (reg.get_bitwidth()) { - case 16: - if (reg.is_writable()) - return static_cast(uhd::soft_register_base::cast(reg).read(field)); - else - return static_cast(uhd::soft_register_base::cast(reg).read(field)); - break; - case 32: if (reg.is_writable()) return static_cast(uhd::soft_register_base::cast(reg).read(field)); -- cgit v1.2.3