File: DatapixxInfo.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 (55 lines) | stat: -rw-r--r-- 2,116 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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
function DatapixxInfo()
% DatapixxInfo()
%
% Print summary of all Datapixx systems.
% If the Datapixx is closed, it will be opened then closed by this function.
% If the Datapixx is already open, it will be left open by this function.
%
% History:
%
% Oct 1, 2009  paa     Written

AssertOpenGL;   % We use PTB-3

% Before touching API, report any global errors
libraryError = Datapixx('GetError');
if (libraryError)
    fprintf('Datapixx library error code = %d\n', libraryError);
end

datapixxWasOpen = Datapixx('IsReady');
if (datapixxWasOpen)
    fprintf('\nDatapixx device is open\n');
else
    fprintf('\nDatapixx device is not open\n');
    Datapixx('Open');
end

%Take a register snapshot
Datapixx('RegWrRd');

% Print some general system info
fprintf('Datapixx has %dMB of RAM\n', Datapixx('GetRamSize')/2^20);
fprintf('Datapixx firmware revision = %d\n', Datapixx('GetFirmwareRev'));
fprintf('Datapixx time = %g seconds\n', Datapixx('GetTime'));
fprintf('Datapixx marker = %g seconds\n', Datapixx('GetMarker'));
fprintf('Datapixx power supply is providing %4.2fV at %4.2fA\n', Datapixx('GetSupplyVoltage'), Datapixx('GetSupplyCurrent'));
if (Datapixx('Is5VFault'))
    fprintf('Datapixx is detecting a short circuit on Analog I/O or VESA 3D +5V pins\n');
end
fprintf('Datapixx internal temperature is %dC = %dF\n', Datapixx('GetTempCelcius'), Datapixx('GetTempFarenheit'));

% Print each of the subsystem status structures
fprintf('\nDatapixx DAC status:\n'); disp(Datapixx('GetDacStatus'));
fprintf('\nDatapixx ADC status:\n'); disp(Datapixx('GetAdcStatus'));
fprintf('\nDatapixx Digital Output status:\n'); disp(Datapixx('GetDoutStatus'));
fprintf('\nDatapixx Digital Input status:\n'); disp(Datapixx('GetDinStatus'));
fprintf('\nDatapixx Audio Output status:\n'); disp(Datapixx('GetAudioStatus'));
fprintf('\nDatapixx Audio Input status:\n'); disp(Datapixx('GetMicrophoneStatus'));
fprintf('\nDatapixx Video status:\n'); disp(Datapixx('GetVideoStatus'));

% Wrapup
if (~datapixxWasOpen)
    Datapixx('Close');
end
fprintf('\nReport complete\n\n');