Function esp_idf_svc::hal::sys::esp_ble_gattc_cache_assoc
source · pub unsafe extern "C" fn esp_ble_gattc_cache_assoc(
gattc_if: u8,
src_addr: *mut u8,
assoc_addr: *mut u8,
is_assoc: bool,
) -> i32
Expand description
@brief Add or delete the associated address with the source address. Note: The role of this API is mainly when the client side has stored a server-side database, when it needs to connect another device, but the device’s attribute database is the same as the server database stored on the client-side, calling this API can use the database that the device has stored used as the peer server database to reduce the attribute database search and discovery process and speed up the connection time. The associated address mains that device want to used the database has stored in the local cache. The source address mains that device want to share the database to the associated address device.
@param[in] gattc_if: Gatt client access interface. @param[in] src_addr: the source address which provide the attribute table. @param[in] assoc_addr: the associated device address which went to share the attribute table with the source address. @param[in] is_assoc: true add the associated device address, false remove the associated device address. @return - ESP_OK: success - other: failed