Use InterruptService in PIT.cc, Keyboard.cc
This commit is contained in:
@ -10,7 +10,9 @@
|
|||||||
|
|
||||||
#include "Keyboard.h"
|
#include "Keyboard.h"
|
||||||
#include "kernel/system/Globals.h"
|
#include "kernel/system/Globals.h"
|
||||||
|
#include "kernel/service/InterruptService.h"
|
||||||
#include "Key.h"
|
#include "Key.h"
|
||||||
|
#include "kernel/system/System.h"
|
||||||
|
|
||||||
namespace Device {
|
namespace Device {
|
||||||
|
|
||||||
@ -334,8 +336,9 @@ void Keyboard::set_led(char led, bool on) {
|
|||||||
// Registriert die Tastatur ISR im IntDispatcher
|
// Registriert die Tastatur ISR im IntDispatcher
|
||||||
// und erlaubt den keyboard interrupt im PIC
|
// und erlaubt den keyboard interrupt im PIC
|
||||||
void Keyboard::plugin() {
|
void Keyboard::plugin() {
|
||||||
Kernel::intdis.assign(Kernel::IntDispatcher::keyboard, *this);
|
auto &interruptService = Kernel::System::getService<Kernel::InterruptService>();
|
||||||
PIC::allow(PIC::keyboard);
|
interruptService.assignInterrupt(Kernel::IntDispatcher::KEYBOARD, *this);
|
||||||
|
interruptService.allowInterrupt(PIC::KEYBOARD);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Keyboard::trigger() {
|
void Keyboard::trigger() {
|
||||||
|
|||||||
@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
#include "PIT.h"
|
#include "PIT.h"
|
||||||
#include "kernel/system/Globals.h"
|
#include "kernel/system/Globals.h"
|
||||||
|
#include "kernel/system/System.h"
|
||||||
|
#include "kernel/service/InterruptService.h"
|
||||||
|
|
||||||
namespace Device {
|
namespace Device {
|
||||||
|
|
||||||
@ -49,8 +51,9 @@ void PIT::plugin() {
|
|||||||
|
|
||||||
/* hier muss Code eingefuegt werden */
|
/* hier muss Code eingefuegt werden */
|
||||||
|
|
||||||
Kernel::intdis.assign(Kernel::IntDispatcher::timer, *this);
|
auto &interruptService = Kernel::System::getService<Kernel::InterruptService>();
|
||||||
PIC::allow(PIC::timer);
|
interruptService.assignInterrupt(Kernel::IntDispatcher::TIMER, *this);
|
||||||
|
interruptService.allowInterrupt(PIC::TIMER);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user