diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-07-23 22:02:34 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-07-23 22:02:34 +0000 |
commit | 67a2288991ce3662a588ee83c0bea9c9efae5f1e (patch) | |
tree | a8d68b22bfd313619f2a0d0b2e3b4755b8278b9d /c/src/lib/libbsp/i386/pc386/console/inch.c | |
parent | Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>: (diff) | |
download | rtems-67a2288991ce3662a588ee83c0bea9c9efae5f1e.tar.bz2 |
Patch from Eric VALETTE <valette@crf.canon.fr>:
Here is a enhanced version of my previous patch. This patch enables
to potentially share the new interrupt management code for all Intel targets
(pc386, go32 and force386) bsp.
Note : this patch is complete only for pc386. It still needs to
be completed for go32 and force386. I carrefully checked
that anything needed is in for force386 (only some function
name changes for IDT manipulation and GDT segment
manipulation). But anyway I will not be able to test any
of theses targets...
Diffstat (limited to 'c/src/lib/libbsp/i386/pc386/console/inch.c')
-rw-r--r-- | c/src/lib/libbsp/i386/pc386/console/inch.c | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/console/inch.c b/c/src/lib/libbsp/i386/pc386/console/inch.c index 9159e62ab4..39c29f93e0 100644 --- a/c/src/lib/libbsp/i386/pc386/console/inch.c +++ b/c/src/lib/libbsp/i386/pc386/console/inch.c @@ -210,6 +210,17 @@ _IBMPC_scankey(char *outChar) return TRUE; } /* _IBMPC_scankey */ +void _IBMPC_keyboard_isr_on(const rtems_irq_connect_data* unused) +{} +void _IBMPC_keyboard_isr_off(const rtems_irq_connect_data* unused) +{} + +int _IBMPC_keyboard_isr_is_on(const rtems_irq_connect_data* irq) +{ + return pc386_irq_enabled_at_i8259s (irq->name); +} + + /*-------------------------------------------------------------------------+ | Function: _IBMPC_keyboard_isr @@ -218,8 +229,7 @@ _IBMPC_scankey(char *outChar) | Arguments: vector - standard RTEMS argument - see documentation. | Returns: standard return value - see documentation. +--------------------------------------------------------------------------*/ -rtems_isr -_IBMPC_keyboard_isr(rtems_vector_number vector) +void _IBMPC_keyboard_isr() { if (_IBMPC_scankey(&kbd_buffer[kbd_last])) { @@ -231,8 +241,6 @@ _IBMPC_keyboard_isr(rtems_vector_number vector) kbd_last = next; } } - - PC386_ackIrq(vector - PC386_IRQ_VECTOR_BASE); /* Mark interrupt as handled. */ } /* _IBMPC_keyboard_isr */ @@ -281,6 +289,21 @@ _IBMPC_inch(void) return c; } /* _IBMPC_inch */ + + /* + * Routine that can be used before interrupt management is initialized. + */ + +char +debugPollingGetChar(void) +{ + char c; + while (!_IBMPC_scankey(&c)) + continue; + + return c; +} + /*-------------------------------------------------------------------------+ | Function: _IBMPC_inch_sleep | Description: If charcter is ready return it, otherwise sleep until |