Skip to content

Commit 69b044f

Browse files
committed
BLE: construct disconnection_reason_t from uint8_t (received from HCI)
1 parent a921ab0 commit 69b044f

File tree

1 file changed

+12
-1
lines changed
  • features/FEATURE_BLE/ble/gap

1 file changed

+12
-1
lines changed

features/FEATURE_BLE/ble/gap/Types.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,17 @@ struct disconnection_reason_t : SafeEnum<disconnection_reason_t, uint8_t> {
854854
disconnection_reason_t(type value) : SafeEnum(value)
855855
{
856856
}
857+
858+
/**
859+
* Construct a new instance of disconnection_reason_t.
860+
*
861+
* @param value The value of the local_disconnection_reason_t created.
862+
*
863+
* @note This should only be used for casting raw values from HCI.
864+
*/
865+
disconnection_reason_t(uint8_t value) : SafeEnum(value)
866+
{
867+
}
857868
};
858869

859870
/**
@@ -917,7 +928,7 @@ struct peripheral_privacy_configuration_t {
917928
* @note This configuration is also used when the local device operates as
918929
* an observer.
919930
*/
920-
struct central_privay_configuration_t {
931+
struct central_privacy_configuration_t {
921932
/**
922933
* Indicates if nonresolvable random address should be used when the
923934
* central or observer sends scan request packets.

0 commit comments

Comments
 (0)