Skip to content

Commit

Permalink
adi:ad405x: Add documentation
Browse files Browse the repository at this point in the history
1. Add documentation for AD405x

Signed-off-by: RibhuDP <ribhu.daspurkayastha@analog.com>
  • Loading branch information
ribdp committed May 20, 2024
1 parent 5e547f2 commit 47c4cf3
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 22 deletions.
42 changes: 21 additions & 21 deletions +adi/+AD405x/Base.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
% Baseband sampling rate in Hz, specified as a scalar
% in samples per second.
SampleRate = '62500'

% SamplesPerFrame Samples Per Frame
% Number of samples per frame, specified as an even positive
% integer.
SamplesPerFrame = 400

% BurstAveragingLength Burst Averaging Length
% BurstAveragingLength Burst Averaging Length
% Length of the averaging filter in 'burst averaging mode'
AvgFilterLength = 2

% BurstSampleRate Burst Sample Rate
% BurstSampleRate Burst Sample Rate
% Rate of internal averaging in 'burst averaging mode'
BurstSampleRate = "2msps"

Expand Down Expand Up @@ -78,27 +78,27 @@

release(obj)

end
function set.AvgFilterLength(obj, value)
end
function set.AvgFilterLength(obj, value)
% Setter method for the Averaging Filter Length attribute
obj.AvgFilterLength = value;
if obj.ConnectedToDevice
val = obj.setDeviceAttributeRAW('avg_filter_length', num2str(value));
end

end
obj.AvgFilterLength = value;
if obj.ConnectedToDevice
val = obj.setDeviceAttributeRAW('avg_filter_length', num2str(value));
end

function set.BurstSampleRate(obj, value)
end

function set.BurstSampleRate(obj, value)
% Setter method for the Burst Sampple Rate attribute
obj.BurstSampleRate = value;
if obj.ConnectedToDevice
val = obj.setDeviceAttributeRAW('burst_sample_rate', num2str(value));
end
obj.BurstSampleRate = value;
if obj.ConnectedToDevice
val = obj.setDeviceAttributeRAW('burst_sample_rate', num2str(value));
end

end
end

end
end

%% API Functions
methods (Hidden, Access = protected)
Expand Down
3 changes: 2 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ADI maintains a set of tools to interface with ADI precision converters within M
The following have device-specific implementations in MATLAB and Simulink. In general, if a device has an IIO driver, MATLAB support is possible, but a device-specific MATLAB or Simulink interface may not exist yet.

.. csv-table:: Supported Parts
:header: "Evaluation Card", "FPGA Board", "Streaming Support", "Targeting", "Variants and Minimum Supported Release"
:header: "Evaluation Card", "Controller Board", "Streaming Support", "Targeting", "Variants and Minimum Supported Release"
:widths: 30, 30, 30, 30, 30

"AD7380", "Zedboard", "Yes", "No", "ADI (2021b)"
Expand Down Expand Up @@ -57,4 +57,5 @@ The following have device-specific implementations in MATLAB and Simulink. In ge
"AD5791", "Zedboard", "Yes", "No", "ADI (2021b)"
"AD7124-4", "Zedboard", "Yes", "No", "ADI (2021b)"
"AD7124-8", "Zedboard", "Yes", "No", "ADI (2021b)"
"AD4052", "SDP-K1", "Yes", "No", "ADI (2021b)"

35 changes: 35 additions & 0 deletions docs/source/reference_api/AD4052_Rx.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
adi.AD4052.Rx
-------------

**AD4052 Precision ADC Class**

adi.AD4052.Rx Receive data from the AD4052 ADC
The adi.AD4052.Rx System object is a signal source that can receive
data from the AD4052.

`rx = adi.AD4052.Rx;`
`rx = adi.AD4052.Rx('uri','serial:COM5,230400');`

`AD4052 Datasheet <http://www.analog.com/media/en/technical-documentation/data-sheets/AD4052.pdf>`_

Class Properties
================

**BurstAveragingLength Burst Averaging Length**
Length of the averaging filter in 'burst averaging mode'Help for adi.AD4052.Rx/AvgFilterLength is inherited from superclass adi.AD405x.Base

**BurstSampleRate Burst Sample Rate**
Rate of internal averaging in 'burst averaging mode'Help for adi.AD4052.Rx/BurstSampleRate is inherited from superclass adi.AD405x.Base

**EnabledChannels Enabled Channels**
Indexs of channels to be enabled. Input should be a [1xN] vector with the indexes of channels to be enabled. Order is irrelevant

**SampleRate Sample Rate**
Baseband sampling rate in Hz, specified as a scalar in samples per second.Help for adi.AD4052.Rx/SampleRate is inherited from superclass adi.AD405x.Base

**SamplesPerFrame Samples Per Frame**
Number of samples per frame, specified as an even positive integer.Help for adi.AD4052.Rx/SamplesPerFrame is inherited from superclass adi.AD405x.Base

**URI - remote host URI**
Hostname or IP address of remote libIIO deviceHelp for adi.AD4052.Rx/uri is inherited from superclass matlabshared.libiio.base

1 change: 1 addition & 0 deletions docs/source/reference_api/gen_sysobj_doc.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
, {'AD5791', {'Tx'}}...
, {'AD7124_4', {'Rx'}}...
, {'AD7124_8', {'Rx'}}...
, {'AD4052', {'Rx'}}...
};

all_devs = [];
Expand Down
37 changes: 37 additions & 0 deletions docs/source/reference_api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Reference APIs
--------------

.. toctree::
:maxdepth: 1
:caption: Driver Classes:

AD7380_Rx.rst
AD7768_Rx.rst
AD7768_1_Rx.rst
AD4030_Rx.rst
AD4630_16_Rx.rst
AD4630_24_Rx.rst
AD4858_Rx.rst
AD2S1210_Rx.rst
AD4000_Rx.rst
AD4001_Rx.rst
AD4002_Rx.rst
AD4003_Rx.rst
AD4004_Rx.rst
AD4005_Rx.rst
AD4006_Rx.rst
AD4007_Rx.rst
AD4008_Rx.rst
AD4010_Rx.rst
AD4011_Rx.rst
AD4020_Rx.rst
AD4021_Rx.rst
AD4022_Rx.rst
AD5760_Tx.rst
AD5780_Tx.rst
AD5781_Tx.rst
AD5790_Tx.rst
AD5791_Tx.rst
AD7124_4_Rx.rst
AD7124_8_Rx.rst
AD4052_Rx.rst

0 comments on commit 47c4cf3

Please sign in to comment.