nrf-softdevice-s113

Crates

git

Versions

default

Flavors

pub unsafe fn sd_ble_gap_disconnect(conn_handle: u16, hci_status_code: u8) -> u32
Expand description

@brief Disconnect (GAP Link Termination).

@details This call initiates the disconnection procedure, and its completion will be communicated to the application with a @ref BLE_GAP_EVT_DISCONNECTED event.

@events @event{@ref BLE_GAP_EVT_DISCONNECTED, Generated when disconnection procedure is complete.} @endevents

@mscs @mmsc{@ref BLE_GAP_CONN_MSC} @endmscs

@param[in] conn_handle Connection handle. @param[in] hci_status_code HCI status code, see @ref BLE_HCI_STATUS_CODES (accepted values are @ref BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION and @ref BLE_HCI_CONN_INTERVAL_UNACCEPTABLE).

@retval ::NRF_SUCCESS The disconnection procedure has been started successfully. @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid connection handle supplied. @retval ::NRF_ERROR_INVALID_STATE Disconnection in progress or link has not been established.