1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

nimble/scanner: include CODED PHY only if featured

This commit is contained in:
Hauke Petersen 2021-12-06 13:12:55 +01:00
parent 1b15b203cc
commit 56c4460785
2 changed files with 6 additions and 1 deletions

View File

@ -44,7 +44,9 @@ enum {
NIMBLE_SCANNER_LIMITED = 0x02, /**< do limited discovery */
NIMBLE_SCANNER_FILTER_DUPS = 0x04, /**< filter duplicates */
NIMBLE_SCANNER_PHY_1M = 0x10, /**< scan on 1Mbit PHY */
#if IS_USED(MODULE_NIMBLE_PHY_CODED)
NIMBLE_SCANNER_PHY_CODED = 0x20, /**< scan on CODED PHY */
#endif
};
/**

View File

@ -100,9 +100,12 @@ int nimble_scanner_start(void)
uint8_t limited = (_scan_flags & NIMBLE_SCANNER_LIMITED) ? 1 : 0;
const struct ble_gap_ext_disc_params *uncoded =
(_scan_flags & NIMBLE_SCANNER_PHY_1M) ? &_scan_params : NULL;
#if IS_USED(MODULE_NIMBLE_PHY_CODED)
const struct ble_gap_ext_disc_params *coded =
(_scan_flags & NIMBLE_SCANNER_PHY_CODED) ? &_scan_params : NULL;
#else
const struct ble_gap_ext_disc_params *coded = NULL;
#endif
int32_t dur = (_scan_duration == BLE_HS_FOREVER) ? 0
: _scan_duration / 10;