mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-18 06:08:31 +03:00
cardem: Don't dispatch UART IRQs to possible NULL pointers
A given configuration might not expose callback functions for the UART interrupts.
This commit is contained in:
@@ -89,12 +89,14 @@ void USBDDriverCallbacks_ConfigurationChanged(uint8_t cfgnum)
|
|||||||
|
|
||||||
void USART1_IrqHandler(void)
|
void USART1_IrqHandler(void)
|
||||||
{
|
{
|
||||||
config_func_ptrs[simtrace_config].usart1_irq();
|
if (config_func_ptrs[simtrace_config].usart1_irq)
|
||||||
|
config_func_ptrs[simtrace_config].usart1_irq();
|
||||||
}
|
}
|
||||||
|
|
||||||
void USART0_IrqHandler(void)
|
void USART0_IrqHandler(void)
|
||||||
{
|
{
|
||||||
config_func_ptrs[simtrace_config].usart0_irq();
|
if (config_func_ptrs[simtrace_config].usart0_irq)
|
||||||
|
config_func_ptrs[simtrace_config].usart0_irq();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* returns '1' in case we should break any endless loop */
|
/* returns '1' in case we should break any endless loop */
|
||||||
|
|||||||
Reference in New Issue
Block a user