]> git.donarmstrong.com Git - kiibohd-controller.git/blobdiff - Scan/MicroSwitch8304/scan_loop.c
Pre Tandy1000 overhaul
[kiibohd-controller.git] / Scan / MicroSwitch8304 / scan_loop.c
index 478a3348ea5d6e6db47ff34416bec1d79e2e95de..a378424d652b96fa0443617743f2f666b177c8b8 100644 (file)
@@ -94,6 +94,10 @@ inline void scan_setup()
 
        // Initially buffer doesn't need to be cleared (it's empty...)
        BufferReadyToClear = 0;
+
+       // Reset the keyboard before scanning, we might be in a wierd state
+       // Note: This should be run asap, but we need the USART setup to run this command on the 8304
+       scan_resetKeyboard();
 }
 
 
@@ -223,3 +227,10 @@ void scan_unlockKeyboard( void )
        SET_RESET();
 }
 
+// Reset Keyboard
+void scan_resetKeyboard( void )
+{
+       // Reset command for the 8304
+       scan_sendData( 0x92 );
+}
+