This file is indexed.

/usr/share/psychtoolbox-3/PsychHardware/PR705Toolbox/PR705init.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
37
function response = PR705init(portString)
% PR705init - Initialize the serial port to talk to the PR-705.
%
% Syntax:
% retval = PR705init
% retval = PR705init(portString)
%
% Description:
% Initializes the serial port and establishes remote mode for the PR-705.
%
% Input:
% portString (1xN char) - Name of the serial port to use.
%
% Output:
% response (1xN char) - Character data returned from the PR-705.
%
% 11/29/12    zlb   Wrote it based on the PR670Toolbox. 

global g_serialPort g_useIOPort

if nargin == 0
    % Let FindSerialPort do its job
    portString = FindSerialPort('', g_useIOPort);
end

% Only open if we haven't already.
if isempty(g_serialPort)
    % IOPort has above port settings 9600 baud, no parity, 8 data bits,
    % 1 stopbit, no handshake (aka FlowControl=none) already as
    % built-in defaults, so no need to pass them:
    oldverbo = IOPort('Verbosity', 2);
    g_serialPort = IOPort('OpenSerialPort', portString, 'Lenient DontFlushOnWrite=1');
    IOPort('Verbosity', oldverbo);
end

PR705write('PR705');
response = PR705read(1, 16); % get the ' REMOTE MODE' response