mirror of https://gitlab.com/nakst/essence
Merge branch 'ps2' into 'master'
ps2: Restart timer when starting configuration writes See merge request nakst/essence!14
This commit is contained in:
commit
f31f52c016
|
@ -566,12 +566,14 @@ void PS2::Initialise(KDevice *parentDevice) {
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
// Normal timeout may be exhausted, start a new one
|
||||||
|
KTimeout irqTimeout(1000);
|
||||||
WaitInputBuffer();
|
WaitInputBuffer();
|
||||||
ProcessorOut8(IO_PS2_COMMAND, PS2_READ_CONFIG);
|
ProcessorOut8(IO_PS2_COMMAND, PS2_READ_CONFIG);
|
||||||
uint8_t configurationByte = ReadByte(&timeout);
|
uint8_t configurationByte = ReadByte(&irqTimeout);
|
||||||
WaitInputBuffer();
|
WaitInputBuffer();
|
||||||
ProcessorOut8(IO_PS2_COMMAND, PS2_WRITE_CONFIG);
|
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) {
|
if (!registeredIRQs) {
|
||||||
|
|
Loading…
Reference in New Issue