pub unsafe extern "C" fn ble_gap_event_listener_register(
    listener: *mut ble_gap_event_listener,
    fn_: ble_gap_event_fn,
    arg: *mut c_void
) -> c_int
Expand description

Registers listener for GAP events

On success listener structure will be initialized automatically and does not need to be initialized prior to calling this function. To change callback and/or argument unregister listener first and register it again.

@param listener Listener structure @param fn Callback function @param arg Callback argument

@return 0 on success BLE_HS_EINVAL if no callback is specified BLE_HS_EALREADY if listener is already registered