aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/common/ad9361_driver/ad9361_device.h
diff options
context:
space:
mode:
authorJulian Arnold <julian.arnold@ettus.com>2015-01-20 08:55:08 -0800
committerMartin Braun <martin.braun@ettus.com>2015-01-20 19:31:25 +0100
commit47562bbf143889197f942168173ae7eb99209f19 (patch)
tree84f1dcb58a7a880de4aa724a2a8199c4d6158936 /host/lib/usrp/common/ad9361_driver/ad9361_device.h
parent28373cc1f7eddfb11748674316ffd4c52eeec3d9 (diff)
downloaduhd-47562bbf143889197f942168173ae7eb99209f19.tar.gz
uhd-47562bbf143889197f942168173ae7eb99209f19.tar.bz2
uhd-47562bbf143889197f942168173ae7eb99209f19.zip
ad9361: Added relative temperature sensor
This allows to read a relative temperature from an AD9361 device.
Diffstat (limited to 'host/lib/usrp/common/ad9361_driver/ad9361_device.h')
-rw-r--r--host/lib/usrp/common/ad9361_driver/ad9361_device.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_device.h b/host/lib/usrp/common/ad9361_driver/ad9361_device.h
index fead90424..b178e46cc 100644
--- a/host/lib/usrp/common/ad9361_driver/ad9361_device.h
+++ b/host/lib/usrp/common/ad9361_driver/ad9361_device.h
@@ -66,6 +66,12 @@ public:
/* Read back the internal RSSI measurement data. */
double get_rssi(chain_t chain);
+ /*! Read the internal temperature sensor
+ *\param calibrate return raw sensor readings or apply calibration factor.
+ *\param num_samples number of measurements to average over
+ */
+ double get_average_temperature(const double cal_offset = -30.0, const size_t num_samples = 3);
+
//Constants
static const double AD9361_MAX_GAIN;
static const double AD9361_MAX_CLOCK_RATE;
@@ -95,6 +101,7 @@ private: //Methods
void _reprogram_gains();
double _tune_helper(direction_t direction, const double value);
double _setup_rates(const double rate);
+ double _get_temperature(const double cal_offset, const double timeout = 0.1);
private: //Members
typedef struct {