Skip to content

Commit

Permalink
try setting sample rate in the device class
Browse files Browse the repository at this point in the history
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
  • Loading branch information
threexc committed Feb 5, 2025
1 parent 15055e3 commit c86aac5
Show file tree
Hide file tree
Showing 16 changed files with 1,095 additions and 0 deletions.
15 changes: 15 additions & 0 deletions +adi/+AD4000/Rx.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
channel_names = {'voltage0'}
end

properties (Nontunable)
% SampleRate Sample Rate
% Baseband sampling rate in Hz, specified as a scalar
% in samples per second.
SampleRate = '1000000'
end

methods
%% Constructor
function obj = Rx(varargin)
Expand All @@ -23,5 +30,13 @@
obj.EnabledChannels = 1;
obj.BufferTypeConversionEnable = true;
end

% Set SampleRate
function set.SampleRate(obj, value)
obj.SampleRate = value;
if obj.ConnectedToDevice
obj.setAttributeRAW('voltage0', 'sampling_frequency', num2str(value), false);
end
end
end
end
15 changes: 15 additions & 0 deletions +adi/+AD4001/Rx.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
channel_names = {'voltage0-voltage1'}
end

properties (Nontunable)
% SampleRate Sample Rate
% Baseband sampling rate in Hz, specified as a scalar
% in samples per second.
SampleRate = '1000000'
end

methods
%% Constructor
function obj = Rx(varargin)
Expand All @@ -23,5 +30,13 @@
obj.EnabledChannels = 1;
obj.BufferTypeConversionEnable = true;
end

% Set SampleRate
function set.SampleRate(obj, value)
obj.SampleRate = value;
if obj.ConnectedToDevice
obj.setAttributeRAW('voltage0-voltage1', 'sampling_frequency', num2str(value), false);
end
end
end
end
15 changes: 15 additions & 0 deletions +adi/+AD4002/Rx.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
channel_names = {'voltage0'}
end

properties (Nontunable)
% SampleRate Sample Rate
% Baseband sampling rate in Hz, specified as a scalar
% in samples per second.
SampleRate = '1000000'
end

methods
%% Constructor
function obj = Rx(varargin)
Expand All @@ -23,5 +30,13 @@
obj.EnabledChannels = 1;
obj.BufferTypeConversionEnable = true;
end

% Set SampleRate
function set.SampleRate(obj, value)
obj.SampleRate = value;
if obj.ConnectedToDevice
obj.setAttributeRAW('voltage0', 'sampling_frequency', num2str(value), false);
end
end
end
end
15 changes: 15 additions & 0 deletions +adi/+AD4003/Rx.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
channel_names = {'voltage0-voltage1'}
end

properties (Nontunable)
% SampleRate Sample Rate
% Baseband sampling rate in Hz, specified as a scalar
% in samples per second.
SampleRate = '1000000'
end

methods
%% Constructor
function obj = Rx(varargin)
Expand All @@ -23,5 +30,13 @@
obj.EnabledChannels = 1;
obj.BufferTypeConversionEnable = true;
end

% Set SampleRate
function set.SampleRate(obj, value)
obj.SampleRate = value;
if obj.ConnectedToDevice
obj.setAttributeRAW('voltage0-voltage1', 'sampling_frequency', num2str(value), false);
end
end
end
end
15 changes: 15 additions & 0 deletions +adi/+AD4004/Rx.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
channel_names = {'voltage0'}
end

properties (Nontunable)
% SampleRate Sample Rate
% Baseband sampling rate in Hz, specified as a scalar
% in samples per second.
SampleRate = '1000000'
end

methods
%% Constructor
function obj = Rx(varargin)
Expand All @@ -23,5 +30,13 @@
obj.EnabledChannels = 1;
obj.BufferTypeConversionEnable = true;
end

% Set SampleRate
function set.SampleRate(obj, value)
obj.SampleRate = value;
if obj.ConnectedToDevice
obj.setAttributeRAW('voltage0', 'sampling_frequency', num2str(value), false);
end
end
end
end
15 changes: 15 additions & 0 deletions +adi/+AD4005/Rx.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
channel_names = {'voltage0-voltage1'}
end

properties (Nontunable)
% SampleRate Sample Rate
% Baseband sampling rate in Hz, specified as a scalar
% in samples per second.
SampleRate = '1000000'
end

methods
%% Constructor
function obj = Rx(varargin)
Expand All @@ -23,5 +30,13 @@
obj.EnabledChannels = 1;
obj.BufferTypeConversionEnable = true;
end

% Set SampleRate
function set.SampleRate(obj, value)
obj.SampleRate = value;
if obj.ConnectedToDevice
obj.setAttributeRAW('voltage0-voltage1', 'sampling_frequency', num2str(value), false);
end
end
end
end
15 changes: 15 additions & 0 deletions +adi/+AD4006/Rx.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
channel_names = {'voltage0'}
end

properties (Nontunable)
% SampleRate Sample Rate
% Baseband sampling rate in Hz, specified as a scalar
% in samples per second.
SampleRate = '1000000'
end

methods
%% Constructor
function obj = Rx(varargin)
Expand All @@ -23,5 +30,13 @@
obj.EnabledChannels = 1;
obj.BufferTypeConversionEnable = true;
end

% Set SampleRate
function set.SampleRate(obj, value)
obj.SampleRate = value;
if obj.ConnectedToDevice
obj.setAttributeRAW('voltage0', 'sampling_frequency', num2str(value), false);
end
end
end
end
15 changes: 15 additions & 0 deletions +adi/+AD4007/Rx.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
channel_names = {'voltage0-voltage1'}
end

properties (Nontunable)
% SampleRate Sample Rate
% Baseband sampling rate in Hz, specified as a scalar
% in samples per second.
SampleRate = '1000000'
end

methods
%% Constructor
function obj = Rx(varargin)
Expand All @@ -23,5 +30,13 @@
obj.EnabledChannels = 1;
obj.BufferTypeConversionEnable = true;
end

% Set SampleRate
function set.SampleRate(obj, value)
obj.SampleRate = value;
if obj.ConnectedToDevice
obj.setAttributeRAW('voltage0-voltage1', 'sampling_frequency', num2str(value), false);
end
end
end
end
15 changes: 15 additions & 0 deletions +adi/+AD4008/Rx.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
channel_names = {'voltage0'}
end

properties (Nontunable)
% SampleRate Sample Rate
% Baseband sampling rate in Hz, specified as a scalar
% in samples per second.
SampleRate = '1000000'
end

methods
%% Constructor
function obj = Rx(varargin)
Expand All @@ -23,5 +30,13 @@
obj.EnabledChannels = 1;
obj.BufferTypeConversionEnable = true;
end

% Set SampleRate
function set.SampleRate(obj, value)
obj.SampleRate = value;
if obj.ConnectedToDevice
obj.setAttributeRAW('voltage0', 'sampling_frequency', num2str(value), false);
end
end
end
end
15 changes: 15 additions & 0 deletions +adi/+AD4010/Rx.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
channel_names = {'voltage0'}
end

properties (Nontunable)
% SampleRate Sample Rate
% Baseband sampling rate in Hz, specified as a scalar
% in samples per second.
SampleRate = '1000000'
end

methods
%% Constructor
function obj = Rx(varargin)
Expand All @@ -23,5 +30,13 @@
obj.EnabledChannels = 1;
obj.BufferTypeConversionEnable = true;
end

% Set SampleRate
function set.SampleRate(obj, value)
obj.SampleRate = value;
if obj.ConnectedToDevice
obj.setAttributeRAW('voltage0', 'sampling_frequency', num2str(value), false);
end
end
end
end
15 changes: 15 additions & 0 deletions +adi/+AD4011/Rx.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
channel_names = {'voltage0-voltage1'}
end

properties (Nontunable)
% SampleRate Sample Rate
% Baseband sampling rate in Hz, specified as a scalar
% in samples per second.
SampleRate = '1000000'
end

methods
%% Constructor
function obj = Rx(varargin)
Expand All @@ -23,5 +30,13 @@
obj.EnabledChannels = 1;
obj.BufferTypeConversionEnable = true;
end

% Set SampleRate
function set.SampleRate(obj, value)
obj.SampleRate = value;
if obj.ConnectedToDevice
obj.setAttributeRAW('voltage0-voltage1', 'sampling_frequency', num2str(value), false);
end
end
end
end
Loading

0 comments on commit c86aac5

Please sign in to comment.