📄 run.m
字号:
function dummy = run(cc,runopt,timeout)
%RUN initiate execution of target DSP
% RUN(CC,OPTION,TIMEOUT) initiates execution of the target DSP
% processor from the present program counter(PC) location.
% After starting execution of the DSP, the OPTION parameter
% will determine when control is returned to the user.
%
% OPTION parameter defines the action of the RUN method.
% 'run' (default) - executes a run and waits to confirm
% that the DSP is running, then immediately returns.
% 'runtohalt' - executes a run but then waits until the DSP
% processor has halted. The halt can be caused by a
% breakpoint, or direct interaction with Code Composer
% Studio(tm), or finally by a normal program exit.
% 'tohalt' - This option will wait for the DSP processor to
% complete execution to halt. Unlike the two options
% this selection does not directly modify the action
% of the processor, but simply waits it's state to change.
% The halt can be caused by a breakpoint, or direct
% interaction with Code Composer Studio(tm), or finally
% by a normal program exit.
%
% TIMEOUT defines an upper limit (in seconds) on the period this
% routine will wait for completion of the specified action.
% If this period is exceeded, the routine will immediately return
% with a timeout error. In general, the 'run' and 'runtohalt'
% options will cause the processor to initiate execution, even
% when a timeout is reached. The timeout simply indicates the
% confirmation was not received before the timeout period expired.
% RUN(CC,OPTION) same as above, except the default timeout is
% replaced by the default timeout provided by the DSP handle.
%
% RUN(CC) same as above, except the option defaults to the 'run'
% option. This causes an immediate return of control after the
% target is running.
%
% See also HALT, RESTART, ANIMATE, ISRUNNING.
% Copyright 2001-2002 The MathWorks, Inc.
% $Revision: 1.17 $ $Date: 2002/06/12 15:30:29 $
error(nargchk(1,3,nargin));
% Parse timeout
if( nargin >= 3) & (~isempty(timeout)),
if ~isnumeric(timeout) | length(timeout) ~= 1,
error('TIMEOUT parameter must be a single numeric value.');
end
dtimeout = double(timeout);
else
dtimeout = double(get(cc,'timeout'));
end
if( dtimeout < 0)
error(['Negative TIMEOUT value "' num2str(dtimeout) '" not permitted.']);
end
if nargin == 1,
ccsmexswitchyard([14,cc.boardnum,cc.procnum,dtimeout,cc.eventwaitms]);
else
ccsmexswitchyard([14,cc.boardnum,cc.procnum,dtimeout,cc.eventwaitms],runopt);
end
% [EOF] run.m
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -