aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2016-06-23 09:33:58 -0700
committerMartin Braun <martin.braun@ettus.com>2016-07-19 09:28:10 -0700
commit446e922d887e06c1fe8f61af36a277b38740d376 (patch)
tree7f953aa2e40e1810e36077b268ac511a8765b772 /host/include
parentb4412c79c026fef94affe8e7c9a1518ab4954183 (diff)
downloaduhd-446e922d887e06c1fe8f61af36a277b38740d376.tar.gz
uhd-446e922d887e06c1fe8f61af36a277b38740d376.tar.bz2
uhd-446e922d887e06c1fe8f61af36a277b38740d376.zip
C API: wrapped multi_usrp functions for interacting with LO's
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/config.h2
-rw-r--r--host/include/uhd/usrp/usrp.h79
2 files changed, 79 insertions, 2 deletions
diff --git a/host/include/uhd/config.h b/host/include/uhd/config.h
index 1677c80ec..3c3f9b01b 100644
--- a/host/include/uhd/config.h
+++ b/host/include/uhd/config.h
@@ -43,7 +43,7 @@ typedef ptrdiff_t ssize_t;
#define UHD_DEPRECATED __declspec(deprecated)
#define UHD_ALIGNED(x) __declspec(align(x))
#define UHD_UNUSED(x) x __attribute__((unused))
-#elif defined(__GNUG__) && __GNUG__ >= 4
+#elif defined(__GNUC__) && __GNUC__ >= 4
#define UHD_EXPORT __attribute__((visibility("default")))
#define UHD_IMPORT __attribute__((visibility("default")))
#define UHD_INLINE inline __attribute__((always_inline))
diff --git a/host/include/uhd/usrp/usrp.h b/host/include/uhd/usrp/usrp.h
index 651279e22..f24d12b85 100644
--- a/host/include/uhd/usrp/usrp.h
+++ b/host/include/uhd/usrp/usrp.h
@@ -1,5 +1,5 @@
//
-// Copyright 2015 Ettus Research LLC
+// Copyright 2015-2016 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -726,6 +726,83 @@ UHD_API uhd_error uhd_usrp_get_fe_rx_freq_range(
uhd_meta_range_handle freq_range_out
);
+//! A wildcard for all LO names
+UHD_UNUSED(static const char* UHD_USRP_ALL_LOS) = "all";
+
+//! Get a list of possible LO stage names
+/*
+ * See uhd::usrp::multi_usrp::get_rx_lo_names() for more details.
+ */
+UHD_API uhd_error uhd_usrp_get_rx_lo_names(
+ uhd_usrp_handle h,
+ size_t chan,
+ uhd_string_vector_handle *rx_lo_names_out
+);
+
+//! Set the LO source for the USRP device
+/*
+ * See uhd::usrp::multi_usrp::set_rx_lo_source() for more details.
+ */
+UHD_API uhd_error uhd_usrp_set_rx_lo_source(
+ uhd_usrp_handle h,
+ const char* src,
+ const char* name,
+ size_t chan
+);
+
+//! Get the currently set LO source
+UHD_API uhd_error uhd_usrp_get_rx_lo_source(
+ uhd_usrp_handle h,
+ const char* name,
+ size_t chan,
+ char* rx_lo_source_out,
+ size_t strbuffer_len
+);
+
+//! Get a list of possible LO sources
+UHD_API uhd_error uhd_usrp_get_rx_lo_sources(
+ uhd_usrp_handle h,
+ const char* name,
+ size_t chan,
+ uhd_string_vector_handle *rx_lo_sources_out
+);
+
+//! Set whether the LO used by the USRP device is exported
+/*
+ * See uhd::usrp::multi_usrp::set_rx_lo_enabled() for more details.
+ */
+UHD_API uhd_error uhd_usrp_set_rx_lo_export_enabled(
+ uhd_usrp_handle h,
+ bool enabled,
+ const char* name,
+ size_t chan
+);
+
+//! Returns true if the currently selected LO is being exported.
+UHD_API uhd_error uhd_usrp_get_rx_lo_export_enabled(
+ uhd_usrp_handle h,
+ const char* name,
+ size_t chan,
+ bool* result_out
+);
+
+//! Set the RX LO frequency.
+UHD_API uhd_error uhd_usrp_set_rx_lo_freq(
+ uhd_usrp_handle h,
+ double freq,
+ const char* name,
+ size_t chan,
+ double* coerced_freq_out
+);
+
+//! Get the current RX LO frequency.
+UHD_API uhd_error uhd_usrp_get_rx_lo_freq(
+ uhd_usrp_handle h,
+ const char* name,
+ size_t chan,
+ double* rx_lo_freq_out
+);
+
//! Set the RX gain for the given channel and name
UHD_API uhd_error uhd_usrp_set_rx_gain(
uhd_usrp_handle h,