From 435a1d334177c8ca8d5a15228c66df4f36c913cb Mon Sep 17 00:00:00 2001 From: tmk Date: Wed, 28 Sep 2016 18:31:22 +0900 Subject: [PATCH] ps2_usb: Fix set led status at startup --- converter/ps2_usb/matrix.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/converter/ps2_usb/matrix.c b/converter/ps2_usb/matrix.c index 45cf2a4a..24b29ed3 100644 --- a/converter/ps2_usb/matrix.c +++ b/converter/ps2_usb/matrix.c @@ -22,6 +22,8 @@ along with this program. If not, see . #include "util.h" #include "debug.h" #include "ps2.h" +#include "host.h" +#include "led.h" #include "matrix.h" @@ -215,6 +217,12 @@ uint8_t matrix_scan(void) print("Overrun\n"); state = INIT; break; + case 0xAA: // Self-test passed + case 0xFC: // Self-test failed + printf("BAT %s\n", (code == 0xAA) ? "OK" : "NG"); + led_set(host_keyboard_leds()); + state = INIT; + break; default: // normal key make if (code < 0x80) { matrix_make(code); -- 2.46.2