Home |
Structure RTUSBKeybrdConfig |
Structure RTUSBKeybrdConfigThe USB keyboard class driver can handle up to 4 keyboards simultaneously. It reads configuration information from structure RTUSBKeybrdConfig. The default values are given below. Applications can either modify selected values before the driver is registered or an alternate RTUSBKeybrdConfig structure can be linked. typedef struct { int TaskPriority; // keyboard thread priority int TaskStackSize; // keyboard thread stack size int RepeatDelay; // milliseconds int RepeatRate; // milliseconds } RTUSB32KeybrdConfig; RTUSB32KeybrdConfig RTUSBKeybrdConfig = { 0, // TaskPriority; 2*1024, // TaskStackSize; 250, // RepeatDelay, 32 // RepeatRate; }; 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. RepeatDelay specifies the number of milliseconds a user must depress a key before the autorepeat rate function starts to repeat the pressed key. Once autorepeat is active, the same key is regenerated every RepeatRate milliseconds. The USB keyboard class driver is used by registering its attachment/detachment callback USBKeyboard.
|