usb-hid-0.1.0.0: Parser and request Library for USB HIDs

Safe HaskellNone
LanguageHaskell2010

System.USB.HID.Requests

Contents

Synopsis

Request Types

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).