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
Structure RTUSBKeybrdConfig
Function USBKeyboard
Function USBSetKeyboardLEDs
Mouse Class Driver
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 RTUSBKeybrdConfig
The 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.
Function USBKeyboard
|