Subversion Repositories HelenOS-historic

Rev

Rev 606 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 606 Rev 623
Line 61... Line 61...
61
 
61
 
62
#define PRESSED_SHIFT       (1<<0)
62
#define PRESSED_SHIFT       (1<<0)
63
#define PRESSED_CAPSLOCK    (1<<1)
63
#define PRESSED_CAPSLOCK    (1<<1)
64
#define LOCKED_CAPSLOCK     (1<<0)
64
#define LOCKED_CAPSLOCK     (1<<0)
65
 
65
 
66
static spinlock_t keylock;      /**< keylock protects keyflags and lockflags. */
66
SPINLOCK_INITIALIZE(keylock);       /**< keylock protects keyflags and lockflags. */
67
static volatile int keyflags;       /**< Tracking of multiple keypresses. */
67
static volatile int keyflags;       /**< Tracking of multiple keypresses. */
68
static volatile int lockflags;      /**< Tracking of multiple keys lockings. */
68
static volatile int lockflags;      /**< Tracking of multiple keys lockings. */
69
 
69
 
70
static void i8042_suspend(chardev_t *);
70
static void i8042_suspend(chardev_t *);
71
static void i8042_resume(chardev_t *);
71
static void i8042_resume(chardev_t *);
Line 241... Line 241...
241
/** Initialize i8042. */
241
/** Initialize i8042. */
242
void i8042_init(void)
242
void i8042_init(void)
243
{
243
{
244
    exc_register(VECTOR_KBD, "i8042_interrupt", i8042_interrupt);
244
    exc_register(VECTOR_KBD, "i8042_interrupt", i8042_interrupt);
245
    trap_virtual_enable_irqs(1<<IRQ_KBD);
245
    trap_virtual_enable_irqs(1<<IRQ_KBD);
246
    spinlock_initialize(&keylock, "i8042_lock");
-
 
247
    chardev_initialize("i8042_kbd", &kbrd, &ops);
246
    chardev_initialize("i8042_kbd", &kbrd, &ops);
248
    stdin = &kbrd;
247
    stdin = &kbrd;
249
}
248
}
250
 
249
 
251
/** Process i8042 interrupt.
250
/** Process i8042 interrupt.