diff --git a/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h b/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h index 6263c0124..733c718aa 100644 --- a/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h +++ b/components/bt/esp_ble_mesh/api/esp_ble_mesh_defs.h @@ -356,16 +356,16 @@ typedef struct { esp_ble_mesh_model_t *model; uint16_t publish_addr; /*!< Publish Address. */ - uint16_t app_idx; /*!< Publish AppKey Index. */ + uint16_t app_idx:12, /*!< Publish AppKey Index. */ + cred:1; /*!< Friendship Credentials Flag. */ uint8_t ttl; /*!< Publish Time to Live. */ uint8_t retransmit; /*!< Retransmit Count & Interval Steps. */ uint8_t period; /*!< Publish Period. */ - uint16_t period_div: 4, /*!< Divisor for the Period. */ - cred: 1, /*!< Friendship Credentials Flag. */ - fast_period: 1, /*!< Use FastPeriodDivisor */ - count: 3; /*!< Retransmissions left. */ + uint8_t period_div:4, /*!< Divisor for the Period. */ + fast_period:1, /*!< Use FastPeriodDivisor */ + count:3; /*!< Retransmissions left. */ uint32_t period_start; /*!< Start of the current period. */ diff --git a/components/bt/esp_ble_mesh/mesh_core/include/mesh_access.h b/components/bt/esp_ble_mesh/mesh_core/include/mesh_access.h index 0d5e4f66f..8c387a681 100644 --- a/components/bt/esp_ble_mesh/mesh_core/include/mesh_access.h +++ b/components/bt/esp_ble_mesh/mesh_core/include/mesh_access.h @@ -335,15 +335,15 @@ struct bt_mesh_model_pub { struct bt_mesh_model *mod; u16_t addr; /**< Publish Address. */ - u16_t key; /**< Publish AppKey Index. */ + u16_t key:12, /**< Publish AppKey Index. */ + cred:1; /**< Friendship Credentials Flag. */ u8_t ttl; /**< Publish Time to Live. */ u8_t retransmit; /**< Retransmit Count & Interval Steps. */ u8_t period; /**< Publish Period. */ - u16_t period_div: 4, /**< Divisor for the Period. */ - cred: 1, /**< Friendship Credentials Flag. */ - fast_period: 1, /**< Use FastPeriodDivisor */ - count: 3; /**< Retransmissions left. */ + u8_t period_div:4, /**< Divisor for the Period. */ + fast_period:1,/**< Use FastPeriodDivisor */ + count:3; /**< Retransmissions left. */ u32_t period_start; /**< Start of the current period. */