Docs @ Psychtoolbox Wiki : PsychHID

Search PTB Function help:
homepsychtoolbox.orgpage updateslogin

Revision [14370]

Last edited on 2011-10-24 16:52:39 by ZweiWolf [touch-up]
Additions:
% returnValues=PsychHID(subcommand, arg1 [,arg2] ...)
Deletions:
returnValues=PsychHID(subcommand, arg1 [,arg2] ...)


Revision [14369]

Edited on 2011-10-24 16:50:37 by ZweiWolf [Manually format and protect PsychHID page]
Additions:
>> ====Inside MATLAB: ====
Like Screen, PsychHID has built-in help. For a list of PsychHID
subcommands enter "PsychHID" at the MATLAB command line
%%(matlab)>> PsychHID%%
%%(matlab)>> PsychHID NumDevices?%%>>
=== HISTORY ===
=== PREREQUISITES ===
====Usage:====
''The {{color hex="#993333" text="red keywords"}} are links for per-function documentation!''
%%(matlab)
% Support for generic USB-HID devices:
devices=PsychHID('Devices' [, deviceClass])
[keyIsDown,secs,keyCode]=PsychHID('KbCheck' [, deviceNumber][, scanList])
[reports,err]=PsychHID('GiveMeReports',deviceNumber,[reportBytes])
err=PsychHID('ReceiveReports',deviceNumber[,options])
err=PsychHID('ReceiveReportsStop',deviceNumber)
% Queue based keyboard queries: See 'help KbQueueCreate' for explanations:
PsychHID('KbQueueCreate', [deviceNumber], [keyFlags])
PsychHID('KbQueueRelease' [, deviceIndex])
PsychHID('KbQueueFlush' [, deviceIndex])
PsychHID('KbQueueStart' [, deviceIndex])
PsychHID('KbQueueStop' [, deviceIndex])
[keyIsDown, firstKeyPressTimes, firstKeyReleaseTimes, lastKeyPressTimes, lastKeyReleaseTimes]=PsychHID('KbQueueCheck' [, deviceIndex])
secs=PsychHID('KbTriggerWait', KeysUsage, [deviceNumber])
% Support for access to generic USB devices: See 'help ColorCal2' for one usage example:
usbHandle = PsychHID('OpenUSBDevice', vendorID, deviceID)
PsychHID('CloseUSBDevice' [, usbHandle])
outData = PsychHID('USBControlTransfer', usbHandle, bmRequestType, bRequest, wValue, wIndex, wLength, inData)
%%
""<!--protected-->""
Deletions:
=== OSX, Linux, Windows with GNU/Octave or Matlab version R2007a and later: ===
HELP: Like [[Screen]], PsychHID has built-in help. For a list of PsychHID
subcommands enter "PsychHID" at the MATLAB command line:
"">>"" PsychHID
Usage:
devices=PsychHID('Devices')
[keyIsDown,secs,keyCode]=PsychHID('KbCheck',[deviceNumber])
"">>"" PsychHID NumDevices?
Usage:
numberOfDevices=PsychHID('NumDevices')
Return the the number of USB HID devices connected to your computer.


Revision [14288]

Edited on 2011-08-25 07:51:41 by DocBot [Manually format and protect PsychHID page]
Additions:
=== OSX, Linux, Windows with GNU/Octave or Matlab version R2007a and later: ===
PsychHID is a MEX file that communicates with any USB device that
MS-Windows and GNU/Linux: PsychHID uses the free/open-source libusb-1.0
library (http://libusb.org) as a backend for low-level device control.
libusb is licensed under LGPLv2+ license. PsychHID also uses the BSD
licensed HIDAPI library (http://www.signal11.us/oss/hidapi/) as backend
for USB-HID access.
On Linux and Windows, not all PsychHID subfunctions are implemented, as
certain functionality can be handled in a better or different way on
those systems. USB-HID low-level access, and USB low-level access is
implemented though.
MS-Windows: You must manually install the libusb-1.0.dll library on your
system to use PsychHID. A working version is contained in the
Psychtoolbox/PsychContributed folder. More recent versions may be
downloaded from the official project website:
http://libusb.org/wiki/windows_backend
PsychHID on OS/X links against Apples HID Utilities library. For information on
=== OS9 & Windows with Matlab versions older than R2007a ===
PsychHID does not exist in these Psychtoolboxes. The OS9 and
files specific to each input device.
Deletions:
=== OSX ===
PsychHID is a Matlab MEX file that communicates with any USB device that
PsychHID links against Apples HID Utilities library. For information on
=== OS9 & WIN ===
PsychHID does not exist in the OS9 and Win Psychtoolboxes. The OS9 and
files specific to each input device. The OSX Psychtoolbox accesses all
input devices through one mex file: PsychHID. USB in general and the
HID-class in particular are supported by Windows, and there is no
obstacle to writing a version of PsychHID for Windows, calling the
appropriate Windows API instead of the Mac OS X HID Manager. It's a
shame that the OSX and Win APIs are different given that the HID class,
and all of USB, is a platform-independent standard.


Revision [13048]

Edited on 2010-12-06 11:41:57 by DocBot [Manually format and protect PsychHID page]
Additions:
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychHardware/PsychHID.m">beta</a> | view WebSVN <a href=
"http://svn.berlios.de/wsvn/osxptb/trunk/Psychtoolbox/PsychHardware/PsychHID.m?op=log">changelog</a> of trunk branch</span>
Deletions:
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychHardware/PsychHID.m">beta</a> | view in <a href=
"http://svn.berlios.de/wsvn/osxptb/beta/Psychtoolbox/PsychHardware/PsychHID.m?view=markup">WebSVN with changelog</a></span>


Revision [11071]

Edited on 2010-09-09 15:57:57 by DocBot [Manually format and protect PsychHID page]
Additions:
"http://svn.berlios.de/wsvn/osxptb/beta/Psychtoolbox/PsychHardware/PsychHID.m?view=markup">WebSVN with changelog</a></span>
Deletions:
"http://svn.berlios.de/viewcvs/osxptb/beta/Psychtoolbox/PsychHardware/PsychHID.m?view=markup">WebSVN with changelog</a></span>


Revision [9745]

Edited on 2009-10-27 09:41:06 by DocBot [Manually format and protect PsychHID page]
Additions:
==[[Psychtoolbox]] › [[PsychHardware]]==
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychHardware/PsychHID.m">beta</a> | view in <a href=
"http://svn.berlios.de/viewcvs/osxptb/beta/Psychtoolbox/PsychHardware/PsychHID.m?view=markup">WebSVN with changelog</a></span>
<code>Psychtoolbox/PsychHardware/PsychHID.m</code>
Deletions:
==[[src]] › [[Matlab]] › [[toolbox]] › [[Psychtoolbox]] › [[PsychHardware]]==
"http://svn.berlios.de/svnroot/repos/osxptb/beta/src/Matlab/toolbox/Psychtoolbox/PsychHardware/PsychHID.m">beta</a> | view in <a href=
"http://svn.berlios.de/viewcvs/osxptb/beta/src/Matlab/toolbox/Psychtoolbox/PsychHardware/PsychHID.m?view=markup">WebSVN with changelog</a></span>
<code>src/Matlab/toolbox/Psychtoolbox/PsychHardware/PsychHID.m</code>


Revision [9698]

Edited on 2009-10-27 09:35:22 by DocBot [Manually format and protect PsychHID page]
Additions:
==[[src]] › [[Matlab]] › [[toolbox]] › [[Psychtoolbox]] › [[PsychHardware]]==
"http://svn.berlios.de/svnroot/repos/osxptb/beta/src/Matlab/toolbox/Psychtoolbox/PsychHardware/PsychHID.m">beta</a> | view in <a href=
"http://svn.berlios.de/viewcvs/osxptb/beta/src/Matlab/toolbox/Psychtoolbox/PsychHardware/PsychHID.m?view=markup">WebSVN with changelog</a></span>
<code>src/Matlab/toolbox/Psychtoolbox/PsychHardware/PsychHID.m</code>
Deletions:
==[[Psychtoolbox]] › [[PsychHardware]]==
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychHardware/PsychHID.m">beta</a> | view in <a href=
"http://svn.berlios.de/viewcvs/osxptb/beta/Psychtoolbox/PsychHardware/PsychHID.m?view=markup">WebSVN with changelog</a></span>
<code>Psychtoolbox/PsychHardware/PsychHID.m</code>


Revision [8038]

Edited on 2008-09-25 18:31:20 by DocBot [Manually format and protect PsychHID page]
Additions:
""
<div class="code_header" style="text-align:right;">
<span style="float:left;">Path  </span> <span class="counter">Retrieve current version of PsychHID.m from berliOS: <a href=
"http://svn.berlios.de/svnroot/repos/osxptb/beta/Psychtoolbox/PsychHardware/PsychHID.m">beta</a> | view in <a href=
"http://svn.berlios.de/viewcvs/osxptb/beta/Psychtoolbox/PsychHardware/PsychHID.m?view=markup">WebSVN with changelog</a></span>
</div>
<div class="code">
<code>Psychtoolbox/PsychHardware/PsychHID.m</code>
</div>
""
Deletions:
%%(php;Path)Psychtoolbox/PsychHardware/PsychHID.m%%


Revision [5605]

Edited on 2008-06-22 01:23:30 by DocBot [Manually format and protect PsychHID page]
Additions:
==[[Psychtoolbox]] › [[PsychHardware]]==
Deletions:
==[[Psychtoolbox]] › PsychHardware==


Revision [2887]

Edited on 2008-03-21 07:33:38 by DocBot [Manually format and protect PsychHID page]
Additions:
Usage:
%%(php;Path)Psychtoolbox/PsychHardware/PsychHID.m%%
Deletions:
=== Usage: ===


Revision [2662]

Edited on 2008-03-21 01:29:34 by DocBot [Manually format and protect PsychHID page]
Additions:
http://developer.apple.com/samplecode/HID_Utilities_Source/HID_Utilities_Source.html
http://developer.apple.com/samplecode/HID_Explorer/HID_Explorer.html
http://developer.apple.com/samplecode/Hardware/idxHumanInterfaceDeviceForceFeedback-date.html
web http://psychtoolbox.org/usb.html -browser;
Deletions:
http:""//""developer.apple.com/samplecode/HID_Utilities_Source/HID_Utilities_Source.html
http:""//""developer.apple.com/samplecode/HID_Explorer/HID_Explorer.html
http:""//""developer.apple.com/samplecode/Hardware/idxHumanInterfaceDeviceForceFeedback-date.html
web http:""//""psychtoolbox.org/usb.html -browser;


Revision [2661]

Edited on 2008-03-21 01:28:27 by DocBot [Manually format and protect PsychHID page]
Additions:
"">>"" PsychHID
"">>"" PsychHID NumDevices?
Deletions:
>> PsychHID
>> PsychHID NumDevices?


Revision [2660]

Edited on 2008-03-21 01:26:47 by DocBot [Manually format and protect PsychHID page]
Additions:
=== OS9 & WIN ===
Deletions:
OS9 & WIN: ______________________________________________________


Revision [2659]

Edited on 2008-03-21 01:23:22 by DocBot [Manually format and protect PsychHID page]
Additions:
===[[PsychHID]]===
==[[Psychtoolbox]] › PsychHardware==
=== OSX ===
HELP: Like [[Screen]], PsychHID has built-in help. For a list of PsychHID
=== Usage: ===
http:""//""developer.apple.com/samplecode/HID_Utilities_Source/HID_Utilities_Source.html
http:""//""developer.apple.com/samplecode/HID_Explorer/HID_Explorer.html
http:""//""developer.apple.com/samplecode/Hardware/idxHumanInterfaceDeviceForceFeedback-date.html
----
web http:""//""psychtoolbox.org/usb.html -browser;
Deletions:
===PsychHardware===

OSX: ___________________________________________________________________

HELP: Like Screen, PsychHID has built-in help. For a list of PsychHID
Usage:




http://developer.apple.com/samplecode/HID_Utilities_Source/HID_Utilities_Source.html
http://developer.apple.com/samplecode/HID_Explorer/HID_Explorer.html
http://developer.apple.com/samplecode/Hardware/idxHumanInterfaceDeviceForceFeedback-date.html


_________________________________________________________________________

web http://psychtoolbox.org/usb.html -browser;
PsychHardware


Revision [799]

The oldest known version of this page was created on 2008-03-15 10:30:45 by DocBot [Manually format and protect PsychHID page]
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.0275 seconds