usb-iteratee-0.5: Iteratee enumerators for the usb package

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

System.USB.IO.Iteratee

Description

Iteratee enumerators for endpoints.

Synopsis

Documentation

enumReadBulkSource

Arguments

:: (ReadableChunk s Word8, NullPoint s, MonadBaseControl IO m) 
=> DeviceHandle

A handle for the device to communicate with.

-> EndpointAddress

The address of a valid In and Bulk endpoint to communicate with. Make sure the endpoint belongs to the current alternate setting of a claimed interface which belongs to the device.

-> Size

Chunk size. A good value for this would be the maxPacketSize . endpointMaxPacketSize.

-> Timeout

Timeout (in milliseconds) that this function should wait for each chunk before giving up due to no response being received.

-> Enumerator s m α 

Iteratee enumerator for reading bulk endpoints.

enumReadInterruptSource

Arguments

:: (ReadableChunk s Word8, NullPoint s, MonadBaseControl IO m) 
=> DeviceHandle

A handle for the device to communicate with.

-> EndpointAddress

The address of a valid In and Interrupt endpoint to communicate with. Make sure the endpoint belongs to the current alternate setting of a claimed interface which belongs to the device.

-> Size

Chunk size. A good value for this would be the maxPacketSize . endpointMaxPacketSize.

-> Timeout

Timeout (in milliseconds) that this function should wait for each chunk before giving up due to no response being received.

-> Enumerator s m α 

Iteratee enumerator for reading interrupt endpoints.

enumReadIsochronousSource

Arguments

:: forall s m α . (ReadableChunk s Word8, MonadBaseControl IO m) 
=> DeviceHandle

A handle for the device to communicate with.

-> EndpointAddress

The address of a valid In and Isochronous endpoint to communicate with. Make sure the endpoint belongs to the current alternate setting of a claimed interface which belongs to the device.

-> Vector Size

Sizes of isochronous packets. A good value for these would be the maxIsoPacketSize

-> Timeout

Timeout (in milliseconds) that this function should wait for each chunk before giving up due to no response being received.

-> Enumerator (Vector s) m α 

Iteratee enumerator for reading isochronous endpoints.

WARNING: You need to enable the threaded runtime (-threaded) for this function to work correctly. It throws a runtime error otherwise!