Maintainer | Bas van Dijk <v.dijk.bas@gmail.com> |
---|
This module provides functionality for performing standard device requests.
- setHalt :: DeviceHandle -> EndpointAddress -> Timeout -> IO ()
- clearRemoteWakeup :: DeviceHandle -> Timeout -> IO ()
- setRemoteWakeup :: DeviceHandle -> Timeout -> IO ()
- setStandardTestMode :: DeviceHandle -> TestMode -> Timeout -> IO ()
- data TestMode
- = Test_J
- | Test_K
- | Test_SE0_NAK
- | Test_Packet
- | Test_Force_Enable
- getInterfaceAltSetting :: DeviceHandle -> InterfaceNumber -> Timeout -> IO InterfaceAltSetting
- getDeviceStatus :: DeviceHandle -> Timeout -> IO DeviceStatus
- getEndpointStatus :: DeviceHandle -> EndpointAddress -> Timeout -> IO Bool
- setDeviceAddress :: DeviceHandle -> Word16 -> Timeout -> IO ()
- synchFrame :: DeviceHandle -> EndpointAddress -> Timeout -> IO FrameNumber
- type FrameNumber = Word16
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?
See: USB 2.0 Spec. table 9-7
getInterfaceAltSetting :: DeviceHandle -> InterfaceNumber -> Timeout -> IO InterfaceAltSettingSource
See: USB 2.0 Spec. section 9.4.4
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
type FrameNumber = Word16Source