Skip to content

Commit

Permalink
Added HostControllerIO.DeviceInformation.type
Browse files Browse the repository at this point in the history
  • Loading branch information
colemancda committed May 16, 2022
1 parent f63414e commit fc7de8b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Sources/BluetoothLinux/HCI/IOCTL/HCIDeviceInformation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ public extension HostControllerIO.DeviceInformation {
var flags: HCIDeviceOptions {
return .init(rawValue: bytes.flags)
}

var type: HCIControllerType {
return HCIControllerType(rawValue: CInt((bytes.type & 0x30) >> 4))
}

var busType: HCIBusType {
return HCIBusType(rawValue: CInt(bytes.type & 0x0f))
}
}


Expand Down

0 comments on commit fc7de8b

Please sign in to comment.