%% Create BLE GAP AD Block Configuration Object Using Default Settings
% Create two unique BLE GAP AD configuration objects: one with AD types 'Flags' and 'Tx power level' and the other with AD type 'Flags' and simultaneous LE and BR or EDR support at the host.
% Create a BLE GAP AD block configuration object using default settings. Set the values of AD types as 'Flags' and 'Tx power level', LE discoverability as 'Limited' and Tx power level as 45. View the properties of the corresponding configuration object.

cfgGAP = bleGAPDataBlockConfig;
cfgGAP.AdvertisingDataTypes = {'Flags';'Tx power level'};
cfgGAP.LEDiscoverability = 'Limited';
cfgGAP.TxPowerLevel = 45

% Create another BLE GAP AD block configuration object using default settings, this time with AD type 'Flags' and having simultaneous support for LE and BR/EDR. Set the values of LE discoverability as 'Limited', enable BR or EDR support as true and enable simultaneous support for LE and BR or EDR as 'Host'. View the properties of the corresponding configuration object.

cfgGAP = bleGAPDataBlockConfig;
cfgGAP.LEDiscoverability = 'Limited and general';
cfgGAP.BREDR = true;
cfgGAP.LE = 'Host'

% Copyright 2019 The MathWorks, Inc.