Skip to content

BLE Gap deprecation cleanup/rework #12730

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Apr 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
55edb61
ble/Gap.h: remove deprecated APIs
LDong-Arm Mar 20, 2020
6f701cd
Remove deprecated implementations from GenericGap & LegacyGap
LDong-Arm Mar 20, 2020
d35a6b8
GenericGap: remove legacy dis/connection callbacks signalling
LDong-Arm Mar 24, 2020
db14f19
GenericGap: remove legacy timeout callback signalling
LDong-Arm Mar 25, 2020
a2a9929
BLE Gap: remove version one scan API
LDong-Arm Mar 24, 2020
eee3b68
GenericGap: prepare legacy advertising set
LDong-Arm Mar 25, 2020
e97582b
Move BLE whitelist APIs from LegacyGap to ble::Gap
LDong-Arm Mar 25, 2020
be3858c
BLE: update to use whitelist_t from ble namespace
LDong-Arm Mar 25, 2020
af6f32e
Cordio: remove LegacyGap implementation
LDong-Arm Mar 26, 2020
d2d09b2
BLE: Remove LegacyGap and related types
LDong-Arm Mar 26, 2020
2989466
BLE: construct disconnection_reason_t from uint8_t (received from HCI)
LDong-Arm Mar 31, 2020
c17cf0f
Add to Gap/GenericGap non-deprecated APIs originally in LegacyGap
LDong-Arm Mar 31, 2020
55ecc57
BLE: use up-to-date structs for disconnections
LDong-Arm Mar 31, 2020
09a81a9
GenericAccessService: remove unused device name/appearance functions …
LDong-Arm Mar 31, 2020
2422efc
GenericGap: clean up unused helper functions
LDong-Arm Mar 31, 2020
eba5821
GenericGap: ensure legacy advertising set exists when setting data
LDong-Arm Mar 31, 2020
7ce73d4
BLE LinkLossService: use new EventHandler API to handle disconnection
LDong-Arm Apr 1, 2020
7fed75b
BLE: remove ResolutionStrategy type
LDong-Arm Apr 1, 2020
ae86c11
Add whitelist_t::entry_t which will replace Address_t to store addr t…
LDong-Arm Apr 6, 2020
9455f86
BLE: replace legacy address types (BLEProtocol) with new ones
LDong-Arm Apr 6, 2020
25608ee
Remove BLEProtocol.h
LDong-Arm Apr 6, 2020
0b163ff
Add default initialisation of own_address_type_t
LDong-Arm Apr 6, 2020
0341d5c
disconnection_reason_t from raw uint8_t should be explicited an undoc…
LDong-Arm Apr 7, 2020
53550bb
Gap: create legacy advertising set only when required
LDong-Arm Apr 7, 2020
d6eeab1
Cordio: bring back device name & appearance function
LDong-Arm Apr 7, 2020
7c49aeb
Remove connection_params from internal on_connected()
LDong-Arm Apr 7, 2020
76b92b8
BLE: correct misspelling: prefered -> preferred
LDong-Arm Apr 7, 2020
8de604d
Rename ConnectionParams_t -> PreferredConnectionParams_t
LDong-Arm Apr 7, 2020
3c922ac
Gap.tpp: remove misleading deprecation header
LDong-Arm Apr 8, 2020
a6810dd
Remove a few leftovers in BLE namespace
LDong-Arm Apr 8, 2020
50928fb
BLE whitelist can only contain public or random static addresses
LDong-Arm Apr 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions features/FEATURE_BLE/ble/BLE.h
Original file line number Diff line number Diff line change
Expand Up @@ -465,12 +465,6 @@ class BLE {
bool event_signaled;
};

/**
* @deprecated This type alias is retained for the sake of compatibility with
* older code. This will be dropped at some point.
*/
typedef BLE BLEDevice;

/**
* @namespace ble Entry namespace for all %BLE API definitions.
*/
Expand Down
11 changes: 0 additions & 11 deletions features/FEATURE_BLE/ble/BLEInstanceBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,17 +240,6 @@ class BLEInstanceBase
virtual const SecurityManager &getSecurityManager(void) const = 0;
#endif // BLE_FEATURE_SECURITY

/**
* Process pending events present in the vendor subsystem; then, put the MCU
* to sleep until an external source wakes it up.
*
* @attention This function is deprecated in the BLE class. It will be
* removed from this interface once it is removed from BLE.
*
* @see BLE::waitForEvent() BLE::processEvents()
*/
virtual void waitForEvent(void) = 0;

private:
// this class is not a value type.
// prohibit copy construction and copy assignement
Expand Down
158 changes: 0 additions & 158 deletions features/FEATURE_BLE/ble/BLEProtocol.h

This file was deleted.

64 changes: 64 additions & 0 deletions features/FEATURE_BLE/ble/BLETypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,70 @@ struct coded_symbol_per_bit_t :SafeEnum<coded_symbol_per_bit_t, uint8_t> {
SafeEnum<coded_symbol_per_bit_t, uint8_t>(value) { }
};


/**
* Representation of a whitelist of addresses.
*/
struct whitelist_t {
/**
* BLE address representation.
*
* It contains an address-type (peer_address_type_t) and the address value
* (address_t).
*/
struct entry_t {
/**
* Construct an entry_t object with the supplied type and address.
*
* @param[in] typeIn The peer address type.
* @param[in] addressIn The peer address.
*
* @post type is equal to typeIn and address is equal to the content
* present in addressIn.
*/
entry_t(peer_address_type_t typeIn, const address_t &addressIn) :
type(typeIn),
address(addressIn)
{ }

/**
* Empty constructor.
*
* @note The address constructed with the empty constructor is not
* valid.
*
* @post type is equal to PUBLIC and the address value is equal to
* 00:00:00:00:00:00
*/
entry_t(void) : type(), address() { }

/**
* Type of the peer address.
*/
peer_address_type_t type;

/**
* Value of the peer address.
*/
address_t address;
};

/**
* Pointer to the array of the addresses composing the whitelist.
*/
entry_t *addresses;

/**
* Number addresses in this whitelist.
*/
uint8_t size;

/**
* Capacity of the array holding the addresses.
*/
uint8_t capacity;
};

} // namespace ble

/**
Expand Down
Loading