From ab7a368f3f602b3cd32533c2de4d0adb2031fb37 Mon Sep 17 00:00:00 2001 From: Jakub Pawlowski Date: Mon, 25 Sep 2017 17:24:46 -0700 Subject: [PATCH] Remove unnecesary BTA redefinitions for GATT part 1 Test: compilation test Change-Id: I98ab63a187684ae4ffbb0cb23e5c9e67994be468 --- bta/gatt/bta_gattc_int.h | 2 +- bta/hh/bta_hh_le.cc | 4 ++-- bta/include/bta_gatt_api.h | 15 +-------------- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/bta/gatt/bta_gattc_int.h b/bta/gatt/bta_gattc_int.h index fc950c039..694eea795 100644 --- a/bta/gatt/bta_gattc_int.h +++ b/bta/gatt/bta_gattc_int.h @@ -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 diff --git a/bta/hh/bta_hh_le.cc b/bta/hh/bta_hh_le.cc index ceb6a2795..c41a93e6f 100644 --- a/bta/hh/bta_hh_le.cc +++ b/bta/hh/bta_hh_le.cc @@ -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, diff --git a/bta/include/bta_gatt_api.h b/bta/include/bta_gatt_api.h index 558c20eeb..aed3923af 100644 --- a/bta/include/bta_gatt_api.h +++ b/bta/include/bta_gatt_api.h @@ -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)))) -- 2.11.0