diff --git a/features/FEATURE_BLE/ble/pal/PalGap.h b/features/FEATURE_BLE/ble/pal/PalGap.h index b365e5c23b..d83e532dba 100644 --- a/features/FEATURE_BLE/ble/pal/PalGap.h +++ b/features/FEATURE_BLE/ble/pal/PalGap.h @@ -649,6 +649,19 @@ struct Gap { disconnection_reason_t disconnection_reason ) = 0; + /** Enable or disable private addresses resolution + * + * @param enable whether to enable private addresses resolution + * + * @return BLE_ERROR_NONE if the request has been successfully sent or the + * appropriate error otherwise. + * + * @note: See Bluetooth 5 Vol 2 PartE: 7.8.44 LE Set Address Resolution Enable Command command. + */ + virtual ble_error_t set_address_resolution( + bool enable + ) = 0; + /** * Register a callback which will handle Gap events. * diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/CordioPalGap.h b/features/FEATURE_BLE/targets/TARGET_CORDIO/CordioPalGap.h index 69ca5e9848..7a586add9f 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/CordioPalGap.h +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/CordioPalGap.h @@ -308,6 +308,13 @@ public: return BLE_ERROR_NONE; } + virtual ble_error_t set_address_resolution( + bool enable + ) { + DmPrivSetAddrResEnable(enable); + return BLE_ERROR_NONE; + } + // singleton of the ARM Cordio client static Gap& get_gap() { static Gap _gap;