#include <revolution/kbd.h>
KBDDevCallbackF KBDSetAttachCallback (KBDDevCallbackF fn);
fn |
Pointer to a function to call back when a USB keyboard device is physically attached. |
KBDDevCallbackF |
A pointer to the previous keyboard device attach callback. |
Registers a function with the USB keyboard library to call whenever a USB keyboard device is connected. The function pointer typedef KBDDevCallbackF is defined as follows.
typedef struct _KBDDevEvent {
KBDChannel channel;
} KBDDevEvent;
typedef void (*KBDDevCallbackF) (KBDDevEvent*);
The fn function is called with a pointer to a KBDDevEvent structure that contains the channel (keyboard) that was attached.
You must always register the attach callback before calling the KBDInit function. Doing so ensures that the keyboard physically plugged into the console before KBDInit executes is the keyboard that will be attached.
2007/10/03 Added a note about registering the attach callback.
2007/03/19 Initial version 0.1.
CONFIDENTIAL