Loading system/bta/hh/bta_hh_act.cc +15 −18 Original line number Diff line number Diff line Loading @@ -76,20 +76,20 @@ static const char* bta_hh_hid_event_name(uint16_t event); * ******************************************************************************/ void bta_hh_api_enable(const tBTA_HH_DATA* p_data) { /* Register with L2CAP */ tHID_STATUS status = HID_HostRegister(bta_hh_cback); if (status == HID_SUCCESS) { tBTA_HH_STATUS status = BTA_HH_ERR; uint8_t xx; memset(&bta_hh_cb, 0, sizeof(tBTA_HH_CB)); /* initialize BTE HID */ HID_HostInit(); memset(&bta_hh_cb, 0, sizeof(tBTA_HH_CB)); /* Register with L2CAP */ if (HID_HostRegister(bta_hh_cback) == HID_SUCCESS) { /* store parameters */ bta_hh_cb.p_cback = p_data->api_enable.p_cback; status = BTA_HH_OK; /* initialize device CB */ for (xx = 0; xx < BTA_HH_MAX_DEVICE; xx++) { bta_hh_cb.kdev[xx].state = BTA_HH_IDLE_ST; Loading @@ -98,23 +98,20 @@ void bta_hh_api_enable(const tBTA_HH_DATA* p_data) { } /* initialize control block map */ for (xx = 0; xx < BTA_HH_MAX_KNOWN; xx++) { for (xx = 0; xx < BTA_HH_MAX_KNOWN; xx++) bta_hh_cb.cb_index[xx] = BTA_HH_IDX_INVALID; } if (status == BTA_HH_OK) { bta_hh_le_enable(); } else if (status == HID_ERR_ALREADY_REGISTERED) { LOG_WARN("Already registered"); } else { } else { /* signal BTA call back event */ tBTA_HH bta_hh; bta_hh.status = BTA_HH_ERR; LOG_ERROR("Failed to register, status: %d", status); if (bta_hh_cb.p_cback) { bta_hh.status = status; (*bta_hh_cb.p_cback)(BTA_HH_ENABLE_EVT, &bta_hh); } } } /******************************************************************************* * * Function bta_hh_api_disable Loading Loading
system/bta/hh/bta_hh_act.cc +15 −18 Original line number Diff line number Diff line Loading @@ -76,20 +76,20 @@ static const char* bta_hh_hid_event_name(uint16_t event); * ******************************************************************************/ void bta_hh_api_enable(const tBTA_HH_DATA* p_data) { /* Register with L2CAP */ tHID_STATUS status = HID_HostRegister(bta_hh_cback); if (status == HID_SUCCESS) { tBTA_HH_STATUS status = BTA_HH_ERR; uint8_t xx; memset(&bta_hh_cb, 0, sizeof(tBTA_HH_CB)); /* initialize BTE HID */ HID_HostInit(); memset(&bta_hh_cb, 0, sizeof(tBTA_HH_CB)); /* Register with L2CAP */ if (HID_HostRegister(bta_hh_cback) == HID_SUCCESS) { /* store parameters */ bta_hh_cb.p_cback = p_data->api_enable.p_cback; status = BTA_HH_OK; /* initialize device CB */ for (xx = 0; xx < BTA_HH_MAX_DEVICE; xx++) { bta_hh_cb.kdev[xx].state = BTA_HH_IDLE_ST; Loading @@ -98,23 +98,20 @@ void bta_hh_api_enable(const tBTA_HH_DATA* p_data) { } /* initialize control block map */ for (xx = 0; xx < BTA_HH_MAX_KNOWN; xx++) { for (xx = 0; xx < BTA_HH_MAX_KNOWN; xx++) bta_hh_cb.cb_index[xx] = BTA_HH_IDX_INVALID; } if (status == BTA_HH_OK) { bta_hh_le_enable(); } else if (status == HID_ERR_ALREADY_REGISTERED) { LOG_WARN("Already registered"); } else { } else { /* signal BTA call back event */ tBTA_HH bta_hh; bta_hh.status = BTA_HH_ERR; LOG_ERROR("Failed to register, status: %d", status); if (bta_hh_cb.p_cback) { bta_hh.status = status; (*bta_hh_cb.p_cback)(BTA_HH_ENABLE_EVT, &bta_hh); } } } /******************************************************************************* * * Function bta_hh_api_disable Loading