Instead of scanning the keyboard matrix from the main loop and utilizing busy loops, try to use a PIT interrupt handler to do the same thing, scanning one row per interrupt call without busy loops.

For some reason, this makes the movement of the mouse pointer very slow and makes it jump from time to time, so I ended up adding INTERRUPT_KEY_SCANNER and disabling the timer interrupt.
Also double bufferred the mouse report just like the others. Unfortunately this does not affect this issue.
This commit is contained in:
László Monda
2017-11-02 01:11:41 +01:00
parent 024f24f489
commit 00dfd96d55
15 changed files with 157 additions and 43 deletions

View File

@@ -22,6 +22,7 @@
typedef struct {
uint8_t colNum;
uint8_t rowNum;
uint8_t currentRowNum;
key_matrix_pin_t *cols;
key_matrix_pin_t *rows;
uint8_t keyStates[MAX_KEYS_IN_MATRIX];
@@ -31,5 +32,6 @@
void KeyMatrix_Init(key_matrix_t *keyMatrix);
void KeyMatrix_Scan(key_matrix_t *keyMatrix);
void KeyMatrix_ScanRow(key_matrix_t *keyMatrix);
#endif