Skip to content

Commit

Permalink
Pull request #7: Disable gatt service to improve read PACs bits time
Browse files Browse the repository at this point in the history
Merge in AUR/zephyr_mirror from feature/EATAT2-781-Optimize-time-for-PACs-readout-via-BLE to hid

* commit 'f36332cd146709d93241684d34a2d28041409d71':
  Removed commented code
  Disable gatt service to improve read PACs bits time
  • Loading branch information
Krok, Tomasz committed Mar 6, 2023
2 parents 2dcab5b + f36332c commit 148c08c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion subsys/bluetooth/host/Kconfig.gatt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ config BT_GATT_SERVICE_CHANGED

config BT_GATT_DYNAMIC_DB
bool "GATT dynamic database support"
depends on BT_GATT_SERVICE_CHANGED
#depends on BT_GATT_SERVICE_CHANGED
help
This option enables registering/unregistering services at runtime.

Expand Down
19 changes: 0 additions & 19 deletions subsys/bluetooth/host/gatt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1350,26 +1350,7 @@ void bt_gatt_init(void)
(defined(CONFIG_BT_GATT_CACHING) && defined(CONFIG_BT_SETTINGS))
static void sc_indicate(uint16_t start, uint16_t end)
{
BT_DBG("start 0x%04x end 0x%04x", start, end);

if (!atomic_test_and_set_bit(gatt_sc.flags, SC_RANGE_CHANGED)) {
gatt_sc.start = start;
gatt_sc.end = end;
goto submit;
}

if (!update_range(&gatt_sc.start, &gatt_sc.end, start, end)) {
return;
}

submit:
if (atomic_test_bit(gatt_sc.flags, SC_INDICATE_PENDING)) {
BT_DBG("indicate pending, waiting until complete...");
return;
}

/* Reschedule since the range has changed */
sc_work_submit(SC_TIMEOUT);
}
#endif /* BT_GATT_DYNAMIC_DB || (BT_GATT_CACHING && BT_SETTINGS) */

Expand Down

0 comments on commit 148c08c

Please sign in to comment.