Corrected my bad grammar
This commit is contained in:
parent
13a1395fb7
commit
c58f5d236a
|
@ -216,9 +216,9 @@ ulong IoGetRtcTicks(void)
|
|||
void IoEnableRtc(void)
|
||||
{
|
||||
ulong flags = KePauseIRQs();
|
||||
char readedInterruptConfig;
|
||||
char readedRegister;
|
||||
char readedIrqs;
|
||||
char readInterruptConfig;
|
||||
char readRegister;
|
||||
char readIrqs;
|
||||
|
||||
IdtRegisterIrq(RtcHandler, 0x28, 0x8E);
|
||||
|
||||
|
@ -227,22 +227,22 @@ void IoEnableRtc(void)
|
|||
32768 >> (RtcRate-1));
|
||||
|
||||
IoWriteByteOnPort(0x70, 0x8B);
|
||||
readedRegister = IoReadByteFromPort(0x71);
|
||||
readRegister = IoReadByteFromPort(0x71);
|
||||
IoWriteByteOnPort(0x70, 0x8B); // Because reading flushes
|
||||
IoWriteByteOnPort(0x71, readedRegister | 0x40);
|
||||
IoWriteByteOnPort(0x71, readRegister | 0x40);
|
||||
|
||||
IoWriteByteOnPort(0x70, 0x8A);
|
||||
readedInterruptConfig = IoReadByteFromPort(0x71);
|
||||
readInterruptConfig = IoReadByteFromPort(0x71);
|
||||
IoWriteByteOnPort(0x70, 0x8A); // Because reading flushes
|
||||
IoWriteByteOnPort(0x71, (readedInterruptConfig & 0xF0) | RtcRate);
|
||||
IoWriteByteOnPort(0x71, (readInterruptConfig & 0xF0) | RtcRate);
|
||||
IoWriteByteOnPort(0x70, 0x0C);
|
||||
IoReadByteFromPort(0x71); // Flush
|
||||
|
||||
// Setting up the IRQs
|
||||
readedIrqs = IoReadByteFromPort(0xA1);
|
||||
IoWriteByteOnPort(0xA1, 0xFE & readedIrqs); // Enables IRQ on PIC 2
|
||||
readedIrqs = IoReadByteFromPort(0x21);
|
||||
IoWriteByteOnPort(0x21, 0xFB & readedIrqs); // Enables IRQ on PIC 1
|
||||
readIrqs = IoReadByteFromPort(0xA1);
|
||||
IoWriteByteOnPort(0xA1, 0xFE & readIrqs); // Enables IRQ on PIC 2
|
||||
readIrqs = IoReadByteFromPort(0x21);
|
||||
IoWriteByteOnPort(0x21, 0xFB & readIrqs); // Enables IRQ on PIC 1
|
||||
|
||||
// Clean-up
|
||||
IoWriteByteOnPort(0x70, 0x0C); // Select status reg C
|
||||
|
|
Loading…
Reference in New Issue