/* Returns the local resolvable private address currently being using by the advertiser */
uint8_t* ble_ll_adv_get_local_rpa(struct ble_ll_adv_sm *advsm)
/* Returns the local resolvable private address currently being using by the advertiser */
uint8_t* ble_ll_adv_get_local_rpa(struct ble_ll_adv_sm *advsm)
{
    uint8_t *rpa = NULL;
    if (advsm->own_addr_type > BLE_HCI_ADV_OWN_ADDR_RANDOM) {
        if ((advsm->flags & BLE_LL_ADV_SM_FLAG_TX_ADD) &&
                                    ble_ll_is_rpa(advsm->adva, 1)) {
            rpa = advsm->adva;
        }
    }
    return rpa;
}