Skip to content

Commit

Permalink
feat(vendor GAP command): add ADV Remove Set command
Browse files Browse the repository at this point in the history
  • Loading branch information
OueslatiGhaith committed Jan 4, 2024
1 parent 4924dbc commit be4168b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/vendor/command/gap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: Controller> GapCommands for T {
Expand Down Expand Up @@ -1252,6 +1255,11 @@ impl<T: Controller> 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.
Expand Down

0 comments on commit be4168b

Please sign in to comment.