-
-
Save tfcollins/ef70c1ad6fc5c7a05b13acebb6f3cfa8 to your computer and use it in GitHub Desktop.
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
classdef (Abstract) Tx < adi.common.RxTx & adi.common.DDS | |
% Tx: Common shared functions between transmitter classes | |
methods (Hidden, Access = protected) | |
function stepImpl(obj,varargin) | |
if strcmp(obj.DataSource,'DMA') | |
% Interleave channels include I and Q | |
c = obj.channelCount; | |
outputData = complex(zeros(length(varargin{1}), c)); | |
index = 1; | |
for k = 1:c | |
if fix(k/2)==k/2 | |
data = varargin{index}; | |
outputData(:,k) = imag(int16(data).'); | |
index = index + 1; | |
else | |
data = varargin{index}; | |
outputData(:,k) = real(int16(data).'); | |
end | |
end | |
outputData = reshape(outputData.',numel(outputData),1); | |
sendData(obj,outputData); | |
else | |
obj.DDSUpdate(); | |
end | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment