Skip to content

Commit

Permalink
add streaming support for AD9172
Browse files Browse the repository at this point in the history
  • Loading branch information
Ionut.Muthi committed Mar 28, 2023
1 parent 6dbddb1 commit 5c4d726
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
32 changes: 32 additions & 0 deletions +adi/+AD9172/Tx.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
classdef Tx < adi.AD917x.Tx & adi.AD917x.Base
% adi.AD9172.Tx Transmit data to the AD9172 high speed DAC
%
% tx = adi.AD9172.Tx;
% tx = adi.AD9172.Tx('uri','192.168.2.1');
%
% <a href="http://www.analog.com/media/en/technical-documentation/data-sheets/ad9172.pdf">AD9172 Datasheet</a>
%

properties (Nontunable, Hidden)
devName = 'axi-ad9172-hpc';
channel_names = {'voltage0_i','voltage0_q'};
end

%% API Functions
methods (Hidden, Access = protected)

function icon = getIconImpl(obj)
icon = sprintf(['AD9172 ',obj.Type]);
end
end


%% External Dependency Methods
methods (Hidden, Static)
function bName = getDescriptiveName(~)
bName = 'AD9172';
end

end
end

21 changes: 21 additions & 0 deletions test/AD9172Test.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
classdef AD9172Test < matlab.unittest.TestCase
properties
uri = 'ip:analog.local';
author = 'ADI';
end


methods(Test)
function testAD9172Tx(testCase)
tx = adi.AD9172.Tx('uri',testCase.uri);
tx.EnableCyclicBuffers = true;
x = linspace(-pi,pi,2^15).';

b1 = sin(x);
tx(b1);
tx.step(b1);
end
end

end

0 comments on commit 5c4d726

Please sign in to comment.