Esempio n. 1
0
//실질적으로 키보드 인터럽트를 처리하는 함수
VOID Kbd_IRQ_Handler(VOID)
{

	UCHAR keyCode;

	keyCode = READ_PORT_UCHAR((PUCHAR)0x60);

	if(keyCode == 0xff || keyCode == 0x00) {
		return;
	}
	else if(keyCode == 0xfa) {
		return;
	}

	if(!KbdpPushRawKeyData(&(m_KbdData.raw_keydata_q), keyCode)){
		return;
	}

}
Esempio n. 2
0
/* This function may be called by IRQ1 interrupt handler in "hal.c" file. */
VOID Kbd_IRQ_Handler(VOID)
{
	UCHAR keyCode;

	/* get key */
	keyCode = READ_PORT_UCHAR((PUCHAR)0x60);

	if(keyCode == 0xff || keyCode == 0x00) { /* overrun */
		/* do something (i.e. BEEP sound) */
		return;
	} else if(keyCode == 0xfa) { /* acknowledge */
		return;
	}

	/* Insert key data into 'RAW Q', and then return to 'IRQ 1' handler without delay for increasing OS performance. ^^ */
	if(!KbdpPushRawKeyData(&(m_KbdData.raw_keydata_q), keyCode)) {
		/* if the buffer hasn't enough space to save a new key code, DO SOMETHING you want */
		/* DbgPrint("#KBD# No enough space!! Dont hit again, you silly! \r\n"); */
		return;
	}
}