#include <isa/atkbd.h>
#include <isa/8259.h>
#include <sys/video.h>
#include <sys/idt.h>
#include <sys/gdt.h>
#include <sys/io.h>
#include <lib/kmalloc.h>
#include <lib/kprintf.h>
#include <ubixos/types.h>
#include <ubixos/sched.h>
#include <ubixos/endtask.h>
#include <ubixos/tty.h>
#include <ubixos/spinlock.h>
Go to the source code of this file.
Functions | |
| asm (".globl atkbd_isr \n""atkbd_isr: \n"" pusha \n"" push %ss \n"" push %ds \n"" push %es \n"" push %fs \n"" push %gs \n"" call keyboardHandler \n"" mov $0x20,%dx \n"" mov $0x20,%ax \n"" outb %al,%dx \n"" pop %gs \n"" pop %fs \n"" pop %es \n"" pop %ds \n"" pop %ss \n"" popa \n"" iret \n") | |
| int | atkbd_init () | 
| static int | atkbd_scan () | 
| unsigned char | getch () | 
| void | keyboardHandler () | 
| void | setLED () | 
Variables | |
| static spinLock_t | atkbdSpinLock = SPIN_LOCK_INITIALIZER | 
| static uInt32 | controlKeys = 0x0 | 
| static unsigned int | keyboardMap [255][8] | 
| static unsigned int | keyMap = 0x0 | 
| static unsigned int | ledStatus = 0x0 | 
| static char | stdinBuffer [512] | 
| static uInt16 | stdinSize | 
| asm | ( | ".globl atkbd_isr \n""atkbd_isr: \n"" pusha \n"" push %ss \n"" push %ds \n"" push %es \n"" push %fs \n"" push %gs \n"" call keyboardHandler \n"" mov $ | 0x20, | |
| %dx\n""mov $ | 0x20, | |||
| %ax\n""outb% | al, | |||
| %dx\n""pop%gs\n""pop%fs\n""pop%es\n""pop%ds\n""pop%ss\n""popa\n""iret\n" | ||||
| ) | 
| int atkbd_init | ( | ) | 
Definition at line 155 of file atkbd.c.
References atkbd_isr(), atkbd_scan(), dDpl0, dInt, dPresent, irqEnable(), kprintf(), mVec, setLED(), setVector(), stdinBuffer, and x1.
| static int atkbd_scan | ( | ) |  [static] | 
        
Definition at line 201 of file atkbd.c.
References inportByte(), and outportByte().
Referenced by atkbd_init(), and keyboardHandler().
| unsigned char getch | ( | ) | 
Definition at line 327 of file atkbd.c.
References tty_termNode::stdin, stdinBuffer, tty_termNode::stdinSize, stdinSize, tty_foreground, and x1.
Referenced by sysFgetc().
| void keyboardHandler | ( | ) | 
Definition at line 214 of file atkbd.c.
References altKey, atkbd_scan(), atkbdSpinLock, backSpace(), controlKey, controlKeys, inportByte(), keyboardMap, keyMap, kprintf(), ledCapslock, ledNumlock, ledScrolllock, ledStatus, outportByte(), setLED(), shiftKey, spinTryLock(), spinUnlock(), tty_termNode::stdin, stdinBuffer, tty_termNode::stdinSize, stdinSize, tty_change(), and tty_foreground.
| void setLED | ( | ) | 
Definition at line 319 of file atkbd.c.
References inportByte(), ledStatus, and outportByte().
Referenced by atkbd_init(), and keyboardHandler().
spinLock_t atkbdSpinLock = SPIN_LOCK_INITIALIZER [static]           | 
        
uInt32 controlKeys = 0x0 [static]           | 
        
unsigned int keyboardMap[255][8] [static]           | 
        
unsigned int keyMap = 0x0 [static]           | 
        
unsigned int ledStatus = 0x0 [static]           | 
        
char stdinBuffer[512] [static]           | 
        
 1.4.7