+// Local Includes
+#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_KEYS + 1];
+ static const uint8_t KeyIndex_Size = KEYBOARD_KEYS;
+
+extern volatile uint8_t KeyIndex_Buffer[KEYBOARD_BUFFER];
+extern volatile uint8_t KeyIndex_BufferUsed;
+extern volatile uint8_t KeyIndex_Add_InputSignal;
+
+
+
+// ----- Functions -----
+
+void Scan_setup( void );
+uint8_t Scan_loop( void );
+
+// Callbacks from the Macro and Output modules (useful with difficult protocols)
+void Scan_finishedWithBuffer( uint8_t sentKeys );
+void Scan_finishedWithUSBBuffer( uint8_t sentKeys );