Rev 4346 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4346 | Rev 4348 | ||
---|---|---|---|
Line 35... | Line 35... | ||
35 | 35 | ||
36 | #ifndef KERN_KBD_H_ |
36 | #ifndef KERN_KBD_H_ |
37 | #define KERN_KBD_H_ |
37 | #define KERN_KBD_H_ |
38 | 38 | ||
39 | #include <console/chardev.h> |
39 | #include <console/chardev.h> |
- | 40 | #include <proc/thread.h> |
|
- | 41 | #include <synch/spinlock.h> |
|
40 | 42 | ||
- | 43 | typedef struct { |
|
- | 44 | thread_t *thread; |
|
- | 45 | ||
- | 46 | indev_t *sink; |
|
- | 47 | indev_t raw; |
|
- | 48 | ||
- | 49 | SPINLOCK_DECLARE(keylock); /**< keylock protects keyflags and lockflags. */ |
|
- | 50 | volatile unsigned int keyflags; /**< Tracking of multiple keypresses. */ |
|
- | 51 | volatile unsigned int lockflags; /**< Tracking of multiple keys lockings. */ |
|
- | 52 | } kbrd_instance_t; |
|
- | 53 | ||
41 | extern void kbrd_init(indev_t *devin); |
54 | extern kbrd_instance_t *kbrd_init(void); |
- | 55 | extern indev_t *kbrd_wire(kbrd_instance_t *, indev_t *); |
|
42 | 56 | ||
43 | #endif |
57 | #endif |
44 | 58 | ||
45 | /** @} |
59 | /** @} |
46 | */ |
60 | */ |