Skip to main content

uart_irq_is_pending

Function uart_irq_is_pending 

Source
pub unsafe extern "C" fn uart_irq_is_pending(
    dev: *const device,
) -> i32
Expand description

@brief Check if any IRQs is pending.

This function must be called in a UART interrupt handler, or its result is undefined. Before calling this function in the interrupt handler, uart_irq_update() must be called otherwise its result may be outdated.

@param dev UART device instance.

@retval 1 If an IRQ is pending. @retval 0 If an IRQ is not pending. @retval -ENOSYS If this function is not implemented. @retval -ENOTSUP If API is not enabled.