From 7d36183103cf012fe4d5d9ce07d0c470420a5a6b Mon Sep 17 00:00:00 2001 From: Niels Moseley Date: Fri, 9 Feb 2018 00:57:45 +0100 Subject: [PATCH] some more ps/2 code cleanup --- rtl/ps2keyboard/ps2keyboard.v | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/rtl/ps2keyboard/ps2keyboard.v b/rtl/ps2keyboard/ps2keyboard.v index 4bb3149..cc4449f 100644 --- a/rtl/ps2keyboard/ps2keyboard.v +++ b/rtl/ps2keyboard/ps2keyboard.v @@ -51,8 +51,6 @@ module ps2keyboard ( reg shift; // state of the shift key reg [2:0] cur_state; reg [2:0] next_state; - reg [15:0] debounce_timer; - debounce ps2clk_debounce ( @@ -231,7 +229,12 @@ module ps2keyboard ( 8'h41: ascii <= ","; 8'h49: ascii <= "."; 8'h4A: ascii <= "/"; - default: ascii <= "."; + default: + // unsupported key! + begin + ascii_rdy <= 1'b0; // shift is not a key! + ascii <= " "; + end endcase else // Here, we're in a shifted state @@ -288,7 +291,12 @@ module ps2keyboard ( 8'h41: ascii <= "<"; 8'h49: ascii <= ">"; 8'h4A: ascii <= "?"; - default: ascii <= "."; + default: + // unsupported key! + begin + ascii_rdy <= 1'b0; // shift is not a key! + ascii <= " "; + end endcase end end