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:
- 275:4abc3126f1e1
- Parent:
- 274:f540619754bb
- Child:
- 276:daa42f59bdb8
--- a/services/URIBeaconConfigService.h Wed Jan 21 09:32:53 2015 +0000
+++ b/services/URIBeaconConfigService.h Wed Jan 21 09:32:53 2015 +0000
@@ -225,6 +225,12 @@
memcpy(lockBitsOut, lockBits, SIZEOF_LOCK_BITS);
}
+ void resetLockBits(void) {
+ lockedState = false;
+ memset(lockBits, 0, SIZEOF_LOCK_BITS);
+ storage_saveLockBits();
+ }
+
/**
* APIs around making lockBits persistent.
*/
@@ -404,18 +410,13 @@
* Reset the default values.
*/
void resetDefaults(void) {
- lockedState = false;
- memset(lockBits, 0, SIZEOF_LOCK_BITS);
uriDataLength = 0;
memset(uriData, 0, MAX_SIZE_URI_DATA_CHAR_VALUE);
flags = 0;
memset(powerLevels, 0, sizeof(powerLevels));
txPowerMode = TX_POWER_MODE_LOW;
beaconPeriod = 0;
-
- if (storage_haveSavedLockBits()) {
- storage_saveLockBits();
- }
+ resetLockBits();
updateGATT();
}
