File: PsychHIDKbQueueStop.c

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 (52 lines) | stat: -rw-r--r-- 1,363 bytes parent folder | download | duplicates (5)
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
/*
	PsychtoolboxGL/Source/Common/PsychHID/PsychHIDKbQueueStop.c		
  
	PROJECTS: 
	
		PsychHID only.
  
	PLATFORMS:  
	
		All.  
  
	AUTHORS:
	
		rwoods@ucla.edu		rpw 
        mario.kleiner@tuebingen.mpg.de      mk
      
	HISTORY:
		8/19/07  rpw		Created.
		8/23/07  rpw        Added PsychHIDQueueFlush to documentation; removed call to PsychHIDVerifyInit()
  
	NOTES:
	
*/

#include "PsychHID.h"

static char useString[]= "PsychHID('KbQueueStop' [, deviceIndex])";
static char synopsisString[] = 
		"Stops input event collection by a queue.\n"
        "PsychHID('KbQueueCreate') must be called before calling this function.\n"
        "The optional 'deviceIndex' is the index of the HID input device whose queue should be stopped. "
        "If omitted, the queue of the default device will be stopped.\n";

static char seeAlsoString[] = "KbQueueCreate, KbQueueStart, KbQueueCheck, KbQueueFlush, KbQueueRelease";
 
PsychError PSYCHHIDKbQueueStop(void) 
{
    int deviceIndex;
    
    PsychPushHelp(useString, synopsisString, seeAlsoString);
    if(PsychIsGiveHelp()){PsychGiveHelp();return(PsychError_none);};

    PsychErrorExit(PsychCapNumOutputArgs(0));
    PsychErrorExit(PsychCapNumInputArgs(1));

    deviceIndex = -1;
    PsychCopyInIntegerArg(1, kPsychArgOptional, &deviceIndex);

    PsychHIDOSKbQueueStop(deviceIndex);

    return(PsychError_none);
}