diff options
author | Sugandha Gupta <sugandha.gupta@ettus.com> | 2019-01-25 11:34:47 -0800 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-05-01 15:17:23 -0700 |
commit | 178b35569b1a25180a80a23b945b10b04c9f10f5 (patch) | |
tree | 3adb6f78ebd148867a50526c60fe7bf9694a4a72 /host/lib/usrp/e300/e300_sensor_manager.hpp | |
parent | 8a400f6a30942c9d6d3596f6989720eb4cff058b (diff) | |
download | uhd-178b35569b1a25180a80a23b945b10b04c9f10f5.tar.gz uhd-178b35569b1a25180a80a23b945b10b04c9f10f5.tar.bz2 uhd-178b35569b1a25180a80a23b945b10b04c9f10f5.zip |
e310/e320: Move E310 to MPM architecture and refactor
- Turns the E310 into an MPM device (like N3xx, E320)
- Factor out common code between E320 and E310, maximize sharing between
the two devices
- Remove all pre-MPM E310 code that is no longer needed
- Modify MPM to remove all existing overlays before applying new ones
(this is necessary to enable idle image mode for E310)
Co-authored-by: Virendra Kakade <virendra.kakade@ni.com>
Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
Diffstat (limited to 'host/lib/usrp/e300/e300_sensor_manager.hpp')
-rw-r--r-- | host/lib/usrp/e300/e300_sensor_manager.hpp | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/host/lib/usrp/e300/e300_sensor_manager.hpp b/host/lib/usrp/e300/e300_sensor_manager.hpp deleted file mode 100644 index 8ed09b1eb..000000000 --- a/host/lib/usrp/e300/e300_sensor_manager.hpp +++ /dev/null @@ -1,68 +0,0 @@ -// -// Copyright 2014-2015 Ettus Research LLC -// Copyright 2018 Ettus Research, a National Instruments Company -// -// SPDX-License-Identifier: GPL-3.0-or-later -// - -#include <uhd/utils/noncopyable.hpp> -#include <stdint.h> - -#include <uhd/transport/zero_copy.hpp> -#include <uhd/types/sensors.hpp> -#include <uhd/utils/byteswap.hpp> -#include <uhd/usrp/gps_ctrl.hpp> -#include "e300_global_regs.hpp" - -#ifndef INCLUDED_E300_SENSOR_MANAGER_HPP -#define INCLUDED_E300_SENSOR_MANAGER_HPP - -namespace uhd { namespace usrp { namespace e300 { - -struct sensor_transaction_t { - uint32_t which; - union { - uint32_t value; - uint32_t value64; - }; -}; - - - -enum sensor {ZYNQ_TEMP=0, REF_LOCK=4}; - -class e300_sensor_manager : uhd::noncopyable -{ -public: - typedef boost::shared_ptr<e300_sensor_manager> sptr; - - virtual ~e300_sensor_manager() {}; - - virtual uhd::sensor_value_t get_sensor(const std::string &key) = 0; - virtual std::vector<std::string> get_sensors(void) = 0; - - virtual uhd::sensor_value_t get_mb_temp(void) = 0; - virtual uhd::sensor_value_t get_ref_lock(void) = 0; - - - static sptr make_proxy(uhd::transport::zero_copy_if::sptr xport); - static sptr make_local(global_regs::sptr global_regs); - - // Note: This is a hack - static uint32_t pack_float_in_uint32_t(const float &v) - { - const uint32_t *cast = reinterpret_cast<const uint32_t*>(&v); - return *cast; - } - - static float unpack_float_from_uint32_t(const uint32_t &v) - { - const float *cast = reinterpret_cast<const float*>(&v); - return *cast; - } -}; - - -}}} // namespace - -#endif // INCLUDED_E300_SENSOR_MANAGER_HPP |