diff --git a/right/src/i2c_watchdog.c b/right/src/i2c_watchdog.c index 429e623..bcf1062 100644 --- a/right/src/i2c_watchdog.c +++ b/right/src/i2c_watchdog.c @@ -36,7 +36,7 @@ void InitI2cWatchdog(void) pit_config_t pitConfig; PIT_GetDefaultConfig(&pitConfig); PIT_Init(PIT, &pitConfig); - PIT_SetTimerPeriod(PIT, kPIT_Chnl_0, USEC_TO_COUNT(100000U, PIT_SOURCE_CLOCK)); + PIT_SetTimerPeriod(PIT, kPIT_Chnl_0, USEC_TO_COUNT(I2C_WATCHDOG_INTERVAL_USEC, PIT_SOURCE_CLOCK)); PIT_EnableInterrupts(PIT, kPIT_Chnl_0, kPIT_TimerInterruptEnable); EnableIRQ(PIT_I2C_WATCHDOG_IRQ_ID); PIT_StartTimer(PIT, kPIT_Chnl_0); diff --git a/right/src/i2c_watchdog.h b/right/src/i2c_watchdog.h index 9d0fb4b..756a306 100644 --- a/right/src/i2c_watchdog.h +++ b/right/src/i2c_watchdog.h @@ -3,6 +3,8 @@ // Macros: + #define I2C_WATCHDOG_INTERVAL_USEC 100000 + #define PIT_I2C_WATCHDOG_HANDLER PIT0_IRQHandler #define PIT_I2C_WATCHDOG_IRQ_ID PIT0_IRQn #define PIT_SOURCE_CLOCK CLOCK_GetFreq(kCLOCK_BusClk)