add Central's service list

change central service begin()'s return type to bool
This commit is contained in:
hathach committed 2017-03-29 16:03:05 +07:00
1 parent 0beff63269
commit dade06c68a
6 files changed
+31 -10

No files matched your search

@@ -57,14 +57,15 @@ BLECentralService::BLECentralService(BLEUuid bleuuid)
}
err_t BLECentralService::begin(void)
bool BLECentralService::begin(void)
{
// Add UUID128 if needed
uuid.begin();
lastService = this;
(void) Bluefruit.Central._registerService(this);
return ERROR_NONE;
return true;
}
bool BLECentralService::discover(void)
@@ -81,5 +82,6 @@ bool BLECentralService::discovered(void)
void BLECentralService::disconnect(void)
{
// do nothing, inherited service may want to clean up its own
_discovered = false;
// inherited service may want to clean up its own characteristic
}