/usr/share/psychtoolbox-3/PsychHardware/Daq/DaqSetTrigger.m is in psychtoolbox-3-common 3.0.11.20131230.dfsg1-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | function err=DaqSetTrigger(daq,rising)
% err=DaqSetTrigger(DeviceIndex,rising)
% USB-1208FS: Configure the external trigger. This function configures the
% external trigger for analog input. The trigger may be configured to
% respond to either a logic rising edge ("rising"=1) or falling edge input
% ("rising"=0). Once the trigger is received, the analog input will proceed
% as configured. options.trigger must be 1 in the DaqAInScan command
% to utilize this feature.
% "DeviceIndex" is a small integer, the array index specifying which HID
% device in the array returned by PsychHID('Devices') is interface
% 0 of the desired USB-1208FS box.
% "rising" selects the desired edge type (0 = falling, 1 = rising) for the
% external trigger.
% See also Daq, DaqFunctions, DaqPins, DaqTest, PsychHIDTest.
% 4/15/05 dgp Wrote it.
% 1/11/08 mpr swept through attempting to improve consistency across daq
% functions
if ~ismember(rising,0:1)
error('"rising" must be 0 or 1.');
end
err=PsychHID('SetReport',daq,2,66,uint8([66 rising])); % SetTrigger
if err.n
fprintf('SetTrigger error 0x%s. %s: %s\n',hexstr(err.n),err.name,err.description);
end
return;
|