changed I2C watchdog timer implementation, as LPTMR was already used by key scanner

This commit is contained in:
Erich Styger
2017-12-25 17:15:41 +01:00
parent 5581dd26b5
commit 7eb83173ed
4 changed files with 33 additions and 27 deletions

View File

@@ -1,10 +1,16 @@
#include "fsl_lptmr.h"
#include "key_scanner.h"
#include "main.h"
#if KEY_USE_I2C_WATCHDOG_TIMER
#include "i2c_watchdog.h"
#endif
void KEY_SCANNER_HANDLER(void)
{
KeyMatrix_ScanRow(&keyMatrix);
#if KEY_USE_I2C_WATCHDOG_TIMER
RunWatchdog();
#endif
LPTMR_ClearStatusFlags(KEY_SCANNER_LPTMR_BASEADDR, kLPTMR_TimerCompareFlag);
}