Skip to content

Commit

Permalink
Merge pull request #12730 from LDong-Arm/gap_deprecation_cleanup
Browse files Browse the repository at this point in the history
BLE Gap deprecation cleanup/rework
  • Loading branch information
0xc0170 authored Apr 27, 2020
2 parents fe9f311 + 50928fb commit 28ef753
Show file tree
Hide file tree
Showing 35 changed files with 666 additions and 7,160 deletions.
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

0 comments on commit 28ef753

Please sign in to comment.