Set the left KEY_SCANNER_INTERVAL_USEC to 1000 / KEYBOARD_MATRIX_ROWS_NUM

This commit is contained in:
László Monda
2017-11-14 13:08:01 +01:00
parent f63f2f9b96
commit 9e18caa0ba
2 changed files with 6 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ void InitKeyScanner(void)
LPTMR_GetDefaultConfig(&lptmrConfig);
LPTMR_Init(KEY_SCANNER_LPTMR_BASEADDR, &lptmrConfig);
LPTMR_SetTimerPeriod(KEY_SCANNER_LPTMR_BASEADDR, MSEC_TO_COUNT(KEY_SCANNER_INTERVAL_MSEC, LPTMR_SOURCE_CLOCK));
LPTMR_SetTimerPeriod(KEY_SCANNER_LPTMR_BASEADDR, USEC_TO_COUNT(KEY_SCANNER_INTERVAL_USEC, LPTMR_SOURCE_CLOCK));
LPTMR_EnableInterrupts(KEY_SCANNER_LPTMR_BASEADDR, kLPTMR_TimerInterruptEnable);
EnableIRQ(KEY_SCANNER_LPTMR_IRQ_ID);
LPTMR_StartTimer(KEY_SCANNER_LPTMR_BASEADDR);