-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ionut.Muthi
committed
Mar 28, 2023
1 parent
6dbddb1
commit 5c4d726
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|