Update drivers after the new DAPI

This commit is contained in:
Alex
2023-03-23 20:46:35 +02:00
parent a3769735bc
commit 31c0898bff
12 changed files with 304 additions and 253 deletions

View File

@ -3,6 +3,7 @@
extern "C" int DriverEntry(void *Data);
int CallbackHandler(KernelCallback *Data);
int InterruptCallback(CPURegisters *Registers);
/* The driver is
* This is a driver for Fennix Driver Entry Extended Header
@ -18,10 +19,11 @@ __attribute__((section(".extended"))) FexExtended ExtendedHeader = {
.Name = "Example Driver",
.Type = FexDriverType_Generic,
.Callback = CallbackHandler,
.InterruptCallback = InterruptCallback,
.Bind = {
.Type = BIND_INTERRUPT,
.Interrupt = {
.Vector = {0xFF},
.Vector = {222}, // IRQ222
}}}};
// Global variable that holds the kernel API
@ -61,11 +63,6 @@ int CallbackHandler(KernelCallback *Data)
print("Kernel acknowledged the driver.");
break;
}
case InterruptReason:
{
print("Interrupt received.");
break;
}
case StopReason:
{
print("Driver stopped.");
@ -79,3 +76,9 @@ int CallbackHandler(KernelCallback *Data)
}
return OK;
}
int InterruptCallback(CPURegisters *)
{
print("Interrupt received.");
return OK;
}