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:
|
// Macros:
|
||||||
|
|
||||||
#define I2C_WATCHDOG
|
#define I2C_WATCHDOG
|
||||||
// #define INTERRUPT_KEY_SCANNER
|
|
||||||
// #define LED_DRIVER_STRESS_TEST
|
// #define LED_DRIVER_STRESS_TEST
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -22,14 +22,10 @@
|
|||||||
|
|
||||||
void updateUsbReports(void)
|
void updateUsbReports(void)
|
||||||
{
|
{
|
||||||
if (!IsUsbBasicKeyboardReportSent) {
|
if (!IsUsbBasicKeyboardReportSent || !IsUsbMediaKeyboardReportSent || /*!IsUsbSystemKeyboardReportSent ||*/ !IsUsbMouseReportSent) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef INTERRUPT_KEY_SCANNER
|
|
||||||
KeyMatrix_Scan(&RightKeyMatrix);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ResetActiveUsbBasicKeyboardReport();
|
ResetActiveUsbBasicKeyboardReport();
|
||||||
ResetActiveUsbMediaKeyboardReport();
|
ResetActiveUsbMediaKeyboardReport();
|
||||||
ResetActiveUsbSystemKeyboardReport();
|
ResetActiveUsbSystemKeyboardReport();
|
||||||
@@ -43,6 +39,9 @@ void updateUsbReports(void)
|
|||||||
SwitchActiveUsbMouseReport();
|
SwitchActiveUsbMouseReport();
|
||||||
|
|
||||||
IsUsbBasicKeyboardReportSent = false;
|
IsUsbBasicKeyboardReportSent = false;
|
||||||
|
IsUsbMediaKeyboardReportSent = false;
|
||||||
|
IsUsbSystemKeyboardReportSent = false;
|
||||||
|
IsUsbMouseReportSent = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsEepromInitialized = false;
|
bool IsEepromInitialized = false;
|
||||||
@@ -74,9 +73,7 @@ void main(void)
|
|||||||
} else {
|
} else {
|
||||||
InitSlaveScheduler();
|
InitSlaveScheduler();
|
||||||
KeyMatrix_Init(&RightKeyMatrix);
|
KeyMatrix_Init(&RightKeyMatrix);
|
||||||
#ifdef INTERRUPT_KEY_SCANNER
|
|
||||||
InitKeyScanner();
|
InitKeyScanner();
|
||||||
#endif
|
|
||||||
updateUsbReports();
|
updateUsbReports();
|
||||||
InitUsb();
|
InitUsb();
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "fsl_pit.h"
|
#include "fsl_pit.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
uint32_t CurrentTime = 1;
|
uint32_t CurrentTime;
|
||||||
|
|
||||||
void PIT_TIMER_HANDLER(void)
|
void PIT_TIMER_HANDLER(void)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user