![](/media/cache/profiles/416a275fea912be3a578ba281b58bb47.jpg.50x50_q85.jpg)
Button initiated config service
Dependencies: BLE_API_EddystoneConfigService_2 mbed nRF51822
Fork of BLE_EddystoneBeaconConfigService_3 by
ConfigParamsPersistence.h@68:f7f7ec038494, 2015-10-12 (annotated)
- Committer:
- scottjenson
- Date:
- Mon Oct 12 21:18:21 2015 +0000
- Revision:
- 68:f7f7ec038494
- Parent:
- 23:05e9bb3b13af
support for button initiated config (for nRFgo usb board and Seeed)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rgrover1 | 2:8020d6d4455a | 1 | /* mbed Microcontroller Library |
rgrover1 | 2:8020d6d4455a | 2 | * Copyright (c) 2006-2015 ARM Limited |
rgrover1 | 2:8020d6d4455a | 3 | * |
rgrover1 | 2:8020d6d4455a | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
rgrover1 | 2:8020d6d4455a | 5 | * you may not use this file except in compliance with the License. |
rgrover1 | 2:8020d6d4455a | 6 | * You may obtain a copy of the License at |
rgrover1 | 2:8020d6d4455a | 7 | * |
rgrover1 | 2:8020d6d4455a | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
rgrover1 | 2:8020d6d4455a | 9 | * |
rgrover1 | 2:8020d6d4455a | 10 | * Unless required by applicable law or agreed to in writing, software |
rgrover1 | 2:8020d6d4455a | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
rgrover1 | 2:8020d6d4455a | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
rgrover1 | 2:8020d6d4455a | 13 | * See the License for the specific language governing permissions and |
rgrover1 | 2:8020d6d4455a | 14 | * limitations under the License. |
rgrover1 | 2:8020d6d4455a | 15 | */ |
rgrover1 | 2:8020d6d4455a | 16 | |
rgrover1 | 2:8020d6d4455a | 17 | #ifndef __BLE_CONFIG_PARAMS_PERSISTENCE_H__ |
rgrover1 | 2:8020d6d4455a | 18 | #define __BLE_CONFIG_PARAMS_PERSISTENCE_H__ |
rgrover1 | 2:8020d6d4455a | 19 | |
mbedAustin | 23:05e9bb3b13af | 20 | #include "EddystoneConfigService.h" |
rgrover1 | 2:8020d6d4455a | 21 | |
rgrover1 | 2:8020d6d4455a | 22 | /** |
rgrover1 | 2:8020d6d4455a | 23 | * Generic API to load the URIBeacon configuration parameters from persistent |
rgrover1 | 2:8020d6d4455a | 24 | * storage. If persistent storage isn't available, the persistenceSignature |
rgrover1 | 2:8020d6d4455a | 25 | * member of params may be left un-initialized to the MAGIC, and this will cause |
rgrover1 | 2:8020d6d4455a | 26 | * a reset to default values. |
rgrover1 | 2:8020d6d4455a | 27 | * |
rgrover1 | 2:8020d6d4455a | 28 | * @param[out] paramsP |
rgrover1 | 2:8020d6d4455a | 29 | * The parameters to be filled in from persistence storage. This |
rgrover1 | 2:8020d6d4455a | 30 | argument can be NULL if the caller is only interested in |
rgrover1 | 2:8020d6d4455a | 31 | discovering the persistence status of params. |
rgrover1 | 2:8020d6d4455a | 32 | |
rgrover1 | 2:8020d6d4455a | 33 | * @return true if params were loaded from persistent storage and have usefully |
rgrover1 | 2:8020d6d4455a | 34 | * initialized fields. |
rgrover1 | 2:8020d6d4455a | 35 | */ |
mbedAustin | 23:05e9bb3b13af | 36 | bool loadURIBeaconConfigParams(EddystoneConfigService::Params_t *paramsP); |
rgrover1 | 2:8020d6d4455a | 37 | |
rgrover1 | 2:8020d6d4455a | 38 | /** |
rgrover1 | 2:8020d6d4455a | 39 | * Generic API to store the URIBeacon configuration parameters to persistent |
rgrover1 | 2:8020d6d4455a | 40 | * storage. It typically initializes the persistenceSignature member of the |
rgrover1 | 2:8020d6d4455a | 41 | * params to the MAGIC value to indicate persistence. |
rgrover1 | 2:8020d6d4455a | 42 | * |
rgrover1 | 2:8020d6d4455a | 43 | * @note: the save operation may be asynchronous. It may be a short while before |
rgrover1 | 2:8020d6d4455a | 44 | * the request takes affect. Reading back saved configParams may not yield |
rgrover1 | 2:8020d6d4455a | 45 | * correct behaviour if attempted soon after a store. |
rgrover1 | 2:8020d6d4455a | 46 | * |
rgrover1 | 2:8020d6d4455a | 47 | * @param[in/out] paramsP |
rgrover1 | 2:8020d6d4455a | 48 | * The params to be saved; persistenceSignature member gets |
rgrover1 | 2:8020d6d4455a | 49 | * updated if persistence is successful. |
rgrover1 | 2:8020d6d4455a | 50 | */ |
mbedAustin | 23:05e9bb3b13af | 51 | void saveURIBeaconConfigParams(const EddystoneConfigService::Params_t *paramsP); |
rgrover1 | 2:8020d6d4455a | 52 | |
rgrover1 | 2:8020d6d4455a | 53 | #endif /* #ifndef __BLE_CONFIG_PARAMS_PERSISTENCE_H__*/ |