Skip to content

Commit

Permalink
Bluetooth: Change from bitfields to normal types
Browse files Browse the repository at this point in the history
Since the bt_mesh_msg_ctx struct no longer has a size that is a
multiple of 2, the bitfields might as well be made to normal types
as this will minimize the code generated to access them.

Signed-off-by: Tobias Svehagen <tobias.svehagen@gmail.com>
  • Loading branch information
tsvehagen authored and jhedberg committed Jun 12, 2019
1 parent 4866fa9 commit 1c84d7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/bluetooth/mesh/access.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ struct bt_mesh_msg_ctx {
s8_t recv_rssi;

/** Received TTL value. Not used for sending. */
u8_t recv_ttl:7;
u8_t recv_ttl;

/** Force sending reliably by using segment acknowledgement */
u8_t send_rel:1;
bool send_rel;

/** TTL, or BT_MESH_TTL_DEFAULT for default TTL. */
u8_t send_ttl;
Expand Down
2 changes: 1 addition & 1 deletion subsys/bluetooth/host/mesh/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ int bt_mesh_trans_send(struct bt_mesh_net_tx *tx, struct net_buf_simple *msg,
}

if (msg->len > 11) {
tx->ctx->send_rel = 1U;
tx->ctx->send_rel = true;
}

BT_DBG("net_idx 0x%04x app_idx 0x%04x dst 0x%04x", tx->sub->net_idx,
Expand Down

0 comments on commit 1c84d7c

Please sign in to comment.