MXRT: Update the LPTimer driver

1. Run in doze mode
2. Add implementation for free function

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
pull/12095/head
Mahesh Mahadevan 2019-10-28 17:56:53 -05:00
parent 4efbe621e2
commit 2d32e43713
1 changed files with 3 additions and 1 deletions

View File

@ -52,6 +52,7 @@ void lp_ticker_init(void)
gptConfig.clockSource = kGPT_ClockSource_LowFreq;
gptConfig.enableFreeRun = true;
gptConfig.enableMode = false;
gptConfig.enableRunInDoze = true;
GPT_Init(GPT2, &gptConfig);
GPT_EnableInterrupts(GPT2, kGPT_OutputCompare1InterruptEnable);
@ -114,7 +115,8 @@ void lp_ticker_clear_interrupt(void)
void lp_ticker_free(void)
{
GPT_DisableInterrupts(GPT2, kGPT_OutputCompare1InterruptEnable);
NVIC_DisableIRQ(GPT2_IRQn);
}
#endif /* DEVICE_LPTICKER */