diff --git a/pkg/nimble/scanner/include/nimble_scanner.h b/pkg/nimble/scanner/include/nimble_scanner.h index 02144a4a23..a58d2e6754 100644 --- a/pkg/nimble/scanner/include/nimble_scanner.h +++ b/pkg/nimble/scanner/include/nimble_scanner.h @@ -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 }; /** diff --git a/pkg/nimble/scanner/nimble_scanner.c b/pkg/nimble/scanner/nimble_scanner.c index ba82cc6807..69d832b2df 100644 --- a/pkg/nimble/scanner/nimble_scanner.c +++ b/pkg/nimble/scanner/nimble_scanner.c @@ -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;