gusucode.com > target工具箱matlab源码程序 > target/extensions/processor/tic2000/utils/ti_c2000_callback.m

    function ti_c2000_callback(action,varargin)
% TI_C2000_CALLBACK - TI C2000 Target
%    dynamic dialog callback handler
%
% Copyright 2001-2010 The MathWorks, Inc.

s.action = action;
s.hSrc = varargin{1};
s.hDlg = varargin{2};

switch action
    case 'ActivateCallback',
        targetpref.convertR2006bModel;
    case 'SelectCallback',
        oldSystemTargetFile = getVal(s,'SystemTargetFile');
        if strcmp( oldSystemTargetFile, 'ti_c2000_grt.tlc'),
            newSystemTargetFile = linkfoundation.util.getSTFName('grt');
        elseif strcmp( oldSystemTargetFile, 'ti_c2000_ert.tlc'),
            newSystemTargetFile = linkfoundation.util.getSTFName('ert');
        end
        if ~exist('qeBypassBoardCheck', 'file'),
            uiwait(msgbox(['The ''' oldSystemTargetFile ''' system target file is supported only ' ...
                'for backward compatibility and will be removed in a future release. ' ...
                'You cannot generate code using this system target file. Select the ''' newSystemTargetFile ''' ' ...
                'system target file instead.'], 'Deprecated system target file', 'modal'));
        end
end

% --------------------------------------------------------------------
function val = getVal(s, propName)

val = slConfigUIGetVal(s.hDlg, s.hSrc, propName);

% --------------------------------------------------------------------
function setVal(s, propName, val)

slConfigUISetVal(s.hDlg, s.hSrc, propName, val);

% [EOF] ti_c2000_callback.m