riot_sys

Function ble_hs_id_infer_auto

Source
pub unsafe extern "C" fn ble_hs_id_infer_auto(
    privacy: c_int,
    out_addr_type: *mut u8,
) -> c_int
Expand description

Determines the best address type to use for automatic address type resolution. Calculation of the best address type is done as follows:

if privacy requested: if we have a random static address: –> RPA with static random ID else –> RPA with public ID end else if we have a random static address: –> random static address else –> public address end end

@param privacy (0/1) Whether to use a private address. @param out_addr_type On success, the “own addr type” code gets written here.

@return 0 if an address type was successfully inferred. BLE_HS_ENOADDR if the device does not have a suitable address. Other BLE host core code on error.