IRDA: fix NVIC setup (#592)

LF-RFID uses HAL functions to deinit TIM2, which also
disables NVIC for TIM2.

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Albert Kharisov 2021-07-20 20:44:16 +03:00 committed by GitHub
parent f25d000d53
commit b886ae17b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,6 +123,9 @@ void api_hal_irda_rx_irq_init(void) {
LL_TIM_SetCounter(TIM2, 0); LL_TIM_SetCounter(TIM2, 0);
LL_TIM_EnableCounter(TIM2); LL_TIM_EnableCounter(TIM2);
NVIC_SetPriority(TIM2_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(),5, 0));
NVIC_EnableIRQ(TIM2_IRQn);
} }
void api_hal_irda_rx_irq_deinit(void) { void api_hal_irda_rx_irq_deinit(void) {