usb-other.c File Reference

#include "usb-private.h"
#include "dmxinputinit.h"
#include "usb-other.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
#define test_bit(bit)   (priv->mask[(bit)/8] & (1 << ((bit)%8)))

Functions

void othUSBRead (DevicePtr pDev, MOTIONPROC motion, ENQUEUEPROC enqueue, CHECKPROC checkspecial, BLOCK block)
void othUSBInit (DevicePtr pDev)
int othUSBOn (DevicePtr pDev)
void othUSBGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info)

Detailed Description

This code implements a low-level device driver for a non-keyboard, non-mouse USB device (e.g., a joystick or gamepad).


Define Documentation

#define BLOCK   DMXBlockType
#define CHECKPROC   dmxCheckSpecialProcPtr
#define ENQUEUEPROC   dmxEnqueueProcPtr
#define FATAL0 (  )     dmxLog(dmxFatal,f)
#define FATAL1 ( f,
 )     dmxLog(dmxFatal,f,a)
#define FATAL2 ( f,
a,
 )     dmxLog(dmxFatal,f,a,b)
#define GETPRIV
Value:
myPrivate *priv                            \
                      = ((DMXLocalInputInfoPtr)(pDev->devicePrivate))->private
#define LOG0 (  )     dmxLog(dmxDebug,f)
#define LOG1 ( f,
 )     dmxLog(dmxDebug,f,a)
#define LOG2 ( f,
a,
 )     dmxLog(dmxDebug,f,a,b)
#define LOG3 ( f,
a,
b,
 )     dmxLog(dmxDebug,f,a,b,c)
#define MOTIONPROC   dmxMotionProcPtr
#define test_bit ( bit   )     (priv->mask[(bit)/8] & (1 << ((bit)%8)))

Function Documentation

void othUSBGetInfo ( DevicePtr  pDev,
DMXLocalInitInfoPtr  info 
)
void othUSBInit ( DevicePtr  pDev  ) 

Initialize pDev using usbInit.

References usbInit(), and usbOther.

Referenced by othUSBOn().

int othUSBOn ( DevicePtr  pDev  ) 

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

References GETPRIV, and othUSBInit().

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

Read the USB device using usbRead.

References usbRead().


Generated June 29, 2004 for Distributed Multihead X by doxygen 1.3.4.