pub unsafe extern "C" fn uart_irq_callback_user_data_set(
dev: *const device,
cb: Option<unsafe extern "C" fn(*const device, *mut c_void)>,
user_data: *mut c_void,
) -> i32Expand description
@brief Set the IRQ callback function pointer.
This sets up the callback for IRQ. When an IRQ is triggered, the specified function will be called with specified user data. See description of uart_irq_update() for the requirements on ISR.
@param dev UART device instance. @param cb Pointer to the callback function. @param user_data Data to pass to callback function.
@retval 0 On success. @retval -ENOSYS If this function is not implemented. @retval -ENOTSUP If API is not enabled.