mirror of https://github.com/ARMmbed/mbed-os.git
Added method to enable/disable privacy in GAP Pal with Cordio impl
parent
4c5e2a8094
commit
1a623e6670
|
@ -649,6 +649,18 @@ struct Gap {
|
||||||
disconnection_reason_t disconnection_reason
|
disconnection_reason_t disconnection_reason
|
||||||
) = 0;
|
) = 0;
|
||||||
|
|
||||||
|
/** Enable or disable privacy feature
|
||||||
|
* @param enable whether to enable privacy feature
|
||||||
|
*
|
||||||
|
* @return BLE_ERROR_NONE if the request has been successfully sent or the
|
||||||
|
* appropriate error otherwise.
|
||||||
|
*
|
||||||
|
* @note: See Bluetooth 5 Vol 3 Part C: 10.7 Privacy feature.
|
||||||
|
*/
|
||||||
|
virtual ble_error_t set_privacy(
|
||||||
|
bool enable
|
||||||
|
) = 0;
|
||||||
|
|
||||||
/** Enable or disable private addresses resolution
|
/** Enable or disable private addresses resolution
|
||||||
*
|
*
|
||||||
* @param enable whether to enable private addresses resolution
|
* @param enable whether to enable private addresses resolution
|
||||||
|
|
|
@ -308,6 +308,17 @@ public:
|
||||||
return BLE_ERROR_NONE;
|
return BLE_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual ble_error_t set_privacy(
|
||||||
|
bool enable
|
||||||
|
) {
|
||||||
|
if(enable) {
|
||||||
|
DmDevPrivStart(15 * 60); // Use 15 minutes renewal timer as mandated by the BLE Spec
|
||||||
|
} else {
|
||||||
|
DmDevPrivStop();
|
||||||
|
}
|
||||||
|
return BLE_ERROR_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
virtual ble_error_t set_address_resolution(
|
virtual ble_error_t set_address_resolution(
|
||||||
bool enable
|
bool enable
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Reference in New Issue