Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: microbit-dal microbit-dal microbit-ble-open microbit-dal ... more
Fork of BLE_API by
Diff: services/URIBeaconConfigService.h
- Revision:
- 210:0c14030d1bd0
- Parent:
- 209:c92872ad8935
- Child:
- 211:f181effe5de3
diff -r c92872ad8935 -r 0c14030d1bd0 services/URIBeaconConfigService.h
--- a/services/URIBeaconConfigService.h Mon Dec 01 14:31:18 2014 +0000
+++ b/services/URIBeaconConfigService.h Mon Dec 01 14:31:18 2014 +0000
@@ -89,7 +89,7 @@
}
strcpy(reinterpret_cast<char *>(uriData), uriDataIn);
- configure();
+ configureGAP();
if (initSucceeded) {
saveDefaults();
}
@@ -129,7 +129,7 @@
*/
void setFlags(uint8_t flagsIn) {
flags = flagsIn;
- configure();
+ configureGAP();
}
/**
@@ -144,7 +144,7 @@
*/
void useTxPowerMode(TXPowerModes_t mode) {
effectiveTxPower = powerLevels[mode];
- configure();
+ configureGAP();
}
/**
@@ -154,14 +154,14 @@
*/
void setBeaconPeriod(uint16_t beaconPeriodIn) {
beaconPeriod = beaconPeriodIn;
- configure();
+ configureGAP();
}
private:
/**
* Setup the advertisement payload and GAP settings.
*/
- void configure(void) {
+ void configureGAP(void) {
const uint8_t BEACON_UUID[] = {0xD8, 0xFE};
payloadIndex = 0;
@@ -302,7 +302,7 @@
} else if (params->charHandle == resetChar.getValueAttribute().getHandle()) {
resetDefaults();
}
- configure();
+ configureGAP();
ble.setAdvertisingPayload();
}
@@ -324,8 +324,6 @@
ble.updateCharacteristicValue(uriDataChar.getValueAttribute().getHandle(), uriData, uriDataLength);
ble.updateCharacteristicValue(flagsChar.getValueAttribute().getHandle(), &flags, 1 /* size */);
ble.updateCharacteristicValue(beaconPeriodChar.getValueAttribute().getHandle(), reinterpret_cast<uint8_t *>(&beaconPeriod), sizeof(uint16_t));
-
- configure();
}
private:
