/*..........................................................................*/ void QF_onClockTickISR(void) { QF_tickXISR(0U); /* perform the QF-nano clock tick processing */ if (_kbhit()) { /* any key pressed? */ BSP_onKeyboardInputISR(_getch()); } }
/*..........................................................................*/ static void interrupt ISR_kbd() { uint8_t key; uint8_t kcr; _enable(); /* enable interrupts */ key = inp(0x60); /* key scan code from 8042 kbd controller */ kcr = inp(0x61); /* get keyboard control register */ outp(0x61, (uint8_t)(kcr | 0x80)); /* toggle acknowledge bit high */ outp(0x61, kcr); /* toggle acknowledge bit low */ BSP_onKeyboardInputISR(key); /* process the keyboard scan code */ _disable(); /* disable interrupts again */ outp(0x20, 0x20); /* write EOI to the master PIC */ }