zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \ xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g" git grep -l 's\(8\|16\|32\|64\)_t' | \ xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g" Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
ee6fa31af6
commit
a1b77fd589
2364 changed files with 32505 additions and 32505 deletions
|
@ -76,7 +76,7 @@ static int comp_add_elem(struct net_buf_simple *buf, struct bt_mesh_elem *elem,
|
|||
|
||||
static int comp_get_page_0(struct net_buf_simple *buf)
|
||||
{
|
||||
u16_t feat = 0U;
|
||||
uint16_t feat = 0U;
|
||||
const struct bt_mesh_comp *comp;
|
||||
int i;
|
||||
|
||||
|
@ -121,7 +121,7 @@ static void dev_comp_data_get(struct bt_mesh_model *model,
|
|||
struct net_buf_simple *buf)
|
||||
{
|
||||
NET_BUF_SIMPLE_DEFINE(sdu, BT_MESH_TX_SDU_MAX);
|
||||
u8_t page;
|
||||
uint8_t page;
|
||||
|
||||
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
|
||||
ctx->net_idx, ctx->app_idx, ctx->addr, buf->len,
|
||||
|
@ -150,7 +150,7 @@ static struct bt_mesh_model *get_model(struct bt_mesh_elem *elem,
|
|||
struct net_buf_simple *buf, bool *vnd)
|
||||
{
|
||||
if (buf->len < 4) {
|
||||
u16_t id;
|
||||
uint16_t id;
|
||||
|
||||
id = net_buf_simple_pull_le16(buf);
|
||||
|
||||
|
@ -160,7 +160,7 @@ static struct bt_mesh_model *get_model(struct bt_mesh_elem *elem,
|
|||
|
||||
return bt_mesh_model_find(elem, id);
|
||||
} else {
|
||||
u16_t company, id;
|
||||
uint16_t company, id;
|
||||
|
||||
company = net_buf_simple_pull_le16(buf);
|
||||
id = net_buf_simple_pull_le16(buf);
|
||||
|
@ -174,7 +174,7 @@ static struct bt_mesh_model *get_model(struct bt_mesh_elem *elem,
|
|||
}
|
||||
}
|
||||
|
||||
static bool app_key_is_valid(u16_t app_idx)
|
||||
static bool app_key_is_valid(uint16_t app_idx)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -190,9 +190,9 @@ static bool app_key_is_valid(u16_t app_idx)
|
|||
return false;
|
||||
}
|
||||
|
||||
static u8_t _mod_pub_set(struct bt_mesh_model *model, u16_t pub_addr,
|
||||
u16_t app_idx, u8_t cred_flag, u8_t ttl, u8_t period,
|
||||
u8_t retransmit, bool store)
|
||||
static uint8_t _mod_pub_set(struct bt_mesh_model *model, uint16_t pub_addr,
|
||||
uint16_t app_idx, uint8_t cred_flag, uint8_t ttl, uint8_t period,
|
||||
uint8_t retransmit, bool store)
|
||||
{
|
||||
if (!model->pub) {
|
||||
return STATUS_NVAL_PUB_PARAM;
|
||||
|
@ -242,7 +242,7 @@ static u8_t _mod_pub_set(struct bt_mesh_model *model, u16_t pub_addr,
|
|||
model->pub->retransmit = retransmit;
|
||||
|
||||
if (model->pub->update) {
|
||||
s32_t period_ms;
|
||||
int32_t period_ms;
|
||||
|
||||
period_ms = bt_mesh_model_pub_period_get(model);
|
||||
BT_DBG("period %u ms", period_ms);
|
||||
|
@ -262,7 +262,7 @@ static u8_t _mod_pub_set(struct bt_mesh_model *model, u16_t pub_addr,
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static u8_t mod_bind(struct bt_mesh_model *model, u16_t key_idx)
|
||||
static uint8_t mod_bind(struct bt_mesh_model *model, uint16_t key_idx)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -294,7 +294,7 @@ static u8_t mod_bind(struct bt_mesh_model *model, u16_t key_idx)
|
|||
return STATUS_INSUFF_RESOURCES;
|
||||
}
|
||||
|
||||
static u8_t mod_unbind(struct bt_mesh_model *model, u16_t key_idx, bool store)
|
||||
static uint8_t mod_unbind(struct bt_mesh_model *model, uint16_t key_idx, bool store)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -324,7 +324,7 @@ static u8_t mod_unbind(struct bt_mesh_model *model, u16_t key_idx, bool store)
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
struct bt_mesh_app_key *bt_mesh_app_key_alloc(u16_t app_idx)
|
||||
struct bt_mesh_app_key *bt_mesh_app_key_alloc(uint16_t app_idx)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -339,7 +339,7 @@ struct bt_mesh_app_key *bt_mesh_app_key_alloc(u16_t app_idx)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static u8_t app_key_set(u16_t net_idx, u16_t app_idx, const u8_t val[16],
|
||||
static uint8_t app_key_set(uint16_t net_idx, uint16_t app_idx, const uint8_t val[16],
|
||||
bool update)
|
||||
{
|
||||
struct bt_mesh_app_keys *keys;
|
||||
|
@ -433,8 +433,8 @@ static void app_key_add(struct bt_mesh_model *model,
|
|||
struct net_buf_simple *buf)
|
||||
{
|
||||
BT_MESH_MODEL_BUF_DEFINE(msg, OP_APP_KEY_STATUS, 4);
|
||||
u16_t key_net_idx, key_app_idx;
|
||||
u8_t status;
|
||||
uint16_t key_net_idx, key_app_idx;
|
||||
uint8_t status;
|
||||
|
||||
key_idx_unpack(buf, &key_net_idx, &key_app_idx);
|
||||
|
||||
|
@ -458,8 +458,8 @@ static void app_key_update(struct bt_mesh_model *model,
|
|||
struct net_buf_simple *buf)
|
||||
{
|
||||
BT_MESH_MODEL_BUF_DEFINE(msg, OP_APP_KEY_STATUS, 4);
|
||||
u16_t key_net_idx, key_app_idx;
|
||||
u8_t status;
|
||||
uint16_t key_net_idx, key_app_idx;
|
||||
uint8_t status;
|
||||
|
||||
key_idx_unpack(buf, &key_net_idx, &key_app_idx);
|
||||
|
||||
|
@ -479,7 +479,7 @@ static void app_key_update(struct bt_mesh_model *model,
|
|||
}
|
||||
|
||||
struct unbind_data {
|
||||
u16_t app_idx;
|
||||
uint16_t app_idx;
|
||||
bool store;
|
||||
};
|
||||
|
||||
|
@ -512,9 +512,9 @@ static void app_key_del(struct bt_mesh_model *model,
|
|||
struct net_buf_simple *buf)
|
||||
{
|
||||
BT_MESH_MODEL_BUF_DEFINE(msg, OP_APP_KEY_STATUS, 4);
|
||||
u16_t key_net_idx, key_app_idx;
|
||||
uint16_t key_net_idx, key_app_idx;
|
||||
struct bt_mesh_app_key *key;
|
||||
u8_t status;
|
||||
uint8_t status;
|
||||
|
||||
key_idx_unpack(buf, &key_net_idx, &key_app_idx);
|
||||
|
||||
|
@ -563,8 +563,8 @@ static void app_key_get(struct bt_mesh_model *model,
|
|||
{
|
||||
BT_MESH_MODEL_BUF_DEFINE(msg, OP_APP_KEY_LIST,
|
||||
3 + IDX_LEN(CONFIG_BT_MESH_APP_KEY_COUNT));
|
||||
u16_t get_idx, i, prev;
|
||||
u8_t status;
|
||||
uint16_t get_idx, i, prev;
|
||||
uint8_t status;
|
||||
|
||||
get_idx = net_buf_simple_pull_le16(buf);
|
||||
if (get_idx > 0xfff) {
|
||||
|
@ -903,9 +903,9 @@ static void relay_set(struct bt_mesh_model *model,
|
|||
|
||||
static void send_mod_pub_status(struct bt_mesh_model *cfg_mod,
|
||||
struct bt_mesh_msg_ctx *ctx,
|
||||
u16_t elem_addr, u16_t pub_addr,
|
||||
uint16_t elem_addr, uint16_t pub_addr,
|
||||
bool vnd, struct bt_mesh_model *mod,
|
||||
u8_t status, u8_t *mod_id)
|
||||
uint8_t status, uint8_t *mod_id)
|
||||
{
|
||||
BT_MESH_MODEL_BUF_DEFINE(msg, OP_MOD_PUB_STATUS, 14);
|
||||
|
||||
|
@ -917,11 +917,11 @@ static void send_mod_pub_status(struct bt_mesh_model *cfg_mod,
|
|||
if (status != STATUS_SUCCESS) {
|
||||
(void)memset(net_buf_simple_add(&msg, 7), 0, 7);
|
||||
} else {
|
||||
u16_t idx_cred;
|
||||
uint16_t idx_cred;
|
||||
|
||||
net_buf_simple_add_le16(&msg, pub_addr);
|
||||
|
||||
idx_cred = mod->pub->key | (u16_t)mod->pub->cred << 12;
|
||||
idx_cred = mod->pub->key | (uint16_t)mod->pub->cred << 12;
|
||||
net_buf_simple_add_le16(&msg, idx_cred);
|
||||
net_buf_simple_add_u8(&msg, mod->pub->ttl);
|
||||
net_buf_simple_add_u8(&msg, mod->pub->period);
|
||||
|
@ -943,10 +943,10 @@ static void mod_pub_get(struct bt_mesh_model *model,
|
|||
struct bt_mesh_msg_ctx *ctx,
|
||||
struct net_buf_simple *buf)
|
||||
{
|
||||
u16_t elem_addr, pub_addr = 0U;
|
||||
uint16_t elem_addr, pub_addr = 0U;
|
||||
struct bt_mesh_model *mod;
|
||||
struct bt_mesh_elem *elem;
|
||||
u8_t *mod_id, status;
|
||||
uint8_t *mod_id, status;
|
||||
bool vnd;
|
||||
|
||||
elem_addr = net_buf_simple_pull_le16(buf);
|
||||
|
@ -990,11 +990,11 @@ static void mod_pub_set(struct bt_mesh_model *model,
|
|||
struct bt_mesh_msg_ctx *ctx,
|
||||
struct net_buf_simple *buf)
|
||||
{
|
||||
u8_t retransmit, status, pub_ttl, pub_period, cred_flag;
|
||||
u16_t elem_addr, pub_addr, pub_app_idx;
|
||||
uint8_t retransmit, status, pub_ttl, pub_period, cred_flag;
|
||||
uint16_t elem_addr, pub_addr, pub_app_idx;
|
||||
struct bt_mesh_model *mod;
|
||||
struct bt_mesh_elem *elem;
|
||||
u8_t *mod_id;
|
||||
uint8_t *mod_id;
|
||||
bool vnd;
|
||||
|
||||
elem_addr = net_buf_simple_pull_le16(buf);
|
||||
|
@ -1048,7 +1048,7 @@ send_status:
|
|||
status, mod_id);
|
||||
}
|
||||
|
||||
struct label *get_label(u16_t index)
|
||||
struct label *get_label(uint16_t index)
|
||||
{
|
||||
if (index >= ARRAY_SIZE(labels)) {
|
||||
return NULL;
|
||||
|
@ -1066,7 +1066,7 @@ static inline void va_store(struct label *store)
|
|||
}
|
||||
}
|
||||
|
||||
static struct label *va_find(const u8_t *label_uuid,
|
||||
static struct label *va_find(const uint8_t *label_uuid,
|
||||
struct label **free_slot)
|
||||
{
|
||||
struct label *match = NULL;
|
||||
|
@ -1092,7 +1092,7 @@ static struct label *va_find(const u8_t *label_uuid,
|
|||
return match;
|
||||
}
|
||||
|
||||
static u8_t va_add(u8_t *label_uuid, u16_t *addr)
|
||||
static uint8_t va_add(uint8_t *label_uuid, uint16_t *addr)
|
||||
{
|
||||
struct label *update, *free_slot = NULL;
|
||||
|
||||
|
@ -1119,7 +1119,7 @@ static u8_t va_add(u8_t *label_uuid, u16_t *addr)
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static u8_t va_del(u8_t *label_uuid, u16_t *addr)
|
||||
static uint8_t va_del(uint8_t *label_uuid, uint16_t *addr)
|
||||
{
|
||||
struct label *update;
|
||||
|
||||
|
@ -1144,7 +1144,7 @@ static u8_t va_del(u8_t *label_uuid, u16_t *addr)
|
|||
|
||||
static size_t mod_sub_list_clear(struct bt_mesh_model *mod)
|
||||
{
|
||||
u8_t *label_uuid;
|
||||
uint8_t *label_uuid;
|
||||
size_t clear_count;
|
||||
int i;
|
||||
|
||||
|
@ -1178,12 +1178,12 @@ static void mod_pub_va_set(struct bt_mesh_model *model,
|
|||
struct bt_mesh_msg_ctx *ctx,
|
||||
struct net_buf_simple *buf)
|
||||
{
|
||||
u8_t retransmit, status, pub_ttl, pub_period, cred_flag;
|
||||
u16_t elem_addr, pub_addr, pub_app_idx;
|
||||
uint8_t retransmit, status, pub_ttl, pub_period, cred_flag;
|
||||
uint16_t elem_addr, pub_addr, pub_app_idx;
|
||||
struct bt_mesh_model *mod;
|
||||
struct bt_mesh_elem *elem;
|
||||
u8_t *label_uuid;
|
||||
u8_t *mod_id;
|
||||
uint8_t *label_uuid;
|
||||
uint8_t *mod_id;
|
||||
bool vnd;
|
||||
|
||||
elem_addr = net_buf_simple_pull_le16(buf);
|
||||
|
@ -1263,10 +1263,10 @@ static void mod_pub_va_set(struct bt_mesh_model *model,
|
|||
struct bt_mesh_msg_ctx *ctx,
|
||||
struct net_buf_simple *buf)
|
||||
{
|
||||
u8_t *mod_id, status;
|
||||
uint8_t *mod_id, status;
|
||||
struct bt_mesh_model *mod;
|
||||
struct bt_mesh_elem *elem;
|
||||
u16_t elem_addr, pub_addr = 0U;
|
||||
uint16_t elem_addr, pub_addr = 0U;
|
||||
bool vnd;
|
||||
|
||||
elem_addr = net_buf_simple_pull_le16(buf);
|
||||
|
@ -1309,8 +1309,8 @@ send_status:
|
|||
#endif /* CONFIG_BT_MESH_LABEL_COUNT > 0 */
|
||||
|
||||
static void send_mod_sub_status(struct bt_mesh_model *model,
|
||||
struct bt_mesh_msg_ctx *ctx, u8_t status,
|
||||
u16_t elem_addr, u16_t sub_addr, u8_t *mod_id,
|
||||
struct bt_mesh_msg_ctx *ctx, uint8_t status,
|
||||
uint16_t elem_addr, uint16_t sub_addr, uint8_t *mod_id,
|
||||
bool vnd)
|
||||
{
|
||||
BT_MESH_MODEL_BUF_DEFINE(msg, OP_MOD_SUB_STATUS, 9);
|
||||
|
@ -1339,12 +1339,12 @@ static void mod_sub_add(struct bt_mesh_model *model,
|
|||
struct bt_mesh_msg_ctx *ctx,
|
||||
struct net_buf_simple *buf)
|
||||
{
|
||||
u16_t elem_addr, sub_addr;
|
||||
uint16_t elem_addr, sub_addr;
|
||||
struct bt_mesh_model *mod;
|
||||
struct bt_mesh_elem *elem;
|
||||
u8_t *mod_id;
|
||||
u8_t status;
|
||||
u16_t *entry;
|
||||
uint8_t *mod_id;
|
||||
uint8_t status;
|
||||
uint16_t *entry;
|
||||
bool vnd;
|
||||
|
||||
elem_addr = net_buf_simple_pull_le16(buf);
|
||||
|
@ -1412,12 +1412,12 @@ static void mod_sub_del(struct bt_mesh_model *model,
|
|||
struct bt_mesh_msg_ctx *ctx,
|
||||
struct net_buf_simple *buf)
|
||||
{
|
||||
u16_t elem_addr, sub_addr;
|
||||
uint16_t elem_addr, sub_addr;
|
||||
struct bt_mesh_model *mod;
|
||||
struct bt_mesh_elem *elem;
|
||||
u8_t *mod_id;
|
||||
u16_t *match;
|
||||
u8_t status;
|
||||
uint8_t *mod_id;
|
||||
uint16_t *match;
|
||||
uint8_t status;
|
||||
bool vnd;
|
||||
|
||||
elem_addr = net_buf_simple_pull_le16(buf);
|
||||
|
@ -1475,7 +1475,7 @@ send_status:
|
|||
}
|
||||
|
||||
static enum bt_mesh_walk mod_sub_clear_visitor(struct bt_mesh_model *mod,
|
||||
u32_t depth, void *user_data)
|
||||
uint32_t depth, void *user_data)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_BT_MESH_LOW_POWER)) {
|
||||
bt_mesh_lpn_group_del(mod->groups, ARRAY_SIZE(mod->groups));
|
||||
|
@ -1490,11 +1490,11 @@ static void mod_sub_overwrite(struct bt_mesh_model *model,
|
|||
struct bt_mesh_msg_ctx *ctx,
|
||||
struct net_buf_simple *buf)
|
||||
{
|
||||
u16_t elem_addr, sub_addr;
|
||||
uint16_t elem_addr, sub_addr;
|
||||
struct bt_mesh_model *mod;
|
||||
struct bt_mesh_elem *elem;
|
||||
u8_t *mod_id;
|
||||
u8_t status;
|
||||
uint8_t *mod_id;
|
||||
uint8_t status;
|
||||
bool vnd;
|
||||
|
||||
elem_addr = net_buf_simple_pull_le16(buf);
|
||||
|
@ -1559,9 +1559,9 @@ static void mod_sub_del_all(struct bt_mesh_model *model,
|
|||
{
|
||||
struct bt_mesh_model *mod;
|
||||
struct bt_mesh_elem *elem;
|
||||
u16_t elem_addr;
|
||||
u8_t *mod_id;
|
||||
u8_t status;
|
||||
uint16_t elem_addr;
|
||||
uint8_t *mod_id;
|
||||
uint8_t status;
|
||||
bool vnd;
|
||||
|
||||
elem_addr = net_buf_simple_pull_le16(buf);
|
||||
|
@ -1603,12 +1603,12 @@ send_status:
|
|||
}
|
||||
|
||||
struct mod_sub_list_ctx {
|
||||
u16_t elem_idx;
|
||||
uint16_t elem_idx;
|
||||
struct net_buf_simple *msg;
|
||||
};
|
||||
|
||||
static enum bt_mesh_walk mod_sub_list_visitor(struct bt_mesh_model *mod,
|
||||
u32_t depth, void *ctx)
|
||||
uint32_t depth, void *ctx)
|
||||
{
|
||||
struct mod_sub_list_ctx *visit = ctx;
|
||||
int count = 0;
|
||||
|
@ -1647,7 +1647,7 @@ static void mod_sub_get(struct bt_mesh_model *model,
|
|||
struct mod_sub_list_ctx visit_ctx;
|
||||
struct bt_mesh_model *mod;
|
||||
struct bt_mesh_elem *elem;
|
||||
u16_t addr, id;
|
||||
uint16_t addr, id;
|
||||
|
||||
addr = net_buf_simple_pull_le16(buf);
|
||||
if (!BT_MESH_ADDR_IS_UNICAST(addr)) {
|
||||
|
@ -1700,7 +1700,7 @@ static void mod_sub_get_vnd(struct bt_mesh_model *model,
|
|||
NET_BUF_SIMPLE_DEFINE(msg, BT_MESH_TX_SDU_MAX);
|
||||
struct bt_mesh_model *mod;
|
||||
struct bt_mesh_elem *elem;
|
||||
u16_t company, addr, id;
|
||||
uint16_t company, addr, id;
|
||||
|
||||
addr = net_buf_simple_pull_le16(buf);
|
||||
if (!BT_MESH_ADDR_IS_UNICAST(addr)) {
|
||||
|
@ -1753,13 +1753,13 @@ static void mod_sub_va_add(struct bt_mesh_model *model,
|
|||
struct bt_mesh_msg_ctx *ctx,
|
||||
struct net_buf_simple *buf)
|
||||
{
|
||||
u16_t elem_addr, sub_addr;
|
||||
uint16_t elem_addr, sub_addr;
|
||||
struct bt_mesh_model *mod;
|
||||
struct bt_mesh_elem *elem;
|
||||
u8_t *label_uuid;
|
||||
u8_t *mod_id;
|
||||
u16_t *entry;
|
||||
u8_t status;
|
||||
uint8_t *label_uuid;
|
||||
uint8_t *mod_id;
|
||||
uint16_t *entry;
|
||||
uint8_t status;
|
||||
bool vnd;
|
||||
|
||||
elem_addr = net_buf_simple_pull_le16(buf);
|
||||
|
@ -1828,13 +1828,13 @@ static void mod_sub_va_del(struct bt_mesh_model *model,
|
|||
struct bt_mesh_msg_ctx *ctx,
|
||||
struct net_buf_simple *buf)
|
||||
{
|
||||
u16_t elem_addr, sub_addr;
|
||||
uint16_t elem_addr, sub_addr;
|
||||
struct bt_mesh_model *mod;
|
||||
struct bt_mesh_elem *elem;
|
||||
u8_t *label_uuid;
|
||||
u8_t *mod_id;
|
||||
u16_t *match;
|
||||
u8_t status;
|
||||
uint8_t *label_uuid;
|
||||
uint8_t *mod_id;
|
||||
uint16_t *match;
|
||||
uint8_t status;
|
||||
bool vnd;
|
||||
|
||||
elem_addr = net_buf_simple_pull_le16(buf);
|
||||
|
@ -1896,12 +1896,12 @@ static void mod_sub_va_overwrite(struct bt_mesh_model *model,
|
|||
struct bt_mesh_msg_ctx *ctx,
|
||||
struct net_buf_simple *buf)
|
||||
{
|
||||
u16_t elem_addr, sub_addr = BT_MESH_ADDR_UNASSIGNED;
|
||||
uint16_t elem_addr, sub_addr = BT_MESH_ADDR_UNASSIGNED;
|
||||
struct bt_mesh_model *mod;
|
||||
struct bt_mesh_elem *elem;
|
||||
u8_t *label_uuid;
|
||||
u8_t *mod_id;
|
||||
u8_t status;
|
||||
uint8_t *label_uuid;
|
||||
uint8_t *mod_id;
|
||||
uint8_t status;
|
||||
bool vnd;
|
||||
|
||||
elem_addr = net_buf_simple_pull_le16(buf);
|
||||
|
@ -1962,9 +1962,9 @@ static void mod_sub_va_add(struct bt_mesh_model *model,
|
|||
{
|
||||
struct bt_mesh_model *mod;
|
||||
struct bt_mesh_elem *elem;
|
||||
u16_t elem_addr;
|
||||
u8_t *mod_id;
|
||||
u8_t status;
|
||||
uint16_t elem_addr;
|
||||
uint8_t *mod_id;
|
||||
uint8_t status;
|
||||
bool vnd;
|
||||
|
||||
elem_addr = net_buf_simple_pull_le16(buf);
|
||||
|
@ -2003,9 +2003,9 @@ static void mod_sub_va_del(struct bt_mesh_model *model,
|
|||
struct net_buf_simple *buf)
|
||||
{
|
||||
struct bt_mesh_elem *elem;
|
||||
u16_t elem_addr;
|
||||
u8_t *mod_id;
|
||||
u8_t status;
|
||||
uint16_t elem_addr;
|
||||
uint8_t *mod_id;
|
||||
uint8_t status;
|
||||
bool vnd;
|
||||
|
||||
elem_addr = net_buf_simple_pull_le16(buf);
|
||||
|
@ -2042,9 +2042,9 @@ static void mod_sub_va_overwrite(struct bt_mesh_model *model,
|
|||
struct net_buf_simple *buf)
|
||||
{
|
||||
struct bt_mesh_elem *elem;
|
||||
u16_t elem_addr;
|
||||
u8_t *mod_id;
|
||||
u8_t status;
|
||||
uint16_t elem_addr;
|
||||
uint8_t *mod_id;
|
||||
uint8_t status;
|
||||
bool vnd;
|
||||
|
||||
elem_addr = net_buf_simple_pull_le16(buf);
|
||||
|
@ -2079,7 +2079,7 @@ send_status:
|
|||
|
||||
static void send_net_key_status(struct bt_mesh_model *model,
|
||||
struct bt_mesh_msg_ctx *ctx,
|
||||
u16_t idx, u8_t status)
|
||||
uint16_t idx, uint8_t status)
|
||||
{
|
||||
BT_MESH_MODEL_BUF_DEFINE(msg, OP_NET_KEY_STATUS, 3);
|
||||
|
||||
|
@ -2098,7 +2098,7 @@ static void net_key_add(struct bt_mesh_model *model,
|
|||
struct net_buf_simple *buf)
|
||||
{
|
||||
struct bt_mesh_subnet *sub;
|
||||
u16_t idx;
|
||||
uint16_t idx;
|
||||
int err;
|
||||
|
||||
idx = net_buf_simple_pull_le16(buf);
|
||||
|
@ -2129,7 +2129,7 @@ static void net_key_add(struct bt_mesh_model *model,
|
|||
|
||||
/* Check for already existing subnet */
|
||||
if (sub->net_idx == idx) {
|
||||
u8_t status;
|
||||
uint8_t status;
|
||||
|
||||
if (memcmp(buf->data, sub->keys[0].net, 16)) {
|
||||
status = STATUS_IDX_ALREADY_STORED;
|
||||
|
@ -2173,7 +2173,7 @@ static void net_key_update(struct bt_mesh_model *model,
|
|||
struct net_buf_simple *buf)
|
||||
{
|
||||
struct bt_mesh_subnet *sub;
|
||||
u16_t idx;
|
||||
uint16_t idx;
|
||||
int err;
|
||||
|
||||
idx = net_buf_simple_pull_le16(buf);
|
||||
|
@ -2254,8 +2254,8 @@ static void net_key_del(struct bt_mesh_model *model,
|
|||
struct net_buf_simple *buf)
|
||||
{
|
||||
struct bt_mesh_subnet *sub;
|
||||
u16_t del_idx;
|
||||
u8_t status;
|
||||
uint16_t del_idx;
|
||||
uint8_t status;
|
||||
|
||||
del_idx = net_buf_simple_pull_le16(buf);
|
||||
if (del_idx > 0xfff) {
|
||||
|
@ -2295,7 +2295,7 @@ static void net_key_get(struct bt_mesh_model *model,
|
|||
{
|
||||
BT_MESH_MODEL_BUF_DEFINE(msg, OP_NET_KEY_LIST,
|
||||
IDX_LEN(CONFIG_BT_MESH_SUBNET_COUNT));
|
||||
u16_t prev, i;
|
||||
uint16_t prev, i;
|
||||
|
||||
bt_mesh_model_msg_init(&msg, OP_NET_KEY_LIST);
|
||||
|
||||
|
@ -2331,8 +2331,8 @@ static void node_identity_get(struct bt_mesh_model *model,
|
|||
{
|
||||
BT_MESH_MODEL_BUF_DEFINE(msg, OP_NODE_IDENTITY_STATUS, 4);
|
||||
struct bt_mesh_subnet *sub;
|
||||
u8_t node_id;
|
||||
u16_t idx;
|
||||
uint8_t node_id;
|
||||
uint16_t idx;
|
||||
|
||||
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
|
||||
ctx->net_idx, ctx->app_idx, ctx->addr, buf->len,
|
||||
|
@ -2369,8 +2369,8 @@ static void node_identity_set(struct bt_mesh_model *model,
|
|||
{
|
||||
BT_MESH_MODEL_BUF_DEFINE(msg, OP_NODE_IDENTITY_STATUS, 4);
|
||||
struct bt_mesh_subnet *sub;
|
||||
u8_t node_id;
|
||||
u16_t idx;
|
||||
uint8_t node_id;
|
||||
uint16_t idx;
|
||||
|
||||
BT_DBG("net_idx 0x%04x app_idx 0x%04x src 0x%04x len %u: %s",
|
||||
ctx->net_idx, ctx->app_idx, ctx->addr, buf->len,
|
||||
|
@ -2418,8 +2418,8 @@ static void node_identity_set(struct bt_mesh_model *model,
|
|||
|
||||
static void create_mod_app_status(struct net_buf_simple *msg,
|
||||
struct bt_mesh_model *mod, bool vnd,
|
||||
u16_t elem_addr, u16_t app_idx,
|
||||
u8_t status, u8_t *mod_id)
|
||||
uint16_t elem_addr, uint16_t app_idx,
|
||||
uint8_t status, uint8_t *mod_id)
|
||||
{
|
||||
bt_mesh_model_msg_init(msg, OP_MOD_APP_STATUS);
|
||||
|
||||
|
@ -2439,10 +2439,10 @@ static void mod_app_bind(struct bt_mesh_model *model,
|
|||
struct net_buf_simple *buf)
|
||||
{
|
||||
BT_MESH_MODEL_BUF_DEFINE(msg, OP_MOD_APP_STATUS, 9);
|
||||
u16_t elem_addr, key_app_idx;
|
||||
uint16_t elem_addr, key_app_idx;
|
||||
struct bt_mesh_model *mod;
|
||||
struct bt_mesh_elem *elem;
|
||||
u8_t *mod_id, status;
|
||||
uint8_t *mod_id, status;
|
||||
bool vnd;
|
||||
|
||||
elem_addr = net_buf_simple_pull_le16(buf);
|
||||
|
@ -2496,10 +2496,10 @@ static void mod_app_unbind(struct bt_mesh_model *model,
|
|||
struct net_buf_simple *buf)
|
||||
{
|
||||
BT_MESH_MODEL_BUF_DEFINE(msg, OP_MOD_APP_STATUS, 9);
|
||||
u16_t elem_addr, key_app_idx;
|
||||
uint16_t elem_addr, key_app_idx;
|
||||
struct bt_mesh_model *mod;
|
||||
struct bt_mesh_elem *elem;
|
||||
u8_t *mod_id, status;
|
||||
uint8_t *mod_id, status;
|
||||
bool vnd;
|
||||
|
||||
elem_addr = net_buf_simple_pull_le16(buf);
|
||||
|
@ -2554,8 +2554,8 @@ static void mod_app_get(struct bt_mesh_model *model,
|
|||
9 + KEY_LIST_LEN)));
|
||||
struct bt_mesh_model *mod;
|
||||
struct bt_mesh_elem *elem;
|
||||
u8_t *mod_id, status;
|
||||
u16_t elem_addr;
|
||||
uint8_t *mod_id, status;
|
||||
uint16_t elem_addr;
|
||||
bool vnd;
|
||||
|
||||
elem_addr = net_buf_simple_pull_le16(buf);
|
||||
|
@ -2710,8 +2710,8 @@ static void lpn_timeout_get(struct bt_mesh_model *model,
|
|||
{
|
||||
BT_MESH_MODEL_BUF_DEFINE(msg, OP_LPN_TIMEOUT_STATUS, 5);
|
||||
struct bt_mesh_friend *frnd;
|
||||
u16_t lpn_addr;
|
||||
s32_t timeout_ms;
|
||||
uint16_t lpn_addr;
|
||||
int32_t timeout_ms;
|
||||
|
||||
lpn_addr = net_buf_simple_pull_le16(buf);
|
||||
|
||||
|
@ -2749,7 +2749,7 @@ send_rsp:
|
|||
|
||||
static void send_krp_status(struct bt_mesh_model *model,
|
||||
struct bt_mesh_msg_ctx *ctx,
|
||||
u16_t idx, u8_t phase, u8_t status)
|
||||
uint16_t idx, uint8_t phase, uint8_t status)
|
||||
{
|
||||
BT_MESH_MODEL_BUF_DEFINE(msg, OP_KRP_STATUS, 4);
|
||||
|
||||
|
@ -2768,7 +2768,7 @@ static void krp_get(struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx,
|
|||
struct net_buf_simple *buf)
|
||||
{
|
||||
struct bt_mesh_subnet *sub;
|
||||
u16_t idx;
|
||||
uint16_t idx;
|
||||
|
||||
idx = net_buf_simple_pull_le16(buf);
|
||||
if (idx > 0xfff) {
|
||||
|
@ -2791,8 +2791,8 @@ static void krp_set(struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx,
|
|||
struct net_buf_simple *buf)
|
||||
{
|
||||
struct bt_mesh_subnet *sub;
|
||||
u8_t phase;
|
||||
u16_t idx;
|
||||
uint8_t phase;
|
||||
uint16_t idx;
|
||||
|
||||
idx = net_buf_simple_pull_le16(buf);
|
||||
phase = net_buf_simple_pull_u8(buf);
|
||||
|
@ -2840,7 +2840,7 @@ static void krp_set(struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx,
|
|||
send_krp_status(model, ctx, idx, sub->kr_phase, STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
static u8_t hb_log(u16_t val)
|
||||
static uint8_t hb_log(uint16_t val)
|
||||
{
|
||||
if (!val) {
|
||||
return 0x00;
|
||||
|
@ -2851,7 +2851,7 @@ static u8_t hb_log(u16_t val)
|
|||
}
|
||||
}
|
||||
|
||||
static u8_t hb_pub_count_log(u16_t val)
|
||||
static uint8_t hb_pub_count_log(uint16_t val)
|
||||
{
|
||||
if (!val) {
|
||||
return 0x00;
|
||||
|
@ -2864,7 +2864,7 @@ static u8_t hb_pub_count_log(u16_t val)
|
|||
}
|
||||
}
|
||||
|
||||
static u16_t hb_pwr2(u8_t val, u8_t sub)
|
||||
static uint16_t hb_pwr2(uint8_t val, uint8_t sub)
|
||||
{
|
||||
if (!val) {
|
||||
return 0x0000;
|
||||
|
@ -2876,16 +2876,16 @@ static u16_t hb_pwr2(u8_t val, u8_t sub)
|
|||
}
|
||||
|
||||
struct hb_pub_param {
|
||||
u16_t dst;
|
||||
u8_t count_log;
|
||||
u8_t period_log;
|
||||
u8_t ttl;
|
||||
u16_t feat;
|
||||
u16_t net_idx;
|
||||
uint16_t dst;
|
||||
uint8_t count_log;
|
||||
uint8_t period_log;
|
||||
uint8_t ttl;
|
||||
uint16_t feat;
|
||||
uint16_t net_idx;
|
||||
} __packed;
|
||||
|
||||
static void hb_pub_send_status(struct bt_mesh_model *model,
|
||||
struct bt_mesh_msg_ctx *ctx, u8_t status,
|
||||
struct bt_mesh_msg_ctx *ctx, uint8_t status,
|
||||
struct hb_pub_param *orig_msg)
|
||||
{
|
||||
BT_MESH_MODEL_BUF_DEFINE(msg, OP_HEARTBEAT_PUB_STATUS, 10);
|
||||
|
@ -2931,8 +2931,8 @@ static void heartbeat_pub_set(struct bt_mesh_model *model,
|
|||
{
|
||||
struct hb_pub_param *param = (void *)buf->data;
|
||||
struct bt_mesh_cfg_srv *cfg = model->user_data;
|
||||
u16_t dst, feat, idx;
|
||||
u8_t status;
|
||||
uint16_t dst, feat, idx;
|
||||
uint8_t status;
|
||||
|
||||
BT_DBG("src 0x%04x", ctx->addr);
|
||||
|
||||
|
@ -3009,12 +3009,12 @@ failed:
|
|||
}
|
||||
|
||||
static void hb_sub_send_status(struct bt_mesh_model *model,
|
||||
struct bt_mesh_msg_ctx *ctx, u8_t status)
|
||||
struct bt_mesh_msg_ctx *ctx, uint8_t status)
|
||||
{
|
||||
BT_MESH_MODEL_BUF_DEFINE(msg, OP_HEARTBEAT_SUB_STATUS, 9);
|
||||
struct bt_mesh_cfg_srv *cfg = model->user_data;
|
||||
u16_t period;
|
||||
s64_t uptime;
|
||||
uint16_t period;
|
||||
int64_t uptime;
|
||||
|
||||
BT_DBG("src 0x%04x status 0x%02x", ctx->addr, status);
|
||||
|
||||
|
@ -3054,9 +3054,9 @@ static void heartbeat_sub_set(struct bt_mesh_model *model,
|
|||
struct net_buf_simple *buf)
|
||||
{
|
||||
struct bt_mesh_cfg_srv *cfg = model->user_data;
|
||||
u16_t sub_src, sub_dst;
|
||||
u8_t sub_period;
|
||||
s32_t period_ms;
|
||||
uint16_t sub_src, sub_dst;
|
||||
uint8_t sub_period;
|
||||
int32_t period_ms;
|
||||
|
||||
BT_DBG("src 0x%04x", ctx->addr);
|
||||
|
||||
|
@ -3189,7 +3189,7 @@ static void hb_publish(struct k_work *work)
|
|||
struct bt_mesh_cfg_srv,
|
||||
hb_pub.timer.work);
|
||||
struct bt_mesh_subnet *sub;
|
||||
u16_t period_ms;
|
||||
uint16_t period_ms;
|
||||
|
||||
BT_DBG("hb_pub.count: %u", cfg->hb_pub.count);
|
||||
|
||||
|
@ -3349,7 +3349,7 @@ void bt_mesh_cfg_reset(void)
|
|||
(void)memset(labels, 0, sizeof(labels));
|
||||
}
|
||||
|
||||
void bt_mesh_heartbeat(u16_t src, u16_t dst, u8_t hops, u16_t feat)
|
||||
void bt_mesh_heartbeat(uint16_t src, uint16_t dst, uint8_t hops, uint16_t feat)
|
||||
{
|
||||
struct bt_mesh_cfg_srv *cfg = conf;
|
||||
|
||||
|
@ -3379,7 +3379,7 @@ void bt_mesh_heartbeat(u16_t src, u16_t dst, u8_t hops, u16_t feat)
|
|||
}
|
||||
}
|
||||
|
||||
u8_t bt_mesh_net_transmit_get(void)
|
||||
uint8_t bt_mesh_net_transmit_get(void)
|
||||
{
|
||||
if (conf) {
|
||||
return conf->net_transmit;
|
||||
|
@ -3388,7 +3388,7 @@ u8_t bt_mesh_net_transmit_get(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
u8_t bt_mesh_relay_get(void)
|
||||
uint8_t bt_mesh_relay_get(void)
|
||||
{
|
||||
if (conf) {
|
||||
return conf->relay;
|
||||
|
@ -3397,7 +3397,7 @@ u8_t bt_mesh_relay_get(void)
|
|||
return BT_MESH_RELAY_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
u8_t bt_mesh_friend_get(void)
|
||||
uint8_t bt_mesh_friend_get(void)
|
||||
{
|
||||
if (conf) {
|
||||
BT_DBG("conf %p conf->frnd 0x%02x", conf, conf->frnd);
|
||||
|
@ -3407,7 +3407,7 @@ u8_t bt_mesh_friend_get(void)
|
|||
return BT_MESH_FRIEND_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
u8_t bt_mesh_relay_retransmit_get(void)
|
||||
uint8_t bt_mesh_relay_retransmit_get(void)
|
||||
{
|
||||
if (conf) {
|
||||
return conf->relay_retransmit;
|
||||
|
@ -3416,7 +3416,7 @@ u8_t bt_mesh_relay_retransmit_get(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
u8_t bt_mesh_beacon_get(void)
|
||||
uint8_t bt_mesh_beacon_get(void)
|
||||
{
|
||||
if (conf) {
|
||||
return conf->beacon;
|
||||
|
@ -3425,7 +3425,7 @@ u8_t bt_mesh_beacon_get(void)
|
|||
return BT_MESH_BEACON_DISABLED;
|
||||
}
|
||||
|
||||
u8_t bt_mesh_gatt_proxy_get(void)
|
||||
uint8_t bt_mesh_gatt_proxy_get(void)
|
||||
{
|
||||
if (conf) {
|
||||
return conf->gatt_proxy;
|
||||
|
@ -3434,7 +3434,7 @@ u8_t bt_mesh_gatt_proxy_get(void)
|
|||
return BT_MESH_GATT_PROXY_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
u8_t bt_mesh_default_ttl_get(void)
|
||||
uint8_t bt_mesh_default_ttl_get(void)
|
||||
{
|
||||
if (conf) {
|
||||
return conf->default_ttl;
|
||||
|
@ -3443,7 +3443,7 @@ u8_t bt_mesh_default_ttl_get(void)
|
|||
return DEFAULT_TTL;
|
||||
}
|
||||
|
||||
u8_t *bt_mesh_label_uuid_get(u16_t addr)
|
||||
uint8_t *bt_mesh_label_uuid_get(uint16_t addr)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue