usb-0.6.0.4: Communicate with USB devices

MaintainerBas van Dijk <v.dijk.bas@gmail.com>

System.USB.Unsafe

Description

This module is not intended for end users. It provides internal and unsafe functions used for extending this package. It is primarily used by the usb-enumerator package.

Synopsis

Documentation

type C'TransferFunc = Ptr C'libusb_device_handle -> CUChar -> Ptr CUChar -> CInt -> Ptr CInt -> CUInt -> IO CIntSource

Handy type synonym for the libusb transfer functions.

getDevHndlPtr :: DeviceHandle -> Ptr C'libusb_device_handleSource

Retrieve the pointer to the libusb device handle.

marshalEndpointAddress :: (Bits a, Num a) => EndpointAddress -> aSource

Marshal an EndpointAddress so that it can be used by the libusb transfer functions.

convertUSBException :: CInt -> USBExceptionSource

Convert a C'libusb_error to a USBException. If the C'libusb_error is unknown an error is thrown.