Skip to content

Commit 6673708

Browse files
moyamartinktaborowski
authored andcommitted
sal: sid_pal: add support for cpp linker
adds `extern "C"` guards to bt_app_callbacks header for cpp support Signed-off-by: Martin Moya <[email protected]>
1 parent b1bd51c commit 6673708

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

subsys/sal/sid_pal/include/bt_app_callbacks.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
#include <zephyr/bluetooth/bluetooth.h>
1212
#include <zephyr/bluetooth/gatt.h>
1313

14+
#ifdef __cplusplus
15+
extern "C" {
16+
#endif
17+
1418
/**
1519
* @brief check if attr is for SMP service
1620
*
@@ -64,4 +68,8 @@ enum sid_ble_id_values {
6468
BUILD_ASSERT(_BT_ID_MAX <= CONFIG_BT_ID_MAX,
6569
"Too many BT Ids! increase CONFIG_BT_ID_MAX, to match _BT_ID_MAX");
6670
#endif
71+
72+
#ifdef __cplusplus
73+
}
74+
#endif
6775
#endif

utils/include/settings_utils.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
#include <stdlib.h>
1111
#include <stdint.h>
1212

13+
#ifdef __cplusplus
14+
extern "C" {
15+
#endif
16+
1317
#if defined(DEPRECATED_DFU_FLAG_SETTINGS_KEY)
1418
typedef enum { DFU_APPLICATION, SIDEWALK_APPLICATION } app_start_t;
1519
app_start_t application_to_start(void);
@@ -53,4 +57,8 @@ int settings_utils_get_value_size(const char *name, size_t *len);
5357
*/
5458
int settings_utils_load_immediate_value(const char *name, void *dest, size_t len);
5559

60+
#ifdef __cplusplus
61+
}
62+
#endif
63+
5664
#endif /* SETTINGS_UTILS_H */

0 commit comments

Comments
 (0)