Skip to content
Snippets Groups Projects
Commit b3ab5963 authored by Sergey Musikhin's avatar Sergey Musikhin
Browse files

set dac only if refclk=0

parent 52eedcb5
No related branches found
No related tags found
No related merge requests found
......@@ -175,7 +175,7 @@ templates:
+ ",fpga=" + str(${'$'}{fpga_image})
+ ",fpga-reload=" + '${'$'}{fpga_reload}'
+ ",power_monitoring=" + '${'$'}{power_monitoring}'
+ ",ref_clk=" + str(${'$'}{ref_clk})
+ ",ref_clk=" + str(int(${'$'}{ref_clk}))
+ ",in_clk=" + '${'$'}{in_clk}'
+ ",out_clk=" + str(${'$'}{out_clk})
+ ",dac=" + str(${'$'}{dac})
......
......@@ -259,6 +259,12 @@ void bladerf_common::init(dict_t const &dict, bladerf_direction direction)
{
init_refclk(freq);
}
else
{
if (dict.count("dac")) {
init_dac(boost::lexical_cast<uint16_t>(_get(dict, "dac")));
}
}
}
if (dict.count("in_clk")) {
......@@ -269,9 +275,7 @@ void bladerf_common::init(dict_t const &dict, bladerf_direction direction)
init_output_clock(_get(dict, "out_clk") == "True");
}
if (dict.count("dac")) {
init_dac(boost::lexical_cast<uint16_t>(_get(dict, "dac")));
}
/* Show some info about the device we've opened */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment