mirror of https://gerrit.osmocom.org/simtrace2
card_emu_uart_interrupt: ASSERT if we get called with wrong uart_chan
This is what we do in all other functions, not sure why this one wants to silently ignore any such programming errors. Change-Id: I022eee86a5a3b5077abe59897161578ed960f1b1
This commit is contained in:
parent
20bc014b82
commit
8680677256
|
@ -410,10 +410,9 @@ void card_emu_uart_reset_wt(uint8_t uart_chan)
|
||||||
/* call-back from card_emu.c to force a USART interrupt */
|
/* call-back from card_emu.c to force a USART interrupt */
|
||||||
void card_emu_uart_interrupt(uint8_t uart_chan)
|
void card_emu_uart_interrupt(uint8_t uart_chan)
|
||||||
{
|
{
|
||||||
|
OSMO_ASSERT(uart_chan < ARRAY_SIZE(cardem_inst));
|
||||||
Usart *usart = get_usart_by_chan(uart_chan);
|
Usart *usart = get_usart_by_chan(uart_chan);
|
||||||
if (!usart) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (USART0 == usart) {
|
if (USART0 == usart) {
|
||||||
NVIC_SetPendingIRQ(USART0_IRQn);
|
NVIC_SetPendingIRQ(USART0_IRQn);
|
||||||
} else if (USART1 == usart) {
|
} else if (USART1 == usart) {
|
||||||
|
|
Loading…
Reference in New Issue