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

Commit ed82cb12 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Andre Eisenbach
Browse files

Make STREAM_TO_UINT64 globally available

Bug: 69623109
Change-Id: I38958dc16d42ab2396d3acd7605b63ec6a6c2dd8
parent c12f1dc6
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -352,6 +352,17 @@ typedef struct {
             ((((uint32_t)(*((p) + 3)))) << 24));                     \
    (p) += 4;                                                         \
  }
#define STREAM_TO_UINT64(u64, p)                                      \
  {                                                                   \
    (u64) = (((uint64_t)(*(p))) + ((((uint64_t)(*((p) + 1)))) << 8) + \
             ((((uint64_t)(*((p) + 2)))) << 16) +                     \
             ((((uint64_t)(*((p) + 3)))) << 24) +                     \
             ((((uint64_t)(*((p) + 4)))) << 32) +                     \
             ((((uint64_t)(*((p) + 5)))) << 40) +                     \
             ((((uint64_t)(*((p) + 6)))) << 48) +                     \
             ((((uint64_t)(*((p) + 7)))) << 56));                     \
    (p) += 8;                                                         \
  }
#define STREAM_TO_ARRAY32(a, p)                     \
  {                                                 \
    int ijk;                                        \
+0 −12
Original line number Diff line number Diff line
@@ -49,18 +49,6 @@ using base::StringPrintf;
    *(p)++ = (uint8_t)((u64) >> 56); \
  }

#define STREAM_TO_UINT64(u64, p)                                      \
  {                                                                   \
    (u64) = (((uint64_t)(*(p))) + ((((uint64_t)(*((p) + 1)))) << 8) + \
             ((((uint64_t)(*((p) + 2)))) << 16) +                     \
             ((((uint64_t)(*((p) + 3)))) << 24) +                     \
             ((((uint64_t)(*((p) + 4)))) << 32) +                     \
             ((((uint64_t)(*((p) + 5)))) << 40) +                     \
             ((((uint64_t)(*((p) + 6)))) << 48) +                     \
             ((((uint64_t)(*((p) + 7)))) << 56));                     \
    (p) += 8;                                                         \
  }

static const uint16_t dis_attr_uuid[DIS_MAX_CHAR_NUM] = {
    GATT_UUID_SYSTEM_ID,
    GATT_UUID_MODEL_NUMBER_STR,