Subversion Repositories HelenOS-historic

Rev

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

Rev 552 Rev 575
Line 64... Line 64...
64
 
64
 
65
static spinlock_t keylock;      /**< keylock protects keyflags and lockflags. */
65
static spinlock_t keylock;      /**< keylock protects keyflags and lockflags. */
66
static volatile int keyflags;       /**< Tracking of multiple keypresses. */
66
static volatile int keyflags;       /**< Tracking of multiple keypresses. */
67
static volatile int lockflags;      /**< Tracking of multiple keys lockings. */
67
static volatile int lockflags;      /**< Tracking of multiple keys lockings. */
68
 
68
 
69
static void i8042_suspend(void);
69
static void i8042_suspend(chardev_t *);
70
static void i8042_resume(void);
70
static void i8042_resume(chardev_t *);
71
 
71
 
72
static chardev_t kbrd;
72
static chardev_t kbrd;
73
static chardev_operations_t ops = {
73
static chardev_operations_t ops = {
74
    .suspend = i8042_suspend,
74
    .suspend = i8042_suspend,
75
    .resume = i8042_resume
75
    .resume = i8042_resume
Line 239... Line 239...
239
void i8042_init(void)
239
void i8042_init(void)
240
{
240
{
241
    trap_register(VECTOR_KBD, i8042_interrupt);
241
    trap_register(VECTOR_KBD, i8042_interrupt);
242
    trap_virtual_enable_irqs(1<<IRQ_KBD);
242
    trap_virtual_enable_irqs(1<<IRQ_KBD);
243
    spinlock_initialize(&keylock, "i8042_lock");
243
    spinlock_initialize(&keylock, "i8042_lock");
244
    chardev_initialize(&kbrd, &ops);
244
    chardev_initialize("i8042_kbd", &kbrd, &ops);
245
    stdin = &kbrd;
245
    stdin = &kbrd;
246
}
246
}
247
 
247
 
248
/** Process i8042 interrupt.
248
/** Process i8042 interrupt.
249
 *
249
 *
Line 320... Line 320...
320
    }
320
    }
321
    spinlock_unlock(&keylock);
321
    spinlock_unlock(&keylock);
322
}
322
}
323
 
323
 
324
/* Called from getc(). */
324
/* Called from getc(). */
325
void i8042_resume(void)
325
void i8042_resume(chardev_t *d)
326
{
326
{
327
}
327
}
328
 
328
 
329
/* Called from getc(). */
329
/* Called from getc(). */
330
void i8042_suspend(void)
330
void i8042_suspend(chardev_t *d)
331
{
331
{
332
}
332
}