zephyr::raw

Function gpio_remove_callback

source
pub unsafe extern "C" fn gpio_remove_callback(
    port: *const device,
    callback: *mut gpio_callback,
) -> i32
Expand description

@brief Remove an application callback. @param port Pointer to the device structure for the driver instance. @param callback A valid application’s callback structure pointer. @retval 0 If successful @retval -ENOSYS If driver does not implement the operation @retval -errno Other negative errno code on failure.

@warning It is explicitly permitted, within a callback handler, to remove the registration for the callback that is running, i.e. @p callback. Attempts to remove other registrations on the same device may result in undefined behavior, including failure to invoke callbacks that remain registered and unintended invocation of removed callbacks.

Note: enables to remove as many callbacks as added through gpio_add_callback().