diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2016-06-23 09:33:58 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-07-19 09:28:10 -0700 |
commit | 446e922d887e06c1fe8f61af36a277b38740d376 (patch) | |
tree | 7f953aa2e40e1810e36077b268ac511a8765b772 /host/lib/usrp | |
parent | b4412c79c026fef94affe8e7c9a1518ab4954183 (diff) | |
download | uhd-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/lib/usrp')
-rw-r--r-- | host/lib/usrp/usrp_c.cpp | 91 |
1 files changed, 90 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp_c.cpp b/host/lib/usrp/usrp_c.cpp index 69f2bd5e5..943f96db0 100644 --- a/host/lib/usrp/usrp_c.cpp +++ b/host/lib/usrp/usrp_c.cpp @@ -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 @@ -837,6 +837,95 @@ uhd_error uhd_usrp_get_fe_rx_freq_range( ) } +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 +){ + UHD_SAFE_C_SAVE_ERROR(h, + rx_lo_names_out->string_vector_cpp = USRP(h)->get_rx_lo_names(chan); + ) +} + +UHD_API uhd_error uhd_usrp_set_rx_lo_source( + uhd_usrp_handle h, + const char* src, + const char* name, + size_t chan +){ + UHD_SAFE_C_SAVE_ERROR(h, + USRP(h)->set_rx_lo_source(src, name, chan); + ) +} + +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 +){ + UHD_SAFE_C_SAVE_ERROR(h, + strncpy(rx_lo_source_out, USRP(h)->get_rx_lo_source(name, chan).c_str(), strbuffer_len); + ) +} + +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 +){ + UHD_SAFE_C_SAVE_ERROR(h, + rx_lo_sources_out->string_vector_cpp = USRP(h)->get_rx_lo_sources(name, chan); + ) +} + +UHD_API uhd_error uhd_usrp_set_rx_lo_export_enabled( + uhd_usrp_handle h, + bool enabled, + const char* name, + size_t chan +){ + UHD_SAFE_C_SAVE_ERROR(h, + USRP(h)->set_rx_lo_export_enabled(enabled, name, chan); + ) +} + +UHD_API uhd_error uhd_usrp_get_rx_lo_export_enabled( + uhd_usrp_handle h, + const char* name, + size_t chan, + bool* result_out +) { + UHD_SAFE_C_SAVE_ERROR(h, + *result_out = USRP(h)->get_rx_lo_export_enabled(name, chan); + ) +} + +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 +){ + UHD_SAFE_C_SAVE_ERROR(h, + *coerced_freq_out = USRP(h)->set_rx_lo_freq(freq, name, chan); + ) +} + +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 +){ + UHD_SAFE_C_SAVE_ERROR(h, + *rx_lo_freq_out = USRP(h)->get_rx_lo_freq(name, chan); + ) +} + uhd_error uhd_usrp_set_rx_gain( uhd_usrp_handle h, double gain, |