Use interrupt based keyboard matrix scanning for the right keyboard half. Get rid of INTERRUPT_KEY_SCANNER
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
// Macros:
|
||||
|
||||
#define I2C_WATCHDOG
|
||||
// #define INTERRUPT_KEY_SCANNER
|
||||
// #define LED_DRIVER_STRESS_TEST
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,14 +22,10 @@
|
||||
|
||||
void updateUsbReports(void)
|
||||
{
|
||||
if (!IsUsbBasicKeyboardReportSent) {
|
||||
if (!IsUsbBasicKeyboardReportSent || !IsUsbMediaKeyboardReportSent || /*!IsUsbSystemKeyboardReportSent ||*/ !IsUsbMouseReportSent) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef INTERRUPT_KEY_SCANNER
|
||||
KeyMatrix_Scan(&RightKeyMatrix);
|
||||
#endif
|
||||
|
||||
ResetActiveUsbBasicKeyboardReport();
|
||||
ResetActiveUsbMediaKeyboardReport();
|
||||
ResetActiveUsbSystemKeyboardReport();
|
||||
@@ -43,6 +39,9 @@ void updateUsbReports(void)
|
||||
SwitchActiveUsbMouseReport();
|
||||
|
||||
IsUsbBasicKeyboardReportSent = false;
|
||||
IsUsbMediaKeyboardReportSent = false;
|
||||
IsUsbSystemKeyboardReportSent = false;
|
||||
IsUsbMouseReportSent = false;
|
||||
}
|
||||
|
||||
bool IsEepromInitialized = false;
|
||||
@@ -74,9 +73,7 @@ void main(void)
|
||||
} else {
|
||||
InitSlaveScheduler();
|
||||
KeyMatrix_Init(&RightKeyMatrix);
|
||||
#ifdef INTERRUPT_KEY_SCANNER
|
||||
InitKeyScanner();
|
||||
#endif
|
||||
updateUsbReports();
|
||||
InitUsb();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "fsl_pit.h"
|
||||
#include "timer.h"
|
||||
|
||||
uint32_t CurrentTime = 1;
|
||||
uint32_t CurrentTime;
|
||||
|
||||
void PIT_TIMER_HANDLER(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user