From b92829994618e41c2b1bc9e48d5ce37797e175c7 Mon Sep 17 00:00:00 2001 From: bernie Date: Mon, 27 Feb 2006 22:39:45 +0000 Subject: [PATCH] Misc build and doc fixes from Grillo. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@558 38d2e660-2303-0410-9eaa-f027e97ec537 --- drv/kbd.c | 12 +++++++++--- drv/kbd.h | 11 +++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/drv/kbd.c b/drv/kbd.c index f85f897c..de1c561c 100755 --- a/drv/kbd.c +++ b/drv/kbd.c @@ -17,6 +17,9 @@ /*#* *#* $Log$ + *#* Revision 1.5 2006/02/27 22:39:45 bernie + *#* Misc build and doc fixes from project_grl. + *#* *#* Revision 1.4 2006/02/24 00:27:14 bernie *#* Use new naming convention for list macros. *#* @@ -39,6 +42,7 @@ #include #include +#include /* Configuration sanity checks */ #if !defined(CONFIG_KBD_POLL) || (CONFIG_KBD_POLL != KBD_POLL_SOFTINT && CONFIG_KBD_POLL != CONFIG_POLL_FREERTOS) @@ -65,7 +69,9 @@ static enum { KS_IDLE, KS_REPDELAY, KS_REPEAT } kbd_rptStatus; static volatile keymask_t kbd_buf; /*!< Single entry keyboard buffer */ static volatile keymask_t kbd_cnt; /*!< Number of keypress events in \c kbd_buf */ +#if CONFIG_KBD_POLL == KBD_POLL_SOFTINT static Timer kbd_timer; /*!< Keyboard softtimer */ +#endif static List kbd_rawHandlers; /*!< Raw keyboard handlers */ static List kbd_handlers; /*!< Cooked keyboard handlers */ @@ -128,11 +134,11 @@ static void kbd_softint(UNUSED_ARG(iptr_t, arg)) #include "FreeRTOS.h" #include "task.h" -static portTASK_FUNCTION(kbd_poll, arg) +static portTASK_FUNCTION(kbd_task, arg) { for (;;) { - kbd_poll(0); + kbd_poll(); timer_delay(KBD_CHECK_INTERVAL); } } @@ -438,7 +444,7 @@ void kbd_init(void) #elif CONFIG_KBD_POLL == CONFIG_POLL_FREERTOS /* Create a timer specific thread */ - xTaskCreate(kbd_poll, "kbd_poll", CONFIG_STACK_KBD, + xTaskCreate(kbd_task, "kbd", CONFIG_STACK_KBD, NULL, CONFIG_PRI_KBD, NULL); #else diff --git a/drv/kbd.h b/drv/kbd.h index 863831cb..6b7e0cbd 100755 --- a/drv/kbd.h +++ b/drv/kbd.h @@ -16,6 +16,9 @@ /*#* *#* $Log$ + *#* Revision 1.3 2006/02/27 22:39:45 bernie + *#* Misc build and doc fixes from project_grl. + *#* *#* Revision 1.2 2006/02/10 12:38:16 bernie *#* Add preliminary FreeRTOS support; Enforce CONFIG_* definitions. *#* @@ -30,8 +33,16 @@ #include #include +/** + * \name Keyboard polling modes. + * + * Define CONFIG_KBD_POLL to one of these. + * + * \{ + */ #define KBD_POLL_SOFTINT 1 #define KBD_POLL_FREERTOS 2 +/* \} */ /*! * Keyboard handler descriptor -- 2.34.1