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

x40/x115 sampling

parent 96e9234d
Branches
No related tags found
No related merge requests found
...@@ -131,6 +131,15 @@ parameters: ...@@ -131,6 +131,15 @@ parameters:
option_labels: ['Internal','External 1pps', 'External 10 MHz'] option_labels: ['Internal','External 1pps', 'External 10 MHz']
hide: part hide: part
- id: sampling
category: x40/x115
label: 'sampling'
dtype: enum
default: 'internal'
options: ['internal', 'external']
option_labels: ['Internal','External']
hide: part
- id: lpf_mode - id: lpf_mode
label: 'LPF mode' label: 'LPF mode'
category: x40/x115 category: x40/x115
...@@ -196,6 +205,7 @@ templates: ...@@ -196,6 +205,7 @@ templates:
+ ",dac=" + str(${'$'}{dac}) + ",dac=" + str(${'$'}{dac})
+ ",xb200=" + '${'$'}{xb200}' + ",xb200=" + '${'$'}{xb200}'
+ ",tamer=" + '${'$'}{tamer}' + ",tamer=" + '${'$'}{tamer}'
+ ",sampling=" + '${'$'}{sampling}'
+ ",lpf_mode="+'${'$'}{lpf_mode}' + ",lpf_mode="+'${'$'}{lpf_mode}'
+ ",trigger0="+'${'$'}{trigger0}' + ",trigger0="+'${'$'}{trigger0}'
+ ",trigger_role0="+'${'$'}{trigger_role0}' + ",trigger_role0="+'${'$'}{trigger_role0}'
......
...@@ -418,6 +418,16 @@ void bladerf_common::init_bladerf1(const dict_t &dict, bladerf_direction directi ...@@ -418,6 +418,16 @@ void bladerf_common::init_bladerf1(const dict_t &dict, bladerf_direction directi
if (dict.count("tamer")) { if (dict.count("tamer")) {
set_clock_source(_get(dict, "tamer")); set_clock_source(_get(dict, "tamer"));
} }
if (dict.count("sampling")) {
bladerf_sampling mode = _get(dict, "sampling") == "external" ?
BLADERF_SAMPLING_EXTERNAL: BLADERF_SAMPLING_INTERNAL;
auto status = bladerf_set_sampling(_dev.get(), mode);
if(status != 0)
{
BLADERF_THROW_STATUS(status, "Failed to set sampling");
}
}
bladerf_channel ch = (direction == BLADERF_RX) ? BLADERF_CHANNEL_RX(0) bladerf_channel ch = (direction == BLADERF_RX) ? BLADERF_CHANNEL_RX(0)
: BLADERF_CHANNEL_TX(0); : BLADERF_CHANNEL_TX(0);
if (dict.count("lpf_mode")) { if (dict.count("lpf_mode")) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment