On Time RTOS-32 Documentation
Welcome
RTTarget-32
RTKernel-32
RTFiles-32
RTIP-32
RTPEG-32
RTUSB-32
RTUSB-32 Programming Manual
RTUSB-32 Reference Manual
Introduction
Initialization
Device Query
Device Configuration
Pipe I/O
Message Queues
Keyboard Class Driver
Mouse Class Driver
Structure RTUSBMouseConfig
Function USBMouse
Function USBSetMousePos
Touch Screen Driver
Printer Class Driver
Mass Storage Class Driver
AX772 USB-Ethernet Driver
AX172 USB-Ethernet Driver
CDC ECM USB-Ethernet Driver
Audio Class Driver
Media Transfer Protocol Class Driver
RTUSB-32 Error Codes and Diagnostics
|
Structure RTUSBMouseConfig
The 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.
Function USBMouse
|