function [neg_on_err] = pb_set_amp(amp, addr)
% FUNCTION NAME:
%   pb_set_amp
%
% DESCRIPTION:
%   Set the value of one of the amplitude registers.
%
% INPUTS:
%   amp - Amplitude value. 0.0-1.0
%   addr - Address of register to write to
%
% 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_set_amp', amp, addr);

end