usb-0.6: Communicate with USB devices

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

System.USB.IO.StandardDeviceRequests

Description

This module provides functionality for performing standard device requests.

Synopsis

Documentation

setHalt :: DeviceHandle -> EndpointAddress -> Timeout -> IO ()Source

See: USB 2.0 Spec. section 9.4.9

clearRemoteWakeup :: DeviceHandle -> Timeout -> IO ()Source

See: USB 2.0 Spec. section 9.4.1

setRemoteWakeup :: DeviceHandle -> Timeout -> IO ()Source

See: USB 2.0 Spec. section 9.4.9

setStandardTestMode :: DeviceHandle -> TestMode -> Timeout -> IO ()Source

See: USB 2.0 Spec. section 9.4.9 TODO: What about vendor-specific test modes?

getDeviceStatus :: DeviceHandle -> Timeout -> IO DeviceStatusSource

See: USB 2.0 Spec. section 9.4.5

getEndpointStatus :: DeviceHandle -> EndpointAddress -> Timeout -> IO BoolSource

See: USB 2.0 Spec. section 9.4.5

setDeviceAddress :: DeviceHandle -> Word16 -> Timeout -> IO ()Source

See: USB 2.0 Spec. section 9.4.6

synchFrame :: DeviceHandle -> EndpointAddress -> Timeout -> IO FrameNumberSource

This request is used to set and then report an endpoint's synchronization frame.

When an endpoint supports isochronous transfers, the endpoint may also require per-frame transfers to vary in size according to a specific pattern. The host and the endpoint must agree on which frame the repeating pattern begins. The number of the frame in which the pattern began is returned to the host.

If a high-speed device supports the Synch Frame request, it must internally synchronize itself to the zeroth microframe and have a time notion of classic frame. Only the frame number is used to synchronize and reported by the device endpoint (i.e., no microframe number). The endpoint must synchronize to the zeroth microframe.

This value is only used for isochronous data transfers using implicit pattern synchronization. If the specified endpoint does not support this request, then the device will respond with a Request Error.

See: USB 2.0 Spec. section 9.4.11