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();
|
||||
|
||||
KernLog("There was %d ticks\n", IoGetRtcTicks());
|
||||
|
||||
int *var = 7 * GB;
|
||||
*var = 1;
|
||||
|
||||
|
||||
IoDoBeep();
|
||||
|
||||
KernLog("Goodbye at %s\n", IoGetRtcTimeChar());
|
||||
|
||||
// End this machine's suffering
|
||||
BStdOut->flusher(BStdOut);
|
||||
KeCrashSystem();
|
||||
|
|
|
@ -48,13 +48,16 @@ void IoQuietSpeaker(void)
|
|||
|
||||
void IoDoBeep(void)
|
||||
{
|
||||
ulong flags = KePauseIRQs();
|
||||
IoStartSpeaker(1000);
|
||||
KeRestoreIRQs(flags);
|
||||
|
||||
// Worst possible way of waiting
|
||||
// We need actual timers
|
||||
ulong ticks = IoGetRtcTicks();
|
||||
while (IoGetRtcTicks() < ticks + 1024);
|
||||
while (IoGetRtcTicks() < ticks + 2*1024);
|
||||
|
||||
IoQuietSpeaker();
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue