riot_sys::bindgen

Function ble_hs_stop

Source
pub unsafe extern "C" fn ble_hs_stop(
    listener: *mut ble_hs_stop_listener,
    fn_: ble_hs_stop_fn,
    arg: *mut c_void,
) -> c_int
Expand description

@brief Stops the BLE host.

Aborts all active GAP procedures and terminates all open connections. Connection termination is performed asynchronously, so this function’s result is reported via the provided listener.

@param listener A listener to populate. This object’s initial value doesn’t matter, but its lifetime must extend until the stop procedure completes. @param fn The callback to execute when the stop procedure completes. @param arg Optional argument to pass to the callback.

@return 0: Stop procedure successfully initiated. BLE_HS_EBUSY: Stop procedure already in progress; the provided callback gets called when the procedure completes. BLE_HS_EALREADY: Host already stopped; the provided callback does not get called.