mirror of https://gitlab.com/nakst/essence
ps2: Restart timer when starting configuration writes
Main timeout may be expired e.g. due to mouse config problem yet we still need to configure interrupts. Hence start a new timer
This commit is contained in:
parent
0a70170952
commit
5250afa00f
|
@ -566,12 +566,14 @@ void PS2::Initialise(KDevice *parentDevice) {
|
|||
}
|
||||
|
||||
{
|
||||
// Normal timeout may be exhausted, start a new one
|
||||
KTimeout irqTimeout(1000);
|
||||
WaitInputBuffer();
|
||||
ProcessorOut8(IO_PS2_COMMAND, PS2_READ_CONFIG);
|
||||
uint8_t configurationByte = ReadByte(&timeout);
|
||||
uint8_t configurationByte = ReadByte(&irqTimeout);
|
||||
WaitInputBuffer();
|
||||
ProcessorOut8(IO_PS2_COMMAND, PS2_WRITE_CONFIG);
|
||||
WriteByte(&timeout, configurationByte | PS2_FIRST_IRQ_MASK | PS2_SECOND_IRQ_MASK);
|
||||
WriteByte(&irqTimeout, configurationByte | PS2_FIRST_IRQ_MASK | PS2_SECOND_IRQ_MASK);
|
||||
}
|
||||
|
||||
if (!registeredIRQs) {
|
||||
|
|
Loading…
Reference in New Issue