mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ble_mesh: stack: Remove some not used variables & functions
This commit is contained in:
parent
dfd0cd5f3e
commit
c3e702da05
@ -20,10 +20,6 @@
|
||||
#include "mesh_common.h"
|
||||
#include "cfg_cli.h"
|
||||
|
||||
s32_t config_msg_timeout;
|
||||
|
||||
static bt_mesh_config_client_t *cli;
|
||||
|
||||
static const bt_mesh_client_op_pair_t cfg_op_pair[] = {
|
||||
{ OP_BEACON_GET, OP_BEACON_STATUS },
|
||||
{ OP_BEACON_SET, OP_BEACON_STATUS },
|
||||
@ -1383,16 +1379,6 @@ int bt_mesh_cfg_net_transmit_set(bt_mesh_client_common_param_t *param, u8_t tran
|
||||
return send_msg_with_u8(param, OP_NET_TRANSMIT_SET, transmit);
|
||||
}
|
||||
|
||||
s32_t bt_mesh_cfg_cli_timeout_get(void)
|
||||
{
|
||||
return config_msg_timeout;
|
||||
}
|
||||
|
||||
void bt_mesh_cfg_cli_timeout_set(s32_t timeout)
|
||||
{
|
||||
config_msg_timeout = timeout;
|
||||
}
|
||||
|
||||
int bt_mesh_cfg_cli_init(struct bt_mesh_model *model, bool primary)
|
||||
{
|
||||
config_internal_data_t *internal = NULL;
|
||||
@ -1433,8 +1419,6 @@ int bt_mesh_cfg_cli_init(struct bt_mesh_model *model, bool primary)
|
||||
bt_mesh_client_clear_list(client->internal_data);
|
||||
}
|
||||
|
||||
cli = client;
|
||||
|
||||
/* Configuration Model security is device-key based */
|
||||
model->keys[0] = BLE_MESH_KEY_DEV;
|
||||
|
||||
@ -1469,11 +1453,9 @@ int bt_mesh_cfg_cli_deinit(struct bt_mesh_model *model, bool primary)
|
||||
|
||||
/* Free the allocated internal data */
|
||||
bt_mesh_free(client->internal_data);
|
||||
cli->internal_data = NULL;
|
||||
client->internal_data = NULL;
|
||||
}
|
||||
|
||||
client = NULL;
|
||||
|
||||
bt_mesh_cfg_client_mutex_free();
|
||||
|
||||
return 0;
|
||||
|
@ -18,10 +18,6 @@
|
||||
#include "mesh_common.h"
|
||||
#include "health_cli.h"
|
||||
|
||||
s32_t health_msg_timeout;
|
||||
|
||||
static bt_mesh_health_client_t *health_cli;
|
||||
|
||||
static const bt_mesh_client_op_pair_t health_op_pair[] = {
|
||||
{ OP_HEALTH_FAULT_GET, OP_HEALTH_FAULT_STATUS },
|
||||
{ OP_HEALTH_FAULT_CLEAR, OP_HEALTH_FAULT_STATUS },
|
||||
@ -350,28 +346,6 @@ int bt_mesh_health_fault_get(bt_mesh_client_common_param_t *param, u16_t cid)
|
||||
return err;
|
||||
}
|
||||
|
||||
s32_t bt_mesh_health_cli_timeout_get(void)
|
||||
{
|
||||
return health_msg_timeout;
|
||||
}
|
||||
|
||||
void bt_mesh_health_cli_timeout_set(s32_t timeout)
|
||||
{
|
||||
health_msg_timeout = timeout;
|
||||
}
|
||||
|
||||
int bt_mesh_health_cli_set(struct bt_mesh_model *model)
|
||||
{
|
||||
if (!model || !model->user_data) {
|
||||
BT_ERR("No Health Client context for given model");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
health_cli = model->user_data;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int bt_mesh_health_cli_init(struct bt_mesh_model *model, bool primary)
|
||||
{
|
||||
health_internal_data_t *internal = NULL;
|
||||
@ -409,11 +383,6 @@ int bt_mesh_health_cli_init(struct bt_mesh_model *model, bool primary)
|
||||
|
||||
bt_mesh_health_client_mutex_new();
|
||||
|
||||
/* Set the default health client pointer */
|
||||
if (!health_cli) {
|
||||
health_cli = client;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -443,9 +412,5 @@ int bt_mesh_health_cli_deinit(struct bt_mesh_model *model, bool primary)
|
||||
|
||||
bt_mesh_health_client_mutex_free();
|
||||
|
||||
if (health_cli) {
|
||||
health_cli = NULL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -135,9 +135,6 @@ int bt_mesh_cfg_hb_pub_get(bt_mesh_client_common_param_t *param);
|
||||
|
||||
int bt_mesh_cfg_node_reset(bt_mesh_client_common_param_t *param);
|
||||
|
||||
s32_t bt_mesh_cfg_cli_timeout_get(void);
|
||||
void bt_mesh_cfg_cli_timeout_set(s32_t timeout);
|
||||
|
||||
/* Configuration Client Status Message Context */
|
||||
|
||||
struct bt_mesh_cfg_comp_data_status {
|
||||
|
@ -34,8 +34,6 @@ extern const struct bt_mesh_model_op bt_mesh_health_cli_op[];
|
||||
BLE_MESH_MODEL(BLE_MESH_MODEL_ID_HEALTH_CLI, \
|
||||
bt_mesh_health_cli_op, NULL, cli_data)
|
||||
|
||||
int bt_mesh_health_cli_set(struct bt_mesh_model *model);
|
||||
|
||||
int bt_mesh_health_fault_get(bt_mesh_client_common_param_t *param, u16_t cid);
|
||||
|
||||
int bt_mesh_health_fault_clear(bt_mesh_client_common_param_t *param,
|
||||
@ -54,9 +52,6 @@ int bt_mesh_health_attention_get(bt_mesh_client_common_param_t *param);
|
||||
int bt_mesh_health_attention_set(bt_mesh_client_common_param_t *param,
|
||||
u8_t attention, bool need_ack);
|
||||
|
||||
s32_t bt_mesh_health_cli_timeout_get(void);
|
||||
void bt_mesh_health_cli_timeout_set(s32_t timeout);
|
||||
|
||||
/* Health Client Status Message Context */
|
||||
|
||||
struct bt_mesh_health_current_status {
|
||||
|
Loading…
Reference in New Issue
Block a user