projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Modify the module selection page
[bertos.git]
/
bertos
/
drv
/
kbd.c
diff --git
a/bertos/drv/kbd.c
b/bertos/drv/kbd.c
index b36a5a4801c0806103cc2895eec84424e8e4c9cc..3d1eca4537dc2a256301f9178fe2c5aaa47e8e0e 100644
(file)
--- a/
bertos/drv/kbd.c
+++ b/
bertos/drv/kbd.c
@@
-154,7
+154,7
@@
static void kbd_softint(UNUSED_ARG(iptr_t, arg))
timer_add(&kbd_timer);
}
timer_add(&kbd_timer);
}
-#else
+#else
#error "Define keyboard poll method"
#endif /* CONFIG_KBD_POLL */
#error "Define keyboard poll method"
#endif /* CONFIG_KBD_POLL */
@@
-177,10
+177,11
@@
keymask_t kbd_peek(void)
{
keymask_t key = 0;
{
keymask_t key = 0;
-// FIXME: make it optional
+#if CONFIG_KBD_SCHED
/* Let other tasks run for a while */
extern void schedule(void);
schedule();
/* Let other tasks run for a while */
extern void schedule(void);
schedule();
+#endif
/* Extract an event from the keyboard buffer */
IRQ_DISABLE;
/* Extract an event from the keyboard buffer */
IRQ_DISABLE;
@@
-236,7
+237,7
@@
void kbd_addHandler(struct KbdHandler *handler)
KbdHandler *node;
List *list;
KbdHandler *node;
List *list;
- cpuflags_t flags;
+ cpu
_
flags_t flags;
IRQ_SAVE_DISABLE(flags);
/* Choose between raw and coocked handlers list */
IRQ_SAVE_DISABLE(flags);
/* Choose between raw and coocked handlers list */
@@
-473,7
+474,7
@@
void kbd_init(void)
MOD_CHECK(timer);
/* Add kbd handler to soft timers list */
MOD_CHECK(timer);
/* Add kbd handler to soft timers list */
- event_initSoft
I
nt(&kbd_timer.expire, kbd_softint, NULL);
+ event_initSoft
i
nt(&kbd_timer.expire, kbd_softint, NULL);
timer_setDelay(&kbd_timer, ms_to_ticks(KBD_CHECK_INTERVAL));
timer_add(&kbd_timer);
timer_setDelay(&kbd_timer, ms_to_ticks(KBD_CHECK_INTERVAL));
timer_add(&kbd_timer);