tests pcspkr
This commit is contained in:
parent
fbccfab642
commit
58caff5eaa
|
@ -87,16 +87,9 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg)
|
||||||
|
|
||||||
IoPrintRtcTime();
|
IoPrintRtcTime();
|
||||||
|
|
||||||
KernLog("There was %d ticks\n", IoGetRtcTicks());
|
|
||||||
|
|
||||||
int *var = 7 * GB;
|
|
||||||
*var = 1;
|
|
||||||
|
|
||||||
|
|
||||||
IoDoBeep();
|
IoDoBeep();
|
||||||
|
|
||||||
KernLog("Goodbye at %s\n", IoGetRtcTimeChar());
|
KernLog("Goodbye at %s\n", IoGetRtcTimeChar());
|
||||||
|
|
||||||
// End this machine's suffering
|
// End this machine's suffering
|
||||||
BStdOut->flusher(BStdOut);
|
BStdOut->flusher(BStdOut);
|
||||||
KeCrashSystem();
|
KeCrashSystem();
|
||||||
|
|
|
@ -48,13 +48,16 @@ void IoQuietSpeaker(void)
|
||||||
|
|
||||||
void IoDoBeep(void)
|
void IoDoBeep(void)
|
||||||
{
|
{
|
||||||
|
ulong flags = KePauseIRQs();
|
||||||
IoStartSpeaker(1000);
|
IoStartSpeaker(1000);
|
||||||
|
KeRestoreIRQs(flags);
|
||||||
|
|
||||||
// Worst possible way of waiting
|
// Worst possible way of waiting
|
||||||
// We need actual timers
|
// We need actual timers
|
||||||
ulong ticks = IoGetRtcTicks();
|
ulong ticks = IoGetRtcTicks();
|
||||||
while (IoGetRtcTicks() < ticks + 1024);
|
while (IoGetRtcTicks() < ticks + 2*1024);
|
||||||
|
|
||||||
IoQuietSpeaker();
|
IoQuietSpeaker();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue