Skip to content

Commit 467d132

Browse files
ppryga-nordiccfriedt
authored andcommitted
Bluetooth: controller: Add macro with minimum allowed adv. PDU size
To check if advertising PDU is empty we can compare its length to 1. To avoid use of magic number, the commit provides a macro for that purpose. Signed-off-by: Piotr Pryga <[email protected]>
1 parent 4a13b8b commit 467d132

File tree

1 file changed

+2
-0
lines changed
  • subsys/bluetooth/controller/ll_sw

1 file changed

+2
-0
lines changed

subsys/bluetooth/controller/ll_sw/pdu.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232

3333
#define BYTES2US(bytes, phy) (((bytes)<<3)/BIT((phy&0x3)>>1))
3434

35+
/* Advertisement channel minimum payload size */
36+
#define PDU_AC_PAYLOAD_SIZE_MIN 1
3537
/* Advertisement channel maximum legacy payload size */
3638
#define PDU_AC_LEG_PAYLOAD_SIZE_MAX 37
3739
/* Advertisement channel maximum extended payload size */

0 commit comments

Comments
 (0)