Skip to content

Commit

Permalink
feat(vendor GAP command): add ADV Set Scan Response Data command
Browse files Browse the repository at this point in the history
  • Loading branch information
OueslatiGhaith committed Jan 4, 2024
1 parent 3f6116c commit 974f876
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/vendor/command/gap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -802,8 +802,6 @@ pub trait GapCommands {
/// [set_undirected_connectable](GapCommands::set_undirected_connectable) and
/// [set_broadcast_mode](GapCommands::set_broadcast_mode) that only support
/// legacy advertising.
// TODO: add adv_set_scan_response_data
// TODO: add adv_set_advertising_data
async fn adv_set_config(&mut self, params: &AdvSetConfig);

/// This command is used to request the Controller to enable or disbale one
Expand All @@ -813,6 +811,10 @@ pub trait GapCommands {
/// This command is used to set the data used in extended advertising PDUs
/// that have a data field
async fn adv_set_advertising_data(&mut self, params: &AdvSetAdvertisingData);

/// This command is used to provide scan response data used during extended
/// advertising
async fn adv_set_scan_response_data(&mut self, params: &AdvSetAdvertisingData);
}

impl<T: Controller> GapCommands for T {
Expand Down Expand Up @@ -1244,6 +1246,12 @@ impl<T: Controller> GapCommands for T {
AdvSetAdvertisingData<'a>,
crate::vendor::opcode::GAP_ADV_SET_ADV_DATA
);

impl_variable_length_params!(
adv_set_scan_response_data<'a>,
AdvSetAdvertisingData<'a>,
crate::vendor::opcode::GAP_ADV_SET_SCAN_RESPONSE_DATA
);
}

/// Potential errors from parameter validation.
Expand Down

0 comments on commit 974f876

Please sign in to comment.