software update service now registered with NimBLE

This commit is contained in:
geeksville committed 2020-07-24 11:39:48 -07:00
1 parent a5b7501a4e
commit 204f2c1a68
6 files changed
+164 -102

No files matched your search

+8 -1
View File
@@ -136,8 +136,15 @@ void bluetoothRebootCheck()
See bluetooth-api.md
*/
void createUpdateService()
void reinitUpdateService()
{
if (!updateLock)
updateLock = new concurrency::Lock();
auto res = ble_gatts_count_cfg(gatt_update_svcs); // assigns handles? see docstring for note about clearing the handle list
// before calling SLEEP SUPPORT
assert(res == 0);
res = ble_gatts_add_svcs(gatt_update_svcs);
assert(res == 0);
}