Bluetooth: controller: split: Rework with defines for adv set states

Review rework, added comments, TODOs, FIXMEs and converted
magic number use in advertising set state flags to defines.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2020-05-11 15:36:12 +05:30 committed by Carles Cufí
commit 28f4c1b703
12 changed files with 63 additions and 14 deletions

View file

@ -55,7 +55,9 @@ uint32_t ll_addr_set(uint8_t addr_type, uint8_t const *const bdaddr)
uint32_t status = ull_adv_is_enabled(0);
#if defined(CONFIG_BT_CTLR_ADV_EXT)
if ((status & 5U) == 1U) {
if ((status & (ULL_ADV_ENABLED_BITMASK_ENABLED |
ULL_ADV_ENABLED_BITMASK_EXTENDED)) ==
ULL_ADV_ENABLED_BITMASK_ENABLED) {
#else /* !CONFIG_BT_CTLR_ADV_EXT */
if (status) {
#endif /* !CONFIG_BT_CTLR_ADV_EXT */