From be4168b2a0cc7a1a0a0e9c8be5abe3f35e732681 Mon Sep 17 00:00:00 2001 From: OueslatiGhaith Date: Thu, 4 Jan 2024 15:15:18 +0100 Subject: [PATCH] feat(vendor GAP command): add ADV Remove Set command --- src/vendor/command/gap.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vendor/command/gap.rs b/src/vendor/command/gap.rs index 75ea380..0850b3f 100644 --- a/src/vendor/command/gap.rs +++ b/src/vendor/command/gap.rs @@ -815,6 +815,9 @@ pub trait GapCommands { /// This command is used to provide scan response data used during extended /// advertising async fn adv_set_scan_response_data(&mut self, params: &AdvSetAdvertisingData); + + /// This command is used to remove an advertising set from the Controller. + async fn adv_remove_set(&mut self, handle: AdvertisingHandle); } impl GapCommands for T { @@ -1252,6 +1255,11 @@ impl GapCommands for T { AdvSetAdvertisingData<'a>, crate::vendor::opcode::GAP_ADV_SET_SCAN_RESPONSE_DATA ); + + async fn adv_remove_set(&mut self, handle: AdvertisingHandle) { + self.controller_write(crate::vendor::opcode::GAP_ADV_REMOVE_SET, &[handle.0]) + .await; + } } /// Potential errors from parameter validation.