diff --git a/right/src/config.h b/right/src/config.h index 75e32d6..f5d3291 100644 --- a/right/src/config.h +++ b/right/src/config.h @@ -4,7 +4,6 @@ // Macros: #define I2C_WATCHDOG -// #define INTERRUPT_KEY_SCANNER // #define LED_DRIVER_STRESS_TEST #endif diff --git a/right/src/main.c b/right/src/main.c index 8181666..2861a44 100644 --- a/right/src/main.c +++ b/right/src/main.c @@ -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(); diff --git a/right/src/timer.c b/right/src/timer.c index 149b471..65a9672 100644 --- a/right/src/timer.c +++ b/right/src/timer.c @@ -1,7 +1,7 @@ #include "fsl_pit.h" #include "timer.h" -uint32_t CurrentTime = 1; +uint32_t CurrentTime; void PIT_TIMER_HANDLER(void) {