]> git.donarmstrong.com Git - kiibohd-controller.git/blobdiff - Scan/Tandy1000/scan_loop.h
Updating AVR abstraction to be compatible with ARM, nearly ready for ARM files
[kiibohd-controller.git] / Scan / Tandy1000 / scan_loop.h
index 10b6fbce76d76644a0ae523be2a5f6ff67d02cea..b2905054ef2a40311539b1920900f592b76a8708 100644 (file)
 
 // ----- Defines -----
 
-#define KEYBOARD_SIZE 0x5A // 90 - Size of the array space for the keyboardr(max index)
+#define KEYBOARD_KEYS 0x5A // 90 - Size of the array space for the keyboardr(max index)
+#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 -----
 
+// Functions used by main.c
 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