esp_idf_sys

Function ble_l2cap_send

Source
pub unsafe extern "C" fn ble_l2cap_send(
    chan: *mut ble_l2cap_chan,
    sdu_tx: *mut os_mbuf,
) -> c_int
Expand description

@brief Send an SDU (Service Data Unit) over an L2CAP channel.

This function sends an SDU over the specified L2CAP channel. The SDU is encapsulated in L2CAP frames and transmitted to the remote device.

@param chan Pointer to the L2CAP channel structure representing the channel to send the SDU on. @param sdu_tx Pointer to the os_mbuf structure containing the SDU (Service Data Unit) to send.

@return 0 on success; BLE_HS_ESTALLED: if there was not enough credits available to send whole SDU. The application needs to wait for the event ‘BLE_L2CAP_EVENT_COC_TX_UNSTALLED’ before being able to transmit more data; Another non-zero value on failure.