Skip to content

Commit

Permalink
firmware/sniffer: Disable TIMEOUT interrupts in USART IER on exit
Browse files Browse the repository at this point in the history
Not critical (we disable the USART interrupts in NVIC anyway), but
if Sniffer_init() enables this flag, it's good style for Sniffer_exit()
to disable it.

Change-Id: I92e16a160d60fcab33c81e0cf074088b9f20b9ae
  • Loading branch information
laf0rge committed Nov 19, 2022
1 parent 3812317 commit 4237c99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion firmware/libcommon/source/sniffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ void Sniffer_exit(void)
{
TRACE_INFO("Sniffer exit\n\r");
/* Disable USART */
USART_DisableIt(sniff_usart.base, US_IER_RXRDY);
USART_DisableIt(sniff_usart.base, US_IER_RXRDY | US_IER_TIMEOUT);
/* NOTE: don't forget to set the IRQ according to the USART peripheral used */
NVIC_DisableIRQ(IRQ_USART_SIM);
USART_SetReceiverEnabled(sniff_usart.base, 0);
Expand Down

0 comments on commit 4237c99

Please sign in to comment.