diff --git a/features/FEATURE_BLE/ble/common/Duration.h b/features/FEATURE_BLE/ble/common/Duration.h index f4bdd2f3eb..240ff72dbc 100644 --- a/features/FEATURE_BLE/ble/common/Duration.h +++ b/features/FEATURE_BLE/ble/common/Duration.h @@ -68,13 +68,14 @@ struct DefaultRange { }; /** - * Represent the forever value that can be used in Duration. + * Represent an integral compile time value that can be used in Duration. * + * @tparam T Type of the integral value. * @tparam V The integer value representing a never ending duration. */ -template -struct Forever { - static const uint32_t VALUE = V; +template +struct Value { + static const T VALUE = V; }; /** @@ -513,8 +514,8 @@ const uint32_t Range::MIN; template const uint32_t Range::MAX; -template -const uint32_t Forever::VALUE; +template +const T Value::VALUE; template const uint32_t Duration::TIME_BASE; diff --git a/features/FEATURE_BLE/ble/gap/Types.h b/features/FEATURE_BLE/ble/gap/Types.h index d8f7c54e82..39b49d791c 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, Forever<0x0000> > adv_duration_t; -typedef Duration, Forever<0x0000> > scan_duration_t; +typedef Duration, Value > adv_duration_t; +typedef Duration, Value > scan_duration_t; typedef Duration > scan_period_t; typedef Duration > scan_interval_t; typedef Duration > scan_window_t;