File: DaqWriteSerialNumber.m

package info (click to toggle)
psychtoolbox-3 3.0.19.14.dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 86,796 kB
  • sloc: ansic: 176,245; cpp: 20,103; objc: 5,393; sh: 2,753; python: 1,397; php: 384; makefile: 193; java: 113
file content (21 lines) | stat: -rw-r--r-- 897 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function err=DaqWriteSerialNumber(daq,serialstring)
% err=DaqWriteSerialNumber(DeviceIndex,serialstring)
% USB-1208FS: Write a new serial number (an 8-character string) to the
% device. The serial number consists of 8 bytes, typically ASCII numeric or
% hexadecimal digits (i.e. '00000001'.)  The new serial number will be
% programmed but not used until hardware reset. As far as I know, the only
% use of the serial number is to distinguish multiple USB-1208FS devices
% attached to the same computer.
% See also DaqWriteCode, Daq, DaqTest, PsychHIDTest.

% 4/15/05 dgp Wrote it.
% 1/11/08 mpr swept through attempting to improve consistency across daq
%               functions

report=uint8([83 serialstring]);
err=PsychHID('SetReport',daq,2,83,report); % WriteSerialNumber
if err.n
    fprintf('DaqWriteSerialNumber error 0x%s. %s: %s\n',hexstr(err.n),err.name,err.description);
end

return;