restart.m
来自「这是一个关于MATLAB的函数」· M 代码 · 共 43 行
M
43 行
function dummy = restart(cc,timeout)
%RESTART Restores the DSP target to the program entry point.
% RESTART(CC,TIMEOUT) immediately halts the DSP processor
% and sets the program counter(PC) to the program entry point.
% The CC.RESTART method does not initiate program execution after
% the halt. Use CC.RUN to execute the DSP processor after a
% restart.
%
% 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, this method will cause the
% processor to initiate a restart, even when a timeout is reached
% The timeout simply indicates the confirmation was not received
% before the timeout period expired.
%
% RESTART(CC) Same as above, except the default timeout from the
% CC object is applied.
%
% See also HALT, RUN, ISRUNNING.
% Copyright 2001-2002 The MathWorks, Inc.
% $Revision: 1.11 $ $Date: 2002/06/12 15:30:30 $
error(nargchk(1,2,nargin));
% Parse timeout
if( nargin >= 2) & (~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
ccsmexswitchyard([17,cc.boardnum,cc.procnum,dtimeout,cc.eventwaitms]);
% [EOF] restart.m
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?