Bluetooth: Mesh: Add header file support for C++
Add preprocessor directive for C++ compatibility. Signed-off-by: Robert Konc <robert@konc.si>
This commit is contained in:
parent
ce8e1ecd2d
commit
62c8fee2ec
7 changed files with 55 additions and 0 deletions
|
@ -17,6 +17,10 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define BT_MESH_ADDR_UNASSIGNED 0x0000
|
||||
#define BT_MESH_ADDR_ALL_NODES 0xffff
|
||||
#define BT_MESH_ADDR_PROXIES 0xfffc
|
||||
|
@ -417,6 +421,10 @@ struct bt_mesh_comp {
|
|||
struct bt_mesh_elem *elem;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Mesh Configuration Client Model Context */
|
||||
struct bt_mesh_cfg_cli {
|
||||
struct bt_mesh_model *model;
|
||||
|
@ -219,6 +223,9 @@ int bt_mesh_cfg_hb_pub_get(u16_t net_idx, u16_t addr,
|
|||
s32_t bt_mesh_cfg_cli_timeout_get(void);
|
||||
void bt_mesh_cfg_cli_timeout_set(s32_t timeout);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Mesh Configuration Server Model Context */
|
||||
struct bt_mesh_cfg_srv {
|
||||
struct bt_mesh_model *model;
|
||||
|
@ -62,6 +66,10 @@ extern const struct bt_mesh_model_op bt_mesh_cfg_srv_op[];
|
|||
BT_MESH_MODEL(BT_MESH_MODEL_ID_CFG_SRV, \
|
||||
bt_mesh_cfg_srv_op, NULL, srv_data)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Mesh Health Client Model Context */
|
||||
struct bt_mesh_health_cli {
|
||||
struct bt_mesh_model *model;
|
||||
|
@ -65,6 +69,10 @@ int bt_mesh_health_attention_set(u16_t net_idx, u16_t addr, u16_t app_idx,
|
|||
s32_t bt_mesh_health_cli_timeout_get(void);
|
||||
void bt_mesh_health_cli_timeout_set(s32_t timeout);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct bt_mesh_health_srv_cb {
|
||||
/* Fetch current faults */
|
||||
int (*fault_get_cur)(struct bt_mesh_model *model, u8_t *test_id,
|
||||
|
@ -83,6 +87,10 @@ extern const struct bt_mesh_model_op bt_mesh_health_srv_op[];
|
|||
BT_MESH_MODEL(BT_MESH_MODEL_ID_HEALTH_SRV, \
|
||||
bt_mesh_health_srv_op, pub, srv)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
BT_MESH_NO_OUTPUT = 0,
|
||||
BT_MESH_BLINK = BIT(0),
|
||||
|
@ -356,6 +360,10 @@ int bt_mesh_lpn_poll(void);
|
|||
*/
|
||||
void bt_mesh_lpn_set_cb(void (*cb)(u16_t friend_addr, bool established));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enable advertising with Node Identity.
|
||||
*
|
||||
|
@ -28,6 +32,10 @@
|
|||
*/
|
||||
int bt_mesh_proxy_identity_enable(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue