Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 520 → Rev 521

/kernel/trunk/arch/ia64/include/drivers/keyboard.h
1,5 → 1,6
/*
* Copyright (C) 2005 Jakub Jermar
* Copyright (C) 2005 Jakub Vana
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
33,7 → 34,7
#include <arch/ski/ski.h>
 
extern void keyboard_init(void);
extern void keyboard(void);
extern void poll_keyboard(void);
 
 
#endif
/kernel/trunk/arch/ia64/src/drivers/keyboard.c
1,6 → 1,7
/*
* Copyright (C) 2003 Josef Cejka
* Copyright (C) 2005 Jakub Jermar
* Copyright (C) 2005 Jakub Vana
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
54,17 → 55,17
{
chardev_initialize(&kbrd, &ops);
stdin = &kbrd;
kb_disable = 0;
kb_disable = false;
}
 
/** Process keyboard interrupt. */
void keyboard(void)
void poll_keyboard(void)
{
if(kb_disable) return;
char ch;
 
ch = ski_getchar();
if(ch==13) ch=10;
if(ch=='\r') ch='\n';
if(ch) chardev_push_character(&kbrd, ch);
}
72,11 → 73,11
/* Called from getc(). */
void keyboard_enable(void)
{
kb_disable=0;
kb_disable=false;
}
 
/* Called from getc(). */
void keyboard_disable(void)
{
kb_disable=1;
kb_disable=true;
}
/kernel/trunk/arch/ia64/src/drivers/it.c
29,6 → 29,7
/** Interval Timer driver. */
#include <arch/drivers/it.h>
#include <arch/drivers/keyboard.h>
#include <arch/interrupt.h>
#include <arch/register.h>
#include <arch/asm.h>
35,7 → 36,6
#include <arch/barrier.h>
#include <time/clock.h>
 
void keyboard(void);
 
/** Initialize Interval Timer. */
void it_init(void)
65,5 → 65,5
itm_write(itc_read() + IT_DELTA); /* program next interruption */
srlz_d(); /* propagate changes */
clock();
keyboard();
poll_keyboard();
}