head 1.2; access; symbols netbsd-7-2-RELEASE:1.1.1.3 netbsd-7-1-2-RELEASE:1.1.1.3 netbsd-7-1-1-RELEASE:1.1.1.3 netbsd-7-1:1.1.1.3.0.14 netbsd-7-1-RELEASE:1.1.1.3 netbsd-7-1-RC2:1.1.1.3 netbsd-7-1-RC1:1.1.1.3 netbsd-7-0-2-RELEASE:1.1.1.3 netbsd-7-0-1-RELEASE:1.1.1.3 netbsd-7-0:1.1.1.3.0.12 netbsd-7-0-RELEASE:1.1.1.3 netbsd-7-0-RC3:1.1.1.3 netbsd-7-0-RC2:1.1.1.3 netbsd-7-0-RC1:1.1.1.3 netbsd-5-2-3-RELEASE:1.1.1.1 netbsd-5-1-5-RELEASE:1.1.1.1 netbsd-6-0-6-RELEASE:1.1.1.3 netbsd-6-1-5-RELEASE:1.1.1.3 netbsd-7:1.1.1.3.0.10 netbsd-7-base:1.1.1.3 netbsd-6-1-4-RELEASE:1.1.1.3 netbsd-6-0-5-RELEASE:1.1.1.3 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.3 riastradh-drm2:1.1.1.3.0.8 riastradh-drm2-base:1.1.1.3 netbsd-6-1-3-RELEASE:1.1.1.3 netbsd-6-0-4-RELEASE:1.1.1.3 netbsd-5-2-2-RELEASE:1.1.1.1 netbsd-5-1-4-RELEASE:1.1.1.1 netbsd-6-1-2-RELEASE:1.1.1.3 netbsd-6-0-3-RELEASE:1.1.1.3 netbsd-5-2-1-RELEASE:1.1.1.1 netbsd-5-1-3-RELEASE:1.1.1.1 netbsd-6-1-1-RELEASE:1.1.1.3 xorg-server-1-10-6:1.1.1.3 netbsd-6-1:1.1.1.3.0.6 netbsd-6-0-2-RELEASE:1.1.1.3 netbsd-6-1-RELEASE:1.1.1.3 netbsd-6-1-RC4:1.1.1.3 netbsd-6-1-RC3:1.1.1.3 netbsd-6-1-RC2:1.1.1.3 netbsd-6-1-RC1:1.1.1.3 netbsd-5-2:1.1.1.1.0.8 netbsd-6-0-1-RELEASE:1.1.1.3 netbsd-5-2-RELEASE:1.1.1.1 netbsd-5-2-RC1:1.1.1.1 netbsd-6-0:1.1.1.3.0.4 netbsd-6-0-RELEASE:1.1.1.3 netbsd-6-0-RC2:1.1.1.3 netbsd-6-0-RC1:1.1.1.3 netbsd-6:1.1.1.3.0.2 netbsd-6-base:1.1.1.3 netbsd-5-1-2-RELEASE:1.1.1.1 netbsd-5-1-1-RELEASE:1.1.1.1 xorg-server-1-10-3:1.1.1.3 mrg-xorg-server-1-9-5-pre-1-10-3:1.1.1.2 xorg-server-1-9-5:1.1.1.2 xorg-server-1-9-2:1.1.1.2 netbsd-5-1:1.1.1.1.0.6 netbsd-5-1-RELEASE:1.1.1.1 netbsd-5-1-RC4:1.1.1.1 netbsd-5-1-RC3:1.1.1.1 netbsd-5-1-RC2:1.1.1.1 netbsd-5-1-RC1:1.1.1.1 netbsd-5-0-2-RELEASE:1.1.1.1 xorg-server-1-6-5:1.1.1.1 xorg-server-1-6-3:1.1.1.1 netbsd-5-0-1-RELEASE:1.1.1.1 xorg-server-1-6-2:1.1.1.1 xorg-server-1-6-1-901:1.1.1.1 netbsd-5-0:1.1.1.1.0.4 netbsd-5-0-RELEASE:1.1.1.1 netbsd-5-0-RC4:1.1.1.1 netbsd-5-0-RC3:1.1.1.1 netbsd-5-0-RC2:1.1.1.1 netbsd-5-0-RC1:1.1.1.1 netbsd-5:1.1.1.1.0.2 netbsd-5-base:1.1.1.1 xorg-server-1-4-2:1.1.1.1 xorg:1.1.1; locks; strict; comment @# @; 1.2 date 2016.08.11.00.04.29; author mrg; state dead; branches; next 1.1; commitid FQxwnZNPy5ZgOOhz; 1.1 date 2008.07.31.19.50.32; author mrg; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2008.07.31.19.50.32; author mrg; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2010.11.23.05.21.25; author mrg; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2011.08.02.06.56.52; author mrg; state Exp; branches; next ; desc @@ 1.2 log @first merge of netbsd changes. not tested yet. @ text @
#include "usb-private.h"#include "usb-mouse.h"Functions | |
| void | mouUSBRead (DevicePtr pDev, MOTIONPROC motion, ENQUEUEPROC enqueue, CHECKPROC checkspecial, BLOCK block) |
| void | mouUSBInit (DevicePtr pDev) |
| int | mouUSBOn (DevicePtr pDev) |
| void | mouUSBGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info) |
|
||||||||||||
|
Fill the info structure with information needed to initialize pDev. |
|
|
Initialize pDev using usbInit. |
|
|
Turn pDev on (i.e., take input from pDev). |
|
||||||||||||||||||||||||
|
Read the USB device using usbRead. |
#include "usb-private.h"#include "usb-mouse.h"Defines | |
| #define | GETPRIV |
| #define | LOG0(f) dmxLog(dmxDebug,f) |
| #define | LOG1(f, a) dmxLog(dmxDebug,f,a) |
| #define | LOG2(f, a, b) dmxLog(dmxDebug,f,a,b) |
| #define | LOG3(f, a, b, c) dmxLog(dmxDebug,f,a,b,c) |
| #define | FATAL0(f) dmxLog(dmxFatal,f) |
| #define | FATAL1(f, a) dmxLog(dmxFatal,f,a) |
| #define | FATAL2(f, a, b) dmxLog(dmxFatal,f,a,b) |
| #define | MOTIONPROC dmxMotionProcPtr |
| #define | ENQUEUEPROC dmxEnqueueProcPtr |
| #define | CHECKPROC dmxCheckSpecialProcPtr |
| #define | BLOCK DMXBlockType |
Functions | |
| void | mouUSBRead (DevicePtr pDev, MOTIONPROC motion, ENQUEUEPROC enqueue, CHECKPROC checkspecial, BLOCK block) |
| void | mouUSBInit (DevicePtr pDev) |
| int | mouUSBOn (DevicePtr pDev) |
| static void | mouUSBGetMap (DevicePtr pDev, unsigned char *map, int *nButtons) |
| void | mouUSBGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info) |
This code implements a low-level device driver for a USB mouse.
| #define BLOCK DMXBlockType |
| #define CHECKPROC dmxCheckSpecialProcPtr |
| #define ENQUEUEPROC dmxEnqueueProcPtr |
| #define FATAL0 | ( | f | ) | dmxLog(dmxFatal,f) |
| #define FATAL1 | ( | f, | a38 1a39 4 | a |
| ) | dmxLog(dmxFatal,f,a) | a43 10
| #define FATAL2 | ( | f, | ||
| d46 2 a47 2 | a, | a48 14|||
| b | ||||
| ) | dmxLog(dmxFatal,f,a,b) |
| #define GETPRIV |
| #define LOG0 | ( | f | ) | dmxLog(dmxDebug,f) | d78 1 d80 26 a105 25
| #define LOG1 | ( | f, | ||
| a | ||||
| ) | dmxLog(dmxDebug,f,a) | a106 3
| #define LOG2 | ( | f, | |||||
| a, | |||||||
| b | |||||||
| ) | dmxLog(dmxDebug,f,a,b) |
| #define LOG3 | ( | f, | a134 1a135 5 | a, | ||
| d137 2 a138 2 | b, | a140 1a141 4 | c | |||
| ) | dmxLog(dmxDebug,f,a,b,c) | a145 10
| #define MOTIONPROC dmxMotionProcPtr |
| void mouUSBGetInfo | ( | DevicePtr | pDev, |
| a147 4 | DMXLocalInitInfoPtr | info | |
| ) | a151 13 |
Fill the info structure with information needed to initialize pDev.
References _DMXLocalInitInfo::buttonClass, _DMXLocalInitInfo::keyClass, _DMXLocalInitInfo::keySyms, _DMXLocalInitInfo::map, _DMXLocalInitInfo::maxres, _DMXLocalInitInfo::maxval, _DMXLocalInitInfo::minres, _DMXLocalInitInfo::minval, mouUSBGetMap(), _DMXLocalInitInfo::numButtons, _DMXLocalInitInfo::numRelAxes, _DMXLocalInitInfo::ptrFeedbackClass, _DMXLocalInitInfo::res, and _DMXLocalInitInfo::valuatorClass.
| static void mouUSBGetMap | ( | DevicePtr | pDev, | ||||
| a153 5 | unsigned char * | map, | |||||
| d155 2 a156 2 | int * | nButtons | d160 2 a161 2 | ) | [static] |
a162 5
Referenced by mouUSBGetInfo().
a163 14| void mouUSBInit | ( | DevicePtr | pDev | ) |
| int mouUSBOn | ( | DevicePtr | pDev | ) |
Turn pDev on (i.e., take input from pDev).
References mouUSBInit().