Added support for ghosting matrices and code for elimination.
To use define GHOST in matrix.h, see example in Scan/CK3
This commit is contained in:
parent
bba3ec8609
commit
953d5a407b
9 changed files with 712 additions and 1 deletions
|
@ -139,6 +139,16 @@ 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 -----
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue