NimBLE-Arduino 2.1.3
Loading...
Searching...
No Matches
ble_store_config_priv.h
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20#ifndef H_BLE_STORE_CONFIG_PRIV_
21#define H_BLE_STORE_CONFIG_PRIV_
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27extern struct ble_store_value_sec
28 ble_store_config_our_secs[MYNEWT_VAL(BLE_STORE_MAX_BONDS)];
29extern int ble_store_config_num_our_secs;
30
31extern struct ble_store_value_sec
32 ble_store_config_peer_secs[MYNEWT_VAL(BLE_STORE_MAX_BONDS)];
33extern int ble_store_config_num_peer_secs;
34
35extern struct ble_store_value_cccd
36 ble_store_config_cccds[MYNEWT_VAL(BLE_STORE_MAX_CCCDS)];
37extern int ble_store_config_num_cccds;
38
39#if MYNEWT_VAL(ENC_ADV_DATA)
40extern struct ble_store_value_ead
41 ble_store_config_eads[MYNEWT_VAL(BLE_STORE_MAX_EADS)];
42extern int ble_store_config_num_eads;
43#endif
44
45extern struct ble_store_value_rpa_rec
46 ble_store_config_rpa_recs[MYNEWT_VAL(BLE_STORE_MAX_BONDS)];
47extern int ble_store_config_num_rpa_recs;
48
49extern struct ble_store_value_local_irk
50 ble_store_config_local_irks[MYNEWT_VAL(BLE_STORE_MAX_BONDS)];
51extern int ble_store_config_num_local_irks;
52
53
54#if MYNEWT_VAL(BLE_STORE_CONFIG_PERSIST)
55
56int ble_store_config_persist_our_secs(void);
57int ble_store_config_persist_peer_secs(void);
58int ble_store_config_persist_cccds(void);
59#if MYNEWT_VAL(BLE_STORE_MAX_BONDS)
60int ble_restore_our_sec_nvs(void);
61int ble_restore_peer_sec_nvs(void);
62#endif
63#if MYNEWT_VAL(ENC_ADV_DATA)
64int ble_store_config_persist_eads(void);
65#endif
66int ble_store_config_persist_rpa_recs(void);
67int ble_store_config_persist_local_irk(void);
68void ble_store_config_conf_init(void);
69
70#else
71
72static inline int ble_store_config_persist_our_secs(void) { return 0; }
73static inline int ble_store_config_persist_peer_secs(void) { return 0; }
74static inline int ble_store_config_persist_cccds(void) { return 0; }
75#if MYNEWT_VAL(ENC_ADV_DATA)
76static inline int ble_store_config_persist_eads(void) { return 0; }
77#endif
78static inline int ble_store_config_persist_rpa_recs(void) { return 0; }
79static inline int ble_store_config_persist_local_irk(void) { return 0; }
80static inline void ble_store_config_conf_init(void) { }
81
82#if MYNEWT_VAL(BLE_HOST_BASED_PRIVACY)
83static inline int ble_store_persist_peer_records(void) { return 0; }
84#endif
85#endif /* MYNEWT_VAL(BLE_STORE_CONFIG_PERSIST) */
86
87#ifdef __cplusplus
88}
89#endif
90
91#endif
Definition ble_store.h:125
Definition ble_store.h:78