function [neg_on_err] = pb_reset()
% FUNCTION NAME:
%   pb_reset
%
% DESCRIPTION: 
%   Stops the output of board and resets the PulseBlaster Core.
%   Analog output will return to ground, and TTL outputs will either remain in
%   the same state they were in when the reset command was received or return 
%   to ground. This also resets the PulseBlaster Core so that the board can be
%   run again using pb_start() or a hardware trigger. Note: Either pb_reset()
%   or pb_stop() must be called before pb_start() if the pulse program is to be
%   run from the beginning (as opposed to continuing from a WAIT state).
%
% INPUT:
%
% OUTPUT:
%   neg_on_err - A negative number is returned on failure, and spinerr is set
%                to a description of the error. 0 is returned on success. 
%
% $Revision: R2017a$ 
% $Author: SpinCore Technologies, Inc.$
% $Date: November 17, 2023$
% ------------------------------------------------------------------------------

global SPINAPI_DLL_NAME;

neg_on_err = calllib(SPINAPI_DLL_NAME, 'pb_reset');

end