Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data HIDDescriptorClass
- data HIDControlRequest
- data HIDProtocol
- type DescriptorIndex = Word8
- type HIDInterfaceNumber = Word16
- type Duration = Word8
- type ReportID = Word8
- type Report = ByteString
- data ReportType
- getHIDReportDesc :: DeviceHandle -> HIDInterfaceNumber -> Size -> Timeout -> IO HIDReportDesc
- getPhysicalDescriptor :: DeviceHandle -> HIDInterfaceNumber -> DescriptorIndex -> Size -> Timeout -> IO HIDPhysDescSet
- getReport :: DeviceHandle -> ReportType -> ReportID -> HIDInterfaceNumber -> Size -> Timeout -> IO (ByteString, Status)
- setReport :: DeviceHandle -> ReportType -> ReportID -> HIDInterfaceNumber -> Report -> Timeout -> IO (Size, Status)
- getIdle :: DeviceHandle -> HIDInterfaceNumber -> ReportID -> Timeout -> IO (HIDProtocol, Status)
- setIdle :: DeviceHandle -> HIDInterfaceNumber -> Duration -> ReportID -> Timeout -> IO (Size, Status)
- getProtocol :: DeviceHandle -> HIDInterfaceNumber -> Timeout -> IO (HIDProtocol, Status)
- setProtocol :: DeviceHandle -> HIDProtocol -> HIDInterfaceNumber -> Timeout -> IO (Size, Status)
Request Types
data HIDDescriptorClass Source
data HIDControlRequest Source
data HIDProtocol Source
type DescriptorIndex = Word8 Source
type HIDInterfaceNumber = Word16 Source
type Report = ByteString Source
data ReportType Source
HID Requests
These are all specified in the HID Specification Section 7
getHIDReportDesc :: DeviceHandle -> HIDInterfaceNumber -> Size -> Timeout -> IO HIDReportDesc Source
Performs Class
request for the HID report descriptor using the Control pipe
getPhysicalDescriptor :: DeviceHandle -> HIDInterfaceNumber -> DescriptorIndex -> Size -> Timeout -> IO HIDPhysDescSet Source
Performs Class
request for a HID Physical Descriptor set using the Control pipe
getReport :: DeviceHandle -> ReportType -> ReportID -> HIDInterfaceNumber -> Size -> Timeout -> IO (ByteString, Status) Source
The GetReport request allows the host to receive a report via the Control pipe.
setReport :: DeviceHandle -> ReportType -> ReportID -> HIDInterfaceNumber -> Report -> Timeout -> IO (Size, Status) Source
The SetReport request allows the host to send a report to the device, possibly setting the state of input, output, or feature controls.
getIdle :: DeviceHandle -> HIDInterfaceNumber -> ReportID -> Timeout -> IO (HIDProtocol, Status) Source
The GetIdle request reads the current idle rate for a particular Input report
setIdle :: DeviceHandle -> HIDInterfaceNumber -> Duration -> ReportID -> Timeout -> IO (Size, Status) Source
The SetIdle request silences a particular report on the Interrupt In pipe until a new event occurs or the specified amount of time passes.
getProtocol :: DeviceHandle -> HIDInterfaceNumber -> Timeout -> IO (HIDProtocol, Status) Source
The GetProtocol request reads which protocol is currently active (either the boot protocol or the report protocol.)
setProtocol :: DeviceHandle -> HIDProtocol -> HIDInterfaceNumber -> Timeout -> IO (Size, Status) Source
The SetProtocol switches between the boot protocol and the report protocol (or vice versa).