diff --git a/features/FEATURE_BLE/ble/gap/Gap.h b/features/FEATURE_BLE/ble/gap/Gap.h index 7236979b98..2cddf5db88 100644 --- a/features/FEATURE_BLE/ble/gap/Gap.h +++ b/features/FEATURE_BLE/ble/gap/Gap.h @@ -256,7 +256,7 @@ public: */ virtual ble_error_t startAdvertising( advertising_handle_t handle, - adv_duration_t maxDuration = adv_duration_t(0), + adv_duration_t maxDuration = adv_duration_t::forever(), uint8_t maxEvents = 0 ); @@ -347,7 +347,7 @@ public: */ virtual ble_error_t startScan( duplicates_filter_t filtering = duplicates_filter_t::DISABLE, - scan_duration_t duration = scan_duration_t(0), + scan_duration_t duration = scan_duration_t::forever(), scan_period_t period = scan_period_t(0) ); diff --git a/features/FEATURE_BLE/ble/gap/Types.h b/features/FEATURE_BLE/ble/gap/Types.h index bbe2e39890..3e4a826a73 100644 --- a/features/FEATURE_BLE/ble/gap/Types.h +++ b/features/FEATURE_BLE/ble/gap/Types.h @@ -25,8 +25,8 @@ namespace ble { /* BLE units, using microseconds as the common denominator */ typedef Duration > adv_interval_t; -typedef Duration > adv_duration_t; -typedef Duration > scan_duration_t; +typedef Duration, Forever<0x0000> > adv_duration_t; +typedef Duration, Forever<0x0000> > scan_duration_t; typedef Duration > scan_period_t; typedef Duration > scan_interval_t; typedef Duration > scan_window_t;