pub unsafe extern "C" fn ble_l2cap_connect(
conn_handle: u16,
psm: u16,
mtu: u16,
sdu_rx: *mut os_mbuf,
cb: ble_l2cap_event_fn,
cb_arg: *mut c_void,
) -> c_int
Expand description
@brief Initiate an L2CAP connection.
This function initiates an L2CAP connection to a remote device with the specified connection handle, Protocol/Service Multiplexer (PSM), Maximum Transmission Unit (MTU) size, and receive SDU buffer. When the connection is established or if there is an error during the connection process, the provided callback function will be invoked with the corresponding event information.
@param conn_handle The connection handle for the remote device. @param psm The Protocol/Service Multiplexer (PSM) for the connection. @param mtu The Maximum Transmission Unit (MTU) size for the connection. @param sdu_rx Pointer to the receive Service Data Unit (SDU) buffer. @param cb Pointer to the callback function to be invoked when the connection is established. @param cb_arg An optional argument to be passed to the callback function.
@return 0 on success; A non-zero value on failure.