- Main Page
- Data Structures
- Files

- File List
- Globals

Defines | Functions
usb-mouse.c File Reference
`#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)

## Detailed Description

This code implements a low-level device driver for a USB mouse.

## Define Documentation

#define BLOCK DMXBlockType

#define CHECKPROC dmxCheckSpecialProcPtr

#define ENQUEUEPROC dmxEnqueueProcPtr

#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 GETPRIV

Value:

    myPrivate *priv                            \
                          = ((DMXLocalInputInfoPtr)(pDev->devicePrivate))->private

Referenced by mouUSBOn().

#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 MOTIONPROC dmxMotionProcPtr

## Function Documentation

void mouUSBGetInfo | ( | DevicePtr | pDev,
|  | DMXLocalInitInfoPtr | info
| ) |  |

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,
|  | unsigned char * | map,
|  | int * | nButtons
| ) |  | `[static]`

Referenced by mouUSBGetInfo().

void mouUSBInit | ( | DevicePtr | pDev | ) |

Initialize pDev using usbInit.

References usbInit(), and usbMouse.

Referenced by mouUSBOn().

int mouUSBOn | ( | DevicePtr | pDev | ) |

Turn pDev on (i.e., take input from pDev).

References GETPRIV, and mouUSBInit().

void mouUSBRead | ( | DevicePtr | pDev,
|  | MOTIONPROC | motion,
|  | ENQUEUEPROC | enqueue,
|  | CHECKPROC | checkspecial,
|  | BLOCK | block
| ) |  |

Read the USB device using usbRead.

References usbRead().