LK201 changes from PR#4519:
Add lk_bell() to ring keyboard audible bell (for rcons bell). Add LK_KEY_CLICK option to reset keyboard and enable keyclick. (off by default since theres no way to control it from userland yet).
This commit is contained in:
parent
8c3b908f26
commit
1962954796
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lk201.c,v 1.9 1998/03/24 00:23:55 jonathan Exp $ */
|
||||
/* $NetBSD: lk201.c,v 1.10 1999/01/28 10:20:10 jonathan Exp $ */
|
||||
|
||||
/*
|
||||
* The LK201 keycode mapping routine is here, along with initialization
|
||||
|
@ -190,6 +190,8 @@ static u_char kbdInitString[] = {
|
|||
LK_LED_DISABLE, LED_ALL, /* clear keyboard leds */
|
||||
};
|
||||
|
||||
static void (*raw_kbd_putc) __P((dev_t dev, int c)) = NULL;
|
||||
static dev_t lk_out_dev = NODEV;
|
||||
|
||||
/*
|
||||
* Initialize the Keyboard.
|
||||
|
@ -205,9 +207,27 @@ KBDReset(kbddev, putc)
|
|||
if (inKBDReset)
|
||||
return;
|
||||
inKBDReset = 1;
|
||||
for (i = 0; i < sizeof(kbdInitString); i++)
|
||||
|
||||
/* XXX no way to disable keyclick from userspace */
|
||||
for (i = 0; i < sizeof(kbdInitString); i++) {
|
||||
#ifdef LK_KEY_CLICK
|
||||
(*putc)(kbddev, (int)kbdInitString[i]);
|
||||
DELAY(20000);
|
||||
#endif
|
||||
}
|
||||
inKBDReset = 0;
|
||||
raw_kbd_putc = putc;
|
||||
lk_out_dev = kbddev;
|
||||
}
|
||||
|
||||
void
|
||||
lk_bell(ring)
|
||||
int ring;
|
||||
{
|
||||
if ((!ring) || (lk_out_dev == NODEV) || (raw_kbd_putc == NULL))
|
||||
return;
|
||||
(*raw_kbd_putc)(lk_out_dev, LK_RING_BELL);
|
||||
DELAY(20000);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lk201var.h,v 1.2 1998/01/05 07:03:12 perry Exp $ */
|
||||
/* $NetBSD: lk201var.h,v 1.3 1999/01/28 10:20:11 jonathan Exp $ */
|
||||
|
||||
#ifndef _LK201VAR_H_
|
||||
#define _LK201VAR_H_
|
||||
|
@ -13,5 +13,6 @@ extern void mouseInput __P((int cc));
|
|||
|
||||
extern int LKgetc __P((dev_t dev));
|
||||
extern void lk_divert __P((int (*getfn) __P ((dev_t dev)), dev_t in_dev));
|
||||
extern void lk_bell __P ((int ring));
|
||||
#endif
|
||||
#endif /* _LK201VAR_H_ */
|
||||
|
|
Loading…
Reference in New Issue