Esempio n. 1
0
// **********************************************************************
// **********************************************************************
// simulate asynchronous interrupts by polling events during idle loop
//
void pollInterrupts(void)
{
	// check for task monopoly
	pollClock = clock();
	assert("Timeout" && ((pollClock - lastPollClock) < MAX_CYCLES));
	lastPollClock = pollClock;

	// check for keyboard interrupt
	if ((inChar = GET_CHAR) > 0)
	{
	  keyboard_isr();
	}

	// timer interrupt
	timer_isr();

	return;
} // end pollInterrupts
Esempio n. 2
0
// **********************************************************************
// **********************************************************************
// simulate asynchronous interrupts by polling events during idle loop
//
static void pollInterrupts(void)
{
	// check for task monopoly
	pollClock = clock();
	assert("Timeout" && ((pollClock - lastPollClock) < MAX_CYCLES));
	lastPollClock = pollClock;

	// check for keyboard interrupt
	int inCharInt = 0;
	if ((inCharInt = GET_CHAR) > 0)
	{
		if(inCharInt == 224){
			arrowKey = TRUE;
			inChar = GET_CHAR;
		}
		else
			inChar = (char)inCharInt;
		keyboard_isr();
	}
	// timer interrupt
	timer_isr();

	return;
} // end pollInterrupts
Esempio n. 3
0
void i8255_cisr() {
  keyboard_isr(inb(0x60));
  pic_ack(1);
}