From 16acb64b783f30f6baabb44cc1e5b03298451a36 Mon Sep 17 00:00:00 2001 From: Eirik Stople Date: Sun, 26 May 2024 22:32:51 +0200 Subject: [PATCH] Disable PS2 reception when power supply is off (maybe not necessary) This was added as I saw some strange incomming bytes when doing ctrl-alt- delete. They were gone after this and the previous change, not sure which commit fixed the problem. --- ps2.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ps2.h b/ps2.h index fa5800a..08afc8f 100644 --- a/ps2.h +++ b/ps2.h @@ -438,6 +438,10 @@ class PS2KeyboardPort : public PS2Port Processes a scan code byte received from the keyboard */ void processByteReceived(uint8_t value) { + + // Power off: Do not add anything to buffer + if (PWR_ON_active() == false) return; + // Handle BAT success (0xaa) or fail (0xfc) code if (!keyboardIsReady() && (value == 0xaa || value == 0xfc)) { bat = value;