Bluetooth: Mesh: Make access packet sizes defines public

This commit makes BT_MESH_*_SDU_MAX macros public so that applications
can use them.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit is contained in:
Pavel Vasilyev 2020-12-10 17:26:37 +01:00 committed by Johan Hedberg
parent 12bcf652e6
commit 347a1ab19f
2 changed files with 9 additions and 3 deletions

View file

@ -55,6 +55,15 @@ extern "C" {
#define BT_MESH_IS_DEV_KEY(key) (key == BT_MESH_KEY_DEV_LOCAL || \
key == BT_MESH_KEY_DEV_REMOTE)
/** Maximum payload size of an access message (in octets). */
#define BT_MESH_APP_SEG_SDU_MAX 12
/** Maximum possible payload size of an outgoing access message (in octets). */
#define BT_MESH_TX_SDU_MAX (CONFIG_BT_MESH_TX_SEG_MAX * \
BT_MESH_APP_SEG_SDU_MAX)
/** Maximum possible payload size of an incoming access message (in octets). */
#define BT_MESH_RX_SDU_MAX (CONFIG_BT_MESH_RX_SEG_MAX * \
BT_MESH_APP_SEG_SDU_MAX)
/** Helper to define a mesh element within an array.
*
* In case the element has no SIG or Vendor models the helper

View file

@ -10,9 +10,6 @@
#define BT_MESH_SDU_UNSEG_MAX 11
#define BT_MESH_CTL_SEG_SDU_MAX 8
#define BT_MESH_APP_SEG_SDU_MAX 12
#define BT_MESH_TX_SDU_MAX (CONFIG_BT_MESH_TX_SEG_MAX * BT_MESH_APP_SEG_SDU_MAX)
#define BT_MESH_RX_SDU_MAX (CONFIG_BT_MESH_RX_SEG_MAX * BT_MESH_APP_SEG_SDU_MAX)
#define BT_MESH_RX_CTL_MAX (CONFIG_BT_MESH_RX_SEG_MAX * BT_MESH_CTL_SEG_SDU_MAX)
#define TRANS_SEQ_ZERO_MASK ((uint16_t)BIT_MASK(13))