laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/30199 )
Change subject: firmware/sniffer: introduce #define for interrupt enable flags ...................................................................... firmware/sniffer: introduce #define for interrupt enable flags Change-Id: Id4bc720a1db31b4433ff7b10d7a57d0ddb7d7180 --- M firmware/libcommon/source/sniffer.c 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/99/30199/1 diff --git a/firmware/libcommon/source/sniffer.c b/firmware/libcommon/source/sniffer.c index 75c140c..35de58f 100644 --- a/firmware/libcommon/source/sniffer.c +++ b/firmware/libcommon/source/sniffer.c @@ -918,6 +918,8 @@ * Initialization routine *-----------------------------------------------------------------------------*/ +#define SNIFFER_IER (US_IER_RXRDY | US_IER_TIMEOUT) + /* Called during USB enumeration after device is enumerated by host */ void Sniffer_configure(void) { @@ -929,7 +931,7 @@ { TRACE_INFO("Sniffer exit\n\r"); /* Disable USART */ - USART_DisableIt(sniff_usart.base, US_IER_RXRDY | US_IER_TIMEOUT); + USART_DisableIt(sniff_usart.base, SNIFFER_IER); /* 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); @@ -965,7 +967,7 @@ /* Enable Receiver time-out to detect waiting time (WT) time-out (e.g. unresponsive cards) */ sniff_usart.base->US_RTOR = g_wt; /* Enable interrupt to indicate when data has been received or timeout occurred */ - USART_EnableIt(sniff_usart.base, US_IER_RXRDY | US_IER_TIMEOUT); + USART_EnableIt(sniff_usart.base, SNIFFER_IER); /* Set USB priority lower than USART to not miss sniffing data (both at 0 per default) */ if (NVIC_GetPriority(IRQ_USART_SIM) >= NVIC_GetPriority(UDP_IRQn)) { NVIC_SetPriority(UDP_IRQn, NVIC_GetPriority(IRQ_USART_SIM) + 2); -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/30199 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Id4bc720a1db31b4433ff7b10d7a57d0ddb7d7180 Gerrit-Change-Number: 30199 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <lafo...@osmocom.org> Gerrit-MessageType: newchange