D@     (C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableSafe-Convert returned int by hidapi into booleans.**0** means success;  **-1** means failure; !KFor the sake of safety, anything that is not **0** is considered a failure.(C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableSafe"#$%&'()*+,-./0"#$%&'()*+,-./" #$%&'()*+,-./0(C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableSafe123456789:;<=>?@AB123456789:;<=>?@AB123456789:;<=>?@AB(C) 2015 Dimitri SabadieBSD3+Dimitri Sabadie <dimitri.sabadie@gmail.com> experimentalportableSafeAn opaquedevice.Information on a device. Initialize the library.?This function initializes the library. Calling it is not strictly necessary, as it will be called automatically when enumerating or opening devices if it s needed. This function should be called at the beginning of execution however, if there is a chance of handles being opened by different threads simultaneously. Finalize the library.This function frees all of the static data associated with the library. It should be called at the end of execution to avoid memory leaks.kEnumerate all devices for a given vendor ID and product ID. If you need to get all available devices, use .!Enumerate all plugged in devices.C Extract a  out of a pointer on a ".DScan the list of devices.Get a > from the vendor ID, product ID and an optional serial number.Get a  from a path.EWrap a / into a . Calls 6% when unused via garbage collection.'Write an Output report to a HID device.The first byte of data must contain the Report ID. For devices which only support a single report, this must be set to 0x0. The remaining bytes contain the report data. Since the Report ID is mandatory, calls to  will always contain one more byte(s) than the report contains. For example, if a hid report is 16 bytes long, 17 bytes must be passed to , the Report ID (or 0x0, for devices with a single report), followed by the report data (16 bytes). In that example, the length passed in would be 17. will send the data on the first OUT endpoint, if one exists. If it does not, it will send the data through the Control Endpoint Endpoint 0).$Send a Feature report to the device.$Feature reports are sent over the Control endpoint as a Set_Report transfer. The first byte of data must contain the Report ID. For devices which only upport a single report, this must be set to 0x0. The remaining bytes contain the report data. Since the Report ID is mandatory, calls to  will always contain one more byte than the report contains. For example, if a hid report is 16 bytes long, 17 bytes must be passed to : the Report ID (or 0x0, for devices which do not use numbered reports), followed by the report data (16 bytes). In that example, the length passed in would be 17.'Read an Input report from a HID device.Input reports are returned to the host through the INTERRUPT IN endpoint. The first byte will contain the Report number if the device uses numbered reports.4Read an Input report from a HID device with timeout.Input reports are returned to the host through the INTERRUPT IN endpoint. The first byte will contain the Report number if the device uses numbered reports.'Get a feature report from a HID device.Set the first byte of data to the Report ID of the report to be read. Make sure to allow space for this extra byte in data. Upon return, the first byte will still contain the Report ID, and the report data will start in data[1]./Get the manufacturer string from a HID device. (Get the product name from a HID device. 0Get the serial number string from a HID device. )Get an indexed string from a HID device. "Set the blocking mode of a device.Get last error.$FGH I CDE   FG H I CDEJ      !"#$%&'%&())*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN hid-0.2.2-H6c6ytizFSsKy699aVkZC6 System.HIDSystem.HID.Internal.UtilsSystem.HID.Internal.TypesSystem.HID.Internal.FunctionsDevice DeviceInfodevPath devVendorID devProductIDdevSerialNumberdevReleaseNumberdevManufacturerStringdevProductString devUsagePagedevUsagedevInterfaceNumberinitexit enumerate detectDevicesvendorProductSerialDevice pathDevicewriteOutputReportsendFeatureReportreadInputReportreadInputReportTimeoutgetFeatureReportgetManufacturergetProductNamegetSerialNumbergetIndexedString setBlockinggetError$fEqDeviceInfo$fShowDeviceInfo fromHIDRetghc-prim GHC.TypesTrueFalse HIDDeviceInfohidPath hidVendorID hidProductIDhidSerialNumberhidReleaseNumberhidManufacturerStringhidProductString hidUsagePagehidUsagehidInterfaceNumberhidNext HIDDevice$fStorableHIDDeviceInfohidErrorhidGetIndexedStringhidGetSerialNumberStringhidGetProductStringhidGetManufacturerStringhidClosehidGetFeatureReporthidSendFeatureReporthidSetNonblockinghidReadhidReadTimeouthidWrite hidOpenPathhidOpenhidFreeEnumeration hidEnumeratehidExithidInitextractDeviceInfoscanDevs wrapHIDDeviceunDevice maxReadBytes