Higher Level Keyboard Driver
Posted: Wed Jun 13, 2007 1:26 pm
Pre-Question, Question: When in my scheduler, interrupts should be disabled right?
Actual Question:
So I am trying to figure out how to create a higher level kyb driver. What I mean is, I have the interrupts setup, and can "echo" keypress, but I want to make it more aware of whats going on... I currently have task switching enabled via timer interrupt...
This is what I was thinking:
I have a couple of tasks:
Task 1 (AVERAGE Priority)- CLI
Task 2 (VERY_LOW Priority)- Kernel IDLE
Task 3 (HIGH Priority)- Kernel Interpeter
Task 4 (VERY_LOW Priority)- Keyboard Driver
When a key is pressed, the task handler finds out when Task is currently running, and adds an entry to the kernel Interpreter Saying something like: "KEYPRESS Ascii:34 Modifiers:None Active Task:Task1" howerver, this would be in enumerators, and not actual text. From there, the kernel Interprepeter would send the keypress over to the CLI, and the next time the CLI would ask for a key, one would be in its buffer.
Or am I totally off the mark on the Keyboard driver thing...
Please help me figure out how the heck I am going to create a simple, but effective driver modal.
Thanks,
Rich
Actual Question:
So I am trying to figure out how to create a higher level kyb driver. What I mean is, I have the interrupts setup, and can "echo" keypress, but I want to make it more aware of whats going on... I currently have task switching enabled via timer interrupt...
This is what I was thinking:
I have a couple of tasks:
Task 1 (AVERAGE Priority)- CLI
Task 2 (VERY_LOW Priority)- Kernel IDLE
Task 3 (HIGH Priority)- Kernel Interpeter
Task 4 (VERY_LOW Priority)- Keyboard Driver
When a key is pressed, the task handler finds out when Task is currently running, and adds an entry to the kernel Interpreter Saying something like: "KEYPRESS Ascii:34 Modifiers:None Active Task:Task1" howerver, this would be in enumerators, and not actual text. From there, the kernel Interprepeter would send the keypress over to the CLI, and the next time the CLI would ask for a key, one would be in its buffer.
Or am I totally off the mark on the Keyboard driver thing...
Please help me figure out how the heck I am going to create a simple, but effective driver modal.
Thanks,
Rich