]> git.donarmstrong.com Git - kiibohd-controller.git/blobdiff - Scan/matrix/scan_loop.h
Pre Tandy1000 overhaul
[kiibohd-controller.git] / Scan / matrix / scan_loop.h
index ec79bd16c8ca9fcc22ccb9770a8fda4a9abe7ea8..3897c9cab935cf267bf61e2697aa91f4a5008148 100644 (file)
 
 // ----- Includes -----
 
+// Compiler Includes
+#include <stdint.h>
+
 // Local Includes
-#include "matrix.h"
+#include "matrix_scan.h"
+
+// Matrix Configuration
+#include <matrix.h>
+
+
+
+// ----- Defines -----
+
+#define KEYBOARD_BUFFER 24 // Max number of key signals to buffer
+
+
+
+// ----- Variables -----
+
+// NOTE: Highest Bit: Valid keypress (0x80 is valid keypress)
+//        Other Bits: Pressed state sample counter
+extern                       uint8_t KeyIndex_Array [KEYBOARD_SIZE + 1];
+                static const uint8_t KeyIndex_Size = KEYBOARD_SIZE;
+
+extern volatile              uint8_t KeyIndex_Buffer[KEYBOARD_BUFFER];
+extern volatile              uint8_t KeyIndex_BufferUsed;
 
 
 
 // ----- Functions -----
 
 void scan_setup( void );
-void scan_loop( void );
+uint8_t scan_loop( void );
 
 #endif // __SCAN_LOOP_H