close #44 add client battery notify with callback support
This commit is contained in:
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;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user