]> git.donarmstrong.com Git - kiibohd-controller.git/blobdiff - Scan/matrix/scan_loop.h
Adding API changes introduced by the FACOM converter
[kiibohd-controller.git] / Scan / matrix / scan_loop.h
index d9ad06ccd0c39634c8ed5a347c7df6f817e12853..c0f7aa31da6bb67a73e3515f823d5c23f88840ff 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 by Jacob Alexander
+/* Copyright (C) 2011-2012 by Jacob Alexander
  * 
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
 
 // ----- 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;
+extern volatile     uint8_t KeyIndex_Add_InputSignal;
 
 
 
 // ----- Functions -----
 
-void scan_loop( void );
+void scan_setup( void );
+uint8_t scan_loop( void );
+
+
+// Functions available to macro.c
+uint8_t scan_sendData( uint8_t dataPayload );
+
+void scan_finishedWithBuffer( uint8_t sentKeys );
+void scan_finishedWithUSBBuffer( uint8_t sentKeys );
+void scan_lockKeyboard( void );
+void scan_unlockKeyboard( void );
+void scan_resetKeyboard( void );
+
 
 #endif // __SCAN_LOOP_H