Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a50c1388 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Add stack/include/bt_types::AddressTypeText am: 37f080af

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1449255

Change-Id: I7df1998d74f3a96d8e285b9c04fcede36d14ed58
parents 4750ae2e 37f080af
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -754,6 +754,24 @@ typedef struct {
#define BLE_ADDR_RANDOM_ID 0x03
#define BLE_ADDR_ANONYMOUS 0xFF
typedef uint8_t tBLE_ADDR_TYPE;
#ifdef __cplusplus
inline std::string AddressTypeText(tBLE_ADDR_TYPE type) {
  switch (type) {
    case BLE_ADDR_PUBLIC:
      return std::string("public");
    case BLE_ADDR_RANDOM:
      return std::string("random");
    case BLE_ADDR_PUBLIC_ID:
      return std::string("public identity");
    case BLE_ADDR_RANDOM_ID:
      return std::string("random identity");
    case BLE_ADDR_ANONYMOUS:
      return std::string("anonymous");
    default:
      return std::string("unknown");
  }
}
#endif  // __cplusplus

/* BLE ADDR type ID bit */
#define BLE_ADDR_TYPE_ID_BIT 0x02