KBDSetAttachCallback

C Specification

#include <revolution/kbd.h>
KBDDevCallbackF KBDSetAttachCallback (KBDDevCallbackF fn);

Arguments

fn Pointer to a function to callback when a USB keyboard device is physically attached.

Return Values

KBDDevCallbackF A pointer to the previous keyboard device attach callback.

Description

Registers a function with the USB keyboard library to call whenever a USB keyboard device is attached. The function pointer typedef KBDDevCallbackF is defined as follows.

typedef struct _KBDDevEvent {
  KBDChannel channel;
} KBDDevEvent;

typedef void (*KBDDevCallbackF) (KBDDevEvent*);

The function fn is called with pointer to a KBDDevEvent structure that contains the channel (keyboard) that was attached.

See Also

Keyboard API Function List

Revision History

2007/03/19 Initial version.