Home |
Structure RTUSBMouseConfig |
Structure RTUSBMouseConfigThe USB mouse class driver can handle up to 4 USB mice simultaneously. It reads configuration information from structure RTUSBMouseConfig. The default values are given below. Applications can either modify selected values before the driver is registered or an alternate RTUSBMouseConfig structure can be linked. typedef struct { int TaskPriority; // mouse thread priority int TaskStackSize; // mouse thread stack size int MouseScaleX; // X acceleration int MouseScaleY; // Y acceleration int MaxX; // Max X coordinate int MaxY; // Max Y coordinate int DoubleClickTime; // millisecond threshold } RTUSB32MouseConfig; RTUSB32MouseConfig RTUSBMouseConfig = { 0, // TaskPriority; 2*1024, // TaskStackSize; 5, // MouseScaleX; 5, // MouseScaleY; 0, // MaxX 0, // MaxY 300, // DoubleClickTime; }; The driver's internal task needs very little CPU time and stack space. Its priority should generally be the same as the application's user interface. MouseScaleX and MouseScaleY are factors by which the mouse is accelerated when moved quickly. The higher these values are the faster the mouse will move. MaxX and MaxY can be set to limit the coordinates the mouse pointer can move to (at 0, no limits are imposed). The mouse pointer position can never become negative. DoubleClickTime is the maximum number of milliseconds two left mouse button clicks may be apart for the second click to be reported as a double click event. The USB mouse class driver is used by registering its attachment/detachment callback USBMouse.
|