diff options
author | yokota <yokota@FreeBSD.org> | 1999-03-10 10:36:53 +0000 |
---|---|---|
committer | yokota <yokota@FreeBSD.org> | 1999-03-10 10:36:53 +0000 |
commit | 1c67fa8f3d842ef1daea6a8442e829e386fafdd5 (patch) | |
tree | 41f00cd620389bf07e2912551d080e830f0dc85a /sys/dev/kbd/kbdreg.h | |
parent | 6eb9a9adf91724bc8f8bb0516ce6bc9f52b58d95 (diff) | |
download | FreeBSD-src-1c67fa8f3d842ef1daea6a8442e829e386fafdd5.zip FreeBSD-src-1c67fa8f3d842ef1daea6a8442e829e386fafdd5.tar.gz |
Keyboard driver update in preparation for the USB keyboard driver.
- Refined internal interface in keyboard drivers so that:
1. the side effect of device probe is kept minimal,
2. polling mode function is added,
3. and new ioctl and configuration options are added (see below).
- Added new ioctl: KDSETREPEAT
Set keyboard typematic rate. There has existed an ioctl command,
KDSETRAD, for the same purpose. However, KDSETRAD is dependent on
the AT keyboard. KDSETREPEAT provides more generic interface.
KDSETRAD will still be supported in the atkbd driver.
- Added new configuration options:
ATKBD_DFLT_KEYMAP
Specify a keymap to be used as the default, built-in keymap.
(There has been undocumented options, DKKEYMAP, UKKEYMAP, GRKEYMAP,
SWKEYMAP, RUKEYMAP, ESKEYMAP, and ISKEYMAP to set the default keymap.
These options are now gone for good. The new option is more general.)
KBD_DISABLE_KEYMAP_LOADING
Don't allow the user to change the keymap.
Diffstat (limited to 'sys/dev/kbd/kbdreg.h')
-rw-r--r-- | sys/dev/kbd/kbdreg.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/sys/dev/kbd/kbdreg.h b/sys/dev/kbd/kbdreg.h index d592019..5f0da43 100644 --- a/sys/dev/kbd/kbdreg.h +++ b/sys/dev/kbd/kbdreg.h @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: kbdreg.h,v 1.1 1999/01/09 02:44:50 yokota Exp $ + * $Id: kbdreg.h,v 1.2 1999/01/19 11:31:14 yokota Exp $ */ #ifndef _DEV_KBD_KBDREG_H_ @@ -83,6 +83,10 @@ struct keyboard { struct fkeytab *kb_fkeytab; /* function key strings */ int kb_fkeytab_size;/* # of function key strings */ void *kb_data; /* the driver's private data */ + int kb_delay1; + int kb_delay2; +#define KB_DELAY1 500 +#define KB_DELAY2 100 }; #define KBD_IS_VALID(k) ((k)->kb_flags & KB_VALID) @@ -105,11 +109,11 @@ struct keyboard { #define KBD_LED_VAL(k) ((k)->kb_led) /* keyboard function table */ -typedef int kbd_probe_t(int unit, keyboard_t **kbdp, void *arg, - int flags); -typedef int kbd_init_t(keyboard_t *kbd); +typedef int kbd_probe_t(int unit, void *arg, int flags); +typedef int kbd_init_t(int unit, keyboard_t **kbdp, void *arg, + int flags); typedef int kbd_term_t(keyboard_t *kbd); -typedef int kbd_intr_t(keyboard_t *kbd); +typedef int kbd_intr_t(keyboard_t *kbd, void *arg); typedef int kbd_test_if_t(keyboard_t *kbd); typedef int kbd_enable_t(keyboard_t *kbd); typedef int kbd_disable_t(keyboard_t *kbd); @@ -124,6 +128,7 @@ typedef int kbd_get_state_t(keyboard_t *kbd, void *buf, size_t len); typedef int kbd_set_state_t(keyboard_t *kbd, void *buf, size_t len); typedef u_char *kbd_get_fkeystr_t(keyboard_t *kbd, int fkey, size_t *len); +typedef int kbd_poll_mode_t(keyboard_t *kbd, int on); typedef void kbd_diag_t(keyboard_t *kbd, int level); typedef struct keyboard_switch { @@ -144,6 +149,7 @@ typedef struct keyboard_switch { kbd_get_state_t *get_state; kbd_set_state_t *set_state; kbd_get_fkeystr_t *get_fkeystr; + kbd_poll_mode_t *poll; kbd_diag_t *diag; } keyboard_switch_t; @@ -157,10 +163,10 @@ typedef struct keyboard_driver { #ifdef KERNEL #define KEYBOARD_DRIVER(name, sw, config) \ - static struct keyboard_driver name##_driver = { \ + static struct keyboard_driver name##_kbd_driver = { \ #name, &sw, config \ }; \ - DATA_SET(kbddriver_set, name##_driver); + DATA_SET(kbddriver_set, name##_kbd_driver); /* global variables */ extern keyboard_switch_t **kbdsw; |