Skip to content

Commit 28ef753

Browse files
authored
Merge pull request #12730 from LDong-Arm/gap_deprecation_cleanup
BLE Gap deprecation cleanup/rework
2 parents fe9f311 + 50928fb commit 28ef753

35 files changed

+666
-7160
lines changed

features/FEATURE_BLE/ble/BLE.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -465,12 +465,6 @@ class BLE {
465465
bool event_signaled;
466466
};
467467

468-
/**
469-
* @deprecated This type alias is retained for the sake of compatibility with
470-
* older code. This will be dropped at some point.
471-
*/
472-
typedef BLE BLEDevice;
473-
474468
/**
475469
* @namespace ble Entry namespace for all %BLE API definitions.
476470
*/

features/FEATURE_BLE/ble/BLEInstanceBase.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -240,17 +240,6 @@ class BLEInstanceBase
240240
virtual const SecurityManager &getSecurityManager(void) const = 0;
241241
#endif // BLE_FEATURE_SECURITY
242242

243-
/**
244-
* Process pending events present in the vendor subsystem; then, put the MCU
245-
* to sleep until an external source wakes it up.
246-
*
247-
* @attention This function is deprecated in the BLE class. It will be
248-
* removed from this interface once it is removed from BLE.
249-
*
250-
* @see BLE::waitForEvent() BLE::processEvents()
251-
*/
252-
virtual void waitForEvent(void) = 0;
253-
254243
private:
255244
// this class is not a value type.
256245
// prohibit copy construction and copy assignement

features/FEATURE_BLE/ble/BLEProtocol.h

Lines changed: 0 additions & 158 deletions
This file was deleted.

features/FEATURE_BLE/ble/BLETypes.h

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,70 @@ struct coded_symbol_per_bit_t :SafeEnum<coded_symbol_per_bit_t, uint8_t> {
831831
SafeEnum<coded_symbol_per_bit_t, uint8_t>(value) { }
832832
};
833833

834+
835+
/**
836+
* Representation of a whitelist of addresses.
837+
*/
838+
struct whitelist_t {
839+
/**
840+
* BLE address representation.
841+
*
842+
* It contains an address-type (peer_address_type_t) and the address value
843+
* (address_t).
844+
*/
845+
struct entry_t {
846+
/**
847+
* Construct an entry_t object with the supplied type and address.
848+
*
849+
* @param[in] typeIn The peer address type.
850+
* @param[in] addressIn The peer address.
851+
*
852+
* @post type is equal to typeIn and address is equal to the content
853+
* present in addressIn.
854+
*/
855+
entry_t(peer_address_type_t typeIn, const address_t &addressIn) :
856+
type(typeIn),
857+
address(addressIn)
858+
{ }
859+
860+
/**
861+
* Empty constructor.
862+
*
863+
* @note The address constructed with the empty constructor is not
864+
* valid.
865+
*
866+
* @post type is equal to PUBLIC and the address value is equal to
867+
* 00:00:00:00:00:00
868+
*/
869+
entry_t(void) : type(), address() { }
870+
871+
/**
872+
* Type of the peer address.
873+
*/
874+
peer_address_type_t type;
875+
876+
/**
877+
* Value of the peer address.
878+
*/
879+
address_t address;
880+
};
881+
882+
/**
883+
* Pointer to the array of the addresses composing the whitelist.
884+
*/
885+
entry_t *addresses;
886+
887+
/**
888+
* Number addresses in this whitelist.
889+
*/
890+
uint8_t size;
891+
892+
/**
893+
* Capacity of the array holding the addresses.
894+
*/
895+
uint8_t capacity;
896+
};
897+
834898
} // namespace ble
835899

836900
/**

0 commit comments

Comments
 (0)