You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/10/22 08:03:35 UTC

[GitHub] [mynewt-nimble] andrzej-kaczmarek commented on a change in pull request #619: nimble/l2cap: Add smarter CID assignment

andrzej-kaczmarek commented on a change in pull request #619: nimble/l2cap: Add smarter CID assignment
URL: https://github.com/apache/mynewt-nimble/pull/619#discussion_r337373496
 
 

 ##########
 File path: nimble/host/src/ble_l2cap_coc.c
 ##########
 @@ -29,6 +29,9 @@
 
 #define BLE_L2CAP_SDU_SIZE              2
 
+#define BLE_L2CAP_SET_FLAG(flags, flag) (flags |= (1 << flag))
+#define BLE_L2CAP_CLEAR_FLAG(flags, flag) (flags &= ~(1 << flag))
 
 Review comment:
   you should better create `static inline`s which can set and clear bit in complete cid bitmask, it will make code easier to follow. also looking on code below an extra function to get 1st free bit in a cid bitmask will be useful.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services