From ce53d10edad6c070e6603cf8cd2e8da464dad32c Mon Sep 17 00:00:00 2001 From: arighi Date: Mon, 22 Mar 2010 11:56:51 +0000 Subject: [PATCH] kdb: re-enable calling poor man's scheduler inside kbd_peek(). Restore the old behaviour of calling a custom schedule() function (provided by the user) inside kbd_peek() if CONFIG_KBD_SCHED is enabled. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3254 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/frame.h | 4 ++-- bertos/drv/kbd.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bertos/cpu/frame.h b/bertos/cpu/frame.h index 4d78a3c3..0809b0ec 100644 --- a/bertos/cpu/frame.h +++ b/bertos/cpu/frame.h @@ -212,9 +212,9 @@ #if defined(ARCH_QT) && (ARCH & ARCH_QT) /* This emulator hook should yield the CPU to the host. */ EXTERN_C_BEGIN - void refresh(void); + void schedule(void); EXTERN_C_END - #define CPU_IDLE refresh() + #define CPU_IDLE schedule() #else /* !ARCH_EMUL */ #define CPU_IDLE do { /* nothing */ } while (0) #endif /* !ARCH_EMUL */ diff --git a/bertos/drv/kbd.c b/bertos/drv/kbd.c index 3334deb2..19b2478d 100644 --- a/bertos/drv/kbd.c +++ b/bertos/drv/kbd.c @@ -178,7 +178,7 @@ keymask_t kbd_peek(void) keymask_t key = 0; #if CONFIG_KBD_SCHED - timer_delay(1); + schedule(); #endif /* Extract an event from the keyboard buffer */ -- 2.25.1