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

Commit 2770584e authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "remove unused fields"

parents 19ed8daa dbcabc75
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -204,7 +204,6 @@ typedef struct {
  bool in_use;                 /* control block currently in use */
  bool incoming_conn;          /* is incoming connection? */
  uint8_t incoming_hid_handle; /* temporary handle for incoming connection? */
  bool opened; /* true if device successfully opened HID connection */
  tBTA_HH_PROTO_MODE mode; /* protocol mode */
  tBTA_HH_STATE state;     /* CB state */

@@ -221,33 +220,19 @@ typedef struct {
  uint16_t conn_id;
  bool in_bg_conn;
  uint8_t clt_cfg_idx;
  uint16_t scan_refresh_char_handle;
  bool scps_supported;

#define BTA_HH_LE_SCPS_NOTIFY_NONE 0
#define BTA_HH_LE_SCPS_NOTIFY_SPT 0x01
#define BTA_HH_LE_SCPS_NOTIFY_ENB 0x02
  uint8_t scps_notify; /* scan refresh supported/notification enabled */

  bool security_pending;
} tBTA_HH_DEV_CB;

/* key board parsing control block */
typedef struct {
  bool mod_key[4]; /* ctrl, shift(upper), Alt, GUI */
  bool num_lock;
  bool caps_lock;
  uint8_t last_report[BTA_HH_MAX_RPT_CHARS];
} tBTA_HH_KB_CB;

/******************************************************************************
 * Main Control Block
 ******************************************************************************/
typedef struct {
  tBTA_HH_KB_CB kb_cb;                    /* key board control block,
                                             suppose BTA will connect
                                             to only one keyboard at
                                              the same time */
  tBTA_HH_DEV_CB kdev[BTA_HH_MAX_DEVICE]; /* device control block */
  tBTA_HH_DEV_CB* p_cur;                  /* current device control
                                                 block idx, used in sdp */
@@ -258,7 +243,6 @@ typedef struct {
  tGATT_IF gatt_if;
  tBTA_HH_CBACK* p_cback; /* Application callbacks */
  tSDP_DISCOVERY_DB* p_disc_db;
  uint8_t trace_level; /* tracing level */
  uint8_t cnt_num;     /* connected device number */
  bool w4_disable;     /* w4 disable flag */
} tBTA_HH_CB;
+0 −2
Original line number Diff line number Diff line
@@ -1469,11 +1469,9 @@ static void bta_hh_le_srvc_search_cmpl(tBTA_GATTC_SEARCH_CMPL* p_data) {
      APPL_TRACE_DEBUG("%s: have HID service inst_id= %d", __func__,
                       p_dev_cb->hid_srvc.srvc_inst_id);
    } else if (service.uuid == Uuid::From16Bit(UUID_SERVCLASS_SCAN_PARAM)) {
      p_dev_cb->scan_refresh_char_handle = 0;

      for (const gatt::Characteristic& charac : service.characteristics) {
        if (charac.uuid == Uuid::From16Bit(GATT_UUID_SCAN_REFRESH)) {
          p_dev_cb->scan_refresh_char_handle = charac.value_handle;

          if (charac.properties & GATT_CHAR_PROP_BIT_NOTIFY)
            p_dev_cb->scps_notify |= BTA_HH_LE_SCPS_NOTIFY_SPT;