Skip to content

Commit 0fa060f

Browse files
author
Ionut.Muthi
committed
add streaming support for AD9172
1 parent 83ec62e commit 0fa060f

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

+adi/+AD9172/Tx.m

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
classdef Tx < adi.AD917x.Tx & adi.AD917x.Base
2+
% adi.AD9172.Tx Transmit data to the AD9172 high speed DAC
3+
%
4+
% tx = adi.AD9172.Tx;
5+
% tx = adi.AD9172.Tx('uri','192.168.2.1');
6+
%
7+
% <a href="http://www.analog.com/media/en/technical-documentation/data-sheets/ad9172.pdf">AD9172 Datasheet</a>
8+
%
9+
10+
properties (Nontunable, Hidden)
11+
devName = 'axi-ad9172-hpc';
12+
channel_names = {'voltage0_i','voltage0_q'};
13+
end
14+
15+
%% API Functions
16+
methods (Hidden, Access = protected)
17+
18+
function icon = getIconImpl(obj)
19+
icon = sprintf(['AD9172 ',obj.Type]);
20+
end
21+
end
22+
23+
24+
%% External Dependency Methods
25+
methods (Hidden, Static)
26+
function bName = getDescriptiveName(~)
27+
bName = 'AD9172';
28+
end
29+
30+
end
31+
end
32+

test/AD9172Test.m

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
classdef AD9172Test < matlab.unittest.TestCase
2+
properties
3+
uri = 'ip:analog.local';
4+
author = 'ADI';
5+
end
6+
7+
8+
methods(Test)
9+
function testAD9172Tx(testCase)
10+
tx = adi.AD9172.Tx('uri',testCase.uri);
11+
tx.EnableCyclicBuffers = true;
12+
x = linspace(-pi,pi,2^15).';
13+
14+
b1 = sin(x);
15+
tx(b1);
16+
tx.step(b1);
17+
end
18+
end
19+
20+
end
21+

0 commit comments

Comments
 (0)