UbixOS  2.0
atkbd.c File Reference
#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 <sys/shutdown.h>
#include <lib/kmalloc.h>
#include <lib/kprintf.h>
#include <ubixos/sched.h>
#include <ubixos/endtask.h>
#include <ubixos/tty.h>
#include <ubixos/spinlock.h>
#include <ubixos/kpanic.h>
#include <ubixos/vitals.h>
Include dependency graph for atkbd.c:

Go to the source code of this file.

Functions

 asm (".globl atkbd_isr \n" "atkbd_isr: \n" "push $0x80\n" "push $0x80\n" " pusha \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call keyboardHandler \n" " add $0x4,%esp\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" " popa \n" " add $0x8,%esp\n" " iret \n")
 
int atkbd_init ()
 
int getchar ()
 
void keyboardHandler (struct trapframe *frame)
 
void setLED ()
 

Function Documentation

◆ asm()

asm ( ".globl atkbd_isr \n" "atkbd_isr: \n" "push $0x80\n" "push $0x80\n" " pusha \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call keyboardHandler \n" " add  $0x4,
%esp\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" " popa \n" " add  $0x8,
%esp\n" " iret \n"   
)

◆ atkbd_init()

int atkbd_init ( )

Definition at line 154 of file atkbd.c.

References atkbd_isr(), dDpl0, dInt, dPresent, mVec, setLED(), and setVector().

Here is the call graph for this function:

◆ getchar()

int getchar ( )

Definition at line 343 of file atkbd.c.

References tty_foreground.

Referenced by sys_fgetc(), sys_pread(), and sys_read().

◆ keyboardHandler()

void keyboardHandler ( struct trapframe frame)

Definition at line 217 of file atkbd.c.

References spinTryLock().

Here is the call graph for this function:

◆ setLED()

void setLED ( )

Definition at line 333 of file atkbd.c.

References inportByte(), and outportByte().

Referenced by atkbd_init().

Here is the call graph for this function: