diff --git a/Sources/BluetoothGATT/ATTOpcode.swift b/Sources/BluetoothGATT/ATTOpcode.swift index 312c30a35..6c71d96d5 100644 --- a/Sources/BluetoothGATT/ATTOpcode.swift +++ b/Sources/BluetoothGATT/ATTOpcode.swift @@ -67,6 +67,17 @@ public enum ATTOpcode: UInt8, Sendable, CaseIterable { case handleValueConfirmation = 0x1E } +// MARK: - CustomStringConvertible + +#if hasFeature(Embedded) +extension ATTOpcode: CustomStringConvertible { + + public var description: String { + "0x" + rawValue.toHexadecimal() + } +} +#endif + // MARK: - Opcode Type /// ATT protocol opcode categories.