mirror of
https://gitlab.os-k.eu/os-k-team/os-k.git
synced 2023-08-25 14:03:10 +02:00
Correcting spkr init
This commit is contained in:
parent
050f795b39
commit
6c5efc6044
@ -31,6 +31,7 @@ void IoStartSpeaker(int freq)
|
||||
char temp;
|
||||
int pitf = 1193180 / freq;
|
||||
|
||||
ulong flags = KePauseIRQs();
|
||||
IoWriteByteOnPort(0x43, 0xB6);
|
||||
IoWriteByteOnPort(0x42, (char)pitf);
|
||||
IoWriteByteOnPort(0x42, (char)(pitf >> 8));
|
||||
@ -39,6 +40,7 @@ void IoStartSpeaker(int freq)
|
||||
if (temp != (temp | 3)) {
|
||||
IoWriteByteOnPort(0x61, temp | 3);
|
||||
}
|
||||
KeRestoreIRQs(flags);
|
||||
}
|
||||
|
||||
void IoQuietSpeaker(void)
|
||||
@ -48,9 +50,8 @@ void IoQuietSpeaker(void)
|
||||
|
||||
void IoDoBeep(void)
|
||||
{
|
||||
ulong flags = KePauseIRQs();
|
||||
|
||||
IoStartSpeaker(1000);
|
||||
KeRestoreIRQs(flags);
|
||||
|
||||
// Worst possible way of waiting
|
||||
// We need actual timers
|
||||
|
Loading…
Reference in New Issue
Block a user