This file is indexed.

/usr/share/psychtoolbox-3/PsychHardware/PR670Toolbox/PR670write.m is in psychtoolbox-3-common 3.0.11.20140816.dfsg1-1.

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
29
30
31
32
33
34
35
36
function PR670write(cmdStr, appendCR)
% PR670write - Write a string of characters to the PR-670.
%
% Syntax:
% PR670write(cmdStr)
% PR670write(cmdStr, appendCR)
%
% Description:
% Writes a string of characters to the PR-670.  By default, it appends a
% carriage return (CR) to the end of the string.  Note that if the CR is
% already there, it won't be appended. The CR can be disabled as
% some commands do not need it.  See the PR-670 documentation for which
% command need the CR.
%
% Input:
% cmdStr (1xN char) - String of characters to send.
% appendCR (scalar) - 1 to append a CR, 0 to not append.  Default: 1

global g_serialPort;

if nargin == 1
	appendCR = 1;
end

if appendCR
	% Check for the CR and add if necessary.
	if cmdStr(end) ~= char(13)
		cmdStr = [cmdStr char(13)];
	end
end

% Write sequence of chars to PR-670.
for i = 1:length(cmdStr)
    IOPort('write', g_serialPort, upper(cmdStr(i)));
    pause(0.05)
end