]> git.donarmstrong.com Git - kiibohd-controller.git/blobdiff - Scan/MatrixARM/matrix_scan.h
Merge pull request #93 from cryham/master
[kiibohd-controller.git] / Scan / MatrixARM / matrix_scan.h
index 810e6d9ddee0146a1f8a580ecb21750003aa3fb1..8b9cee79ee19684c844e6877641cdb405f5227bc 100644 (file)
@@ -139,6 +139,18 @@ typedef struct KeyState {
        uint8_t         prevDecisionTime;
 } __attribute__((packed)) KeyState;
 
+// Ghost Element, after ghost detection/cancelation
+typedef struct KeyGhost {
+       KeyPosition     prev;
+       KeyPosition     cur;
+       KeyPosition     saved;  // state before ghosting
+} __attribute__((packed)) KeyGhost;
+
+// utility
+inline uint8_t keyOn(/*KeyPosition*/uint8_t st)
+{
+       return (st == KeyState_Press || st == KeyState_Hold) ? 1 : 0;
+}
 
 
 // ----- Functions -----