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.
Dependencies: BLE_API mbed nRF51822 X_NUCLEO_IDB0XA1
Fork of BLE_EddystoneBeacon_Service by
Diff: nrfConfigParamsPersistence.cpp
- Revision:
- 23:05e9bb3b13af
- Parent:
- 2:8020d6d4455a
--- a/nrfConfigParamsPersistence.cpp Thu Jul 23 18:00:59 2015 +0000
+++ b/nrfConfigParamsPersistence.cpp Thu Jul 23 20:17:11 2015 +0000
@@ -20,10 +20,10 @@
/**
* Nordic specific structure used to store params persistently.
- * It extends ZipBeaconConfigService::Params_t with a persistence signature.
+ * It extends EddystoneConfigService::Params_t with a persistence signature.
*/
struct PersistentParams_t {
- ZipBeaconConfigService::Params_t params;
+ EddystoneConfigService::Params_t params;
uint32_t persistenceSignature; /* This isn't really a parameter, but having the expected
* magic value in this field indicates persistence. */
@@ -57,7 +57,7 @@
/* Platform-specific implementation for persistence on the nRF5x. Based on the
* pstorage module provided by the Nordic SDK. */
-bool loadURIBeaconConfigParams(ZipBeaconConfigService::Params_t *paramsP)
+bool loadURIBeaconConfigParams(EddystoneConfigService::Params_t *paramsP)
{
static bool pstorageInitied = false;
if (!pstorageInitied) {
@@ -75,19 +75,19 @@
if ((pstorage_load(reinterpret_cast<uint8_t *>(&persistentParams), &pstorageHandle, sizeof(PersistentParams_t), 0) != NRF_SUCCESS) ||
(persistentParams.persistenceSignature != PersistentParams_t::MAGIC)) {
// On failure zero out and let the service reset to defaults
- memset(paramsP, 0, sizeof(ZipBeaconConfigService::Params_t));
+ memset(paramsP, 0, sizeof(EddystoneConfigService::Params_t));
return false;
}
- memcpy(paramsP, &persistentParams.params, sizeof(ZipBeaconConfigService::Params_t));
+ memcpy(paramsP, &persistentParams.params, sizeof(EddystoneConfigService::Params_t));
return true;
}
/* Platform-specific implementation for persistence on the nRF5x. Based on the
* pstorage module provided by the Nordic SDK. */
-void saveURIBeaconConfigParams(const ZipBeaconConfigService::Params_t *paramsP)
+void saveURIBeaconConfigParams(const EddystoneConfigService::Params_t *paramsP)
{
- memcpy(&persistentParams.params, paramsP, sizeof(ZipBeaconConfigService::Params_t));
+ memcpy(&persistentParams.params, paramsP, sizeof(EddystoneConfigService::Params_t));
if (persistentParams.persistenceSignature != PersistentParams_t::MAGIC) {
persistentParams.persistenceSignature = PersistentParams_t::MAGIC;
pstorage_store(&pstorageHandle,
