Drop C wrappers and switch to C++ API
Some checks failed
Builds / ExectOS (amd64, debug) (push) Successful in 36s
Builds / ExectOS (amd64, release) (push) Successful in 34s
Builds / ExectOS (i686, debug) (push) Failing after 23s
Builds / ExectOS (i686, release) (push) Failing after 21s

This commit is contained in:
2025-09-19 12:56:06 +02:00
parent b2c8fa3e62
commit e7425de523
32 changed files with 441 additions and 492 deletions

View File

@@ -30,8 +30,8 @@ Beep::DisableToneBeep()
UCHAR Status;
/* Stop the PC speaker */
Status = HlReadPort8(0x61);
HlWritePort8(0x61, Status & 0xFC);
Status = XtLdrProtocol->IoPort.Read8(0x61);
XtLdrProtocol->IoPort.Write8(0x61, Status & 0xFC);
}
/**
@@ -63,14 +63,14 @@ Beep::EnableToneBeep(IN UINT Pitch)
/* Set the desired frequency of the PIT clock */
Counter = 0x1234DD / Pitch;
HlWritePort8(0x43, 0xB6);
HlWritePort8(0x43, 0xB6);
HlWritePort8(0x42, (UCHAR) Counter & 0xFF);
HlWritePort8(0x42, (UCHAR) (Counter >> 8) & 0xFF);
XtLdrProtocol->IoPort.Write8(0x43, 0xB6);
XtLdrProtocol->IoPort.Write8(0x43, 0xB6);
XtLdrProtocol->IoPort.Write8(0x42, (UCHAR) Counter & 0xFF);
XtLdrProtocol->IoPort.Write8(0x42, (UCHAR) (Counter >> 8) & 0xFF);
/* Start the PC speaker */
Status = HlReadPort8(0x61);
HlWritePort8(0x61, Status | 0x03);
Status = XtLdrProtocol->IoPort.Read8(0x61);
XtLdrProtocol->IoPort.Write8(0x61, Status | 0x03);
}
/**
@@ -133,7 +133,7 @@ Beep::PlayTune(IN PWCHAR Arguments)
Tempo = -1;
/* Tokenize provided list of arguments */
Argument = RtlTokenizeWideString(Arguments, L" ", &LastArgument);
Argument = XtLdrProtocol->WideString.Tokenize(Arguments, L" ", &LastArgument);
/* Iterate over all arguments */
while(Argument != NULLPTR)
@@ -175,7 +175,7 @@ Beep::PlayTune(IN PWCHAR Arguments)
}
/* Get next argument */
Argument = RtlTokenizeWideString(NULLPTR, L" ", &LastArgument);
Argument = XtLdrProtocol->WideString.Tokenize(NULLPTR, L" ", &LastArgument);
}
/* Stop emitting beep tone */