project for eddystone
Dependencies: BLE_API mbed nRF51822
Fork of BLE_URIBeacon by
ConfigParamsPersistence.h@16:1daa78939a3b, 2015-03-09 (annotated)
- Committer:
- rgrover1
- Date:
- Mon Mar 09 16:35:03 2015 +0000
- Revision:
- 16:1daa78939a3b
- Child:
- 17:e2c0a1696e39
updating the URIBeacon demo to the latest API for URIBeaconConfigService.; ; Hopefully the app has been simplified now.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rgrover1 | 16:1daa78939a3b | 1 | /* mbed Microcontroller Library |
rgrover1 | 16:1daa78939a3b | 2 | * Copyright (c) 2006-2015 ARM Limited |
rgrover1 | 16:1daa78939a3b | 3 | * |
rgrover1 | 16:1daa78939a3b | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
rgrover1 | 16:1daa78939a3b | 5 | * you may not use this file except in compliance with the License. |
rgrover1 | 16:1daa78939a3b | 6 | * You may obtain a copy of the License at |
rgrover1 | 16:1daa78939a3b | 7 | * |
rgrover1 | 16:1daa78939a3b | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
rgrover1 | 16:1daa78939a3b | 9 | * |
rgrover1 | 16:1daa78939a3b | 10 | * Unless required by applicable law or agreed to in writing, software |
rgrover1 | 16:1daa78939a3b | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
rgrover1 | 16:1daa78939a3b | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
rgrover1 | 16:1daa78939a3b | 13 | * See the License for the specific language governing permissions and |
rgrover1 | 16:1daa78939a3b | 14 | * limitations under the License. |
rgrover1 | 16:1daa78939a3b | 15 | */ |
rgrover1 | 16:1daa78939a3b | 16 | |
rgrover1 | 16:1daa78939a3b | 17 | #ifndef __BLE_CONFIG_PARAMS_PERSISTENCE_H__ |
rgrover1 | 16:1daa78939a3b | 18 | #define __BLE_CONFIG_PARAMS_PERSISTENCE_H__ |
rgrover1 | 16:1daa78939a3b | 19 | |
rgrover1 | 16:1daa78939a3b | 20 | #include "URIBeaconConfigService.h" |
rgrover1 | 16:1daa78939a3b | 21 | |
rgrover1 | 16:1daa78939a3b | 22 | |
rgrover1 | 16:1daa78939a3b | 23 | /** |
rgrover1 | 16:1daa78939a3b | 24 | * Generic API to load the URIBeacon configuration parameters from persistent |
rgrover1 | 16:1daa78939a3b | 25 | * storage. If persistent storage isn't available, the persistenceSignature |
rgrover1 | 16:1daa78939a3b | 26 | * member of params may be left un-initialized to the MAGIC, and this will cause |
rgrover1 | 16:1daa78939a3b | 27 | * a reset to default values. |
rgrover1 | 16:1daa78939a3b | 28 | * |
rgrover1 | 16:1daa78939a3b | 29 | * @param[out] paramsP |
rgrover1 | 16:1daa78939a3b | 30 | * The parameters to be filled in from persistence storage. |
rgrover1 | 16:1daa78939a3b | 31 | */ |
rgrover1 | 16:1daa78939a3b | 32 | void loadURIBeaconConfigParams(URIBeaconConfigService::Params_t *paramsP); |
rgrover1 | 16:1daa78939a3b | 33 | |
rgrover1 | 16:1daa78939a3b | 34 | /** |
rgrover1 | 16:1daa78939a3b | 35 | * Generic API to store the URIBeacon configuration parameters to persistent |
rgrover1 | 16:1daa78939a3b | 36 | * storage. It typically initializes the persistenceSignature member of the |
rgrover1 | 16:1daa78939a3b | 37 | * params to the MAGIC value to indicate persistence. |
rgrover1 | 16:1daa78939a3b | 38 | * |
rgrover1 | 16:1daa78939a3b | 39 | * @param[in/out] paramsP |
rgrover1 | 16:1daa78939a3b | 40 | * The params to be saved; persistenceSignature member gets |
rgrover1 | 16:1daa78939a3b | 41 | * updated if persistence is successful. |
rgrover1 | 16:1daa78939a3b | 42 | */ |
rgrover1 | 16:1daa78939a3b | 43 | void saveURIBeaconConfigParams(URIBeaconConfigService::Params_t *paramsP); |
rgrover1 | 16:1daa78939a3b | 44 | |
rgrover1 | 16:1daa78939a3b | 45 | #endif /* #ifndef __BLE_CONFIG_PARAMS_PERSISTENCE_H__*/ |