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

Commit 050b8c81 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Remove unnecesary BTA redefinitions for GATT part 1

Test: compilation test
Change-Id: I98ab63a187684ae4ffbb0cb23e5c9e67994be468
parent e66100c4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -191,7 +191,7 @@ typedef struct {
  // this field is set only for characteristic
  uint16_t char_decl_handle;
  bool is_primary;
  tBTA_GATT_CHAR_PROP property;
  tGATT_CHAR_PROP property;
} tBTA_GATTC_ATTR_REC;

#define BTA_GATTC_MAX_CACHE_CHAR 40
+2 −2
Original line number Diff line number Diff line
@@ -1636,7 +1636,7 @@ void bta_hh_le_srvc_search_cmpl(tBTA_GATTC_SEARCH_CMPL* p_data) {
        if (p_char->uuid == Uuid::From16Bit(GATT_UUID_SCAN_REFRESH)) {
          p_dev_cb->scan_refresh_char_handle = p_char->handle;

          if (p_char->properties & BTA_GATT_CHAR_PROP_BIT_NOTIFY)
          if (p_char->properties & GATT_CHAR_PROP_BIT_NOTIFY)
            p_dev_cb->scps_notify |= BTA_HH_LE_SCPS_NOTIFY_SPT;
          else
            p_dev_cb->scps_notify = BTA_HH_LE_SCPS_NOTIFY_NONE;
@@ -1989,7 +1989,7 @@ void bta_hh_le_write_rpt(tBTA_HH_DEV_CB* p_cb, tBTA_HH_RPT_TYPE r_type,
      BTA_GATTC_GetCharacteristic(p_cb->conn_id, p_rpt->char_inst_id);

  tBTA_GATTC_WRITE_TYPE write_type = BTA_GATTC_TYPE_WRITE;
  if (p_char && (p_char->properties & BTA_GATT_CHAR_PROP_BIT_WRITE_NR))
  if (p_char && (p_char->properties & GATT_CHAR_PROP_BIT_WRITE_NR))
    write_type = BTA_GATTC_TYPE_WRITE_NO_RSP;

  gatt_queue_write_op(GATT_WRITE_CHAR, p_cb->conn_id, p_rpt->char_inst_id,
+1 −14
Original line number Diff line number Diff line
@@ -398,19 +398,6 @@ typedef uint16_t tBTA_GATT_PERM;

#define BTA_GATTS_INVALID_IF 0

/* definition of characteristic properties */
#define BTA_GATT_CHAR_PROP_BIT_BROADCAST                                    \
  GATT_CHAR_PROP_BIT_BROADCAST                                      /* 0x01 \
                                                                       */
#define BTA_GATT_CHAR_PROP_BIT_READ GATT_CHAR_PROP_BIT_READ         /* 0x02 */
#define BTA_GATT_CHAR_PROP_BIT_WRITE_NR GATT_CHAR_PROP_BIT_WRITE_NR /* 0x04 */
#define BTA_GATT_CHAR_PROP_BIT_WRITE GATT_CHAR_PROP_BIT_WRITE       /* 0x08 */
#define BTA_GATT_CHAR_PROP_BIT_NOTIFY GATT_CHAR_PROP_BIT_NOTIFY     /* 0x10 */
#define BTA_GATT_CHAR_PROP_BIT_INDICATE GATT_CHAR_PROP_BIT_INDICATE /* 0x20 */
#define BTA_GATT_CHAR_PROP_BIT_AUTH GATT_CHAR_PROP_BIT_AUTH         /* 0x40 */
#define BTA_GATT_CHAR_PROP_BIT_EXT_PROP GATT_CHAR_PROP_BIT_EXT_PROP /* 0x80 */
typedef uint8_t tBTA_GATT_CHAR_PROP;

#ifndef BTA_GATTC_CHAR_DESCR_MAX
#define BTA_GATTC_CHAR_DESCR_MAX 7
#endif
@@ -560,7 +547,7 @@ typedef struct {
typedef struct {
  bluetooth::Uuid uuid;
  uint16_t handle;
  tBTA_GATT_CHAR_PROP properties;
  tGATT_CHAR_PROP properties;
  tBTA_GATTC_SERVICE* service; /* owning service*/
  list_t* descriptors;         /* list of tBTA_GATTC_DESCRIPTOR */
} __attribute__((packed, aligned(alignof(bluetooth::Uuid))))