close #44 add client battery notify with callback support

This commit is contained in:
hathach committed 2019-01-07 16:42:54 +07:00
1 parent faeb0bcdf5
commit e22f1e0a58
2 files changed
+21

No files matched your search

@@ -69,3 +69,19 @@ uint8_t BLEClientBas::read(void)
{
return _battery.read8();
}
bool BLEClientBas::enableNotify(void)
{
return _battery.enableNotify();
}
bool BLEClientBas::disableNotify(void)
{
return _battery.disableNotify();
}
void BLEClientBas::setNotifyCallback(BLEClientCharacteristic::notify_cb_t fp, bool useAdaCallback)
{
return _battery.setNotifyCallback(fp, useAdaCallback);
}
@@ -51,6 +51,11 @@ class BLEClientBas : public BLEClientService
uint8_t read(void);
bool enableNotify(void);
bool disableNotify(void);
void setNotifyCallback(BLEClientCharacteristic::notify_cb_t fp, bool useAdaCallback = true);
private:
BLEClientCharacteristic _battery;
};