|
System.USB.IO.Synchronous |
|
|
|
|
|
Synopsis |
|
|
|
Documentation |
|
|
A timeout in milliseconds. Use 0 to indicate no timeout.
|
|
|
Number of bytes transferred.
|
|
|
Constructors | | Instances | |
|
|
|
Constructors | ToDevice | | ToInterface | | ToEndpoint | | ToOther | |
| Instances | |
|
|
Control transfers
|
|
|
:: DeviceHandle | A handle for the device to communicate with.
| -> RequestType | The type of request.
| -> Recipient | The recipient of the request.
| -> Word8 | Request.
| -> Word16 | Value.
| -> Word16 | Index.
| -> Timeout | Timeout (in milliseconds) that this function should
wait before giving up due to no response being
received. For no timeout, use value 0.
| -> IO () | | Perform a USB control request that does not transfer data.
The value and index values should be given in host-endian byte order.
Exceptions:
|
|
|
|
:: DeviceHandle | A handle for the device to communicate with.
| -> RequestType | The type of request.
| -> Recipient | The recipient of the request.
| -> Word8 | Request.
| -> Word16 | Value.
| -> Word16 | Index.
| -> Size | The maximum number of bytes to read.
| -> Timeout | Timeout (in milliseconds) that this function
should wait before giving up due to no response
being received. For no timeout, use value 0.
| -> IO ByteString | | Perform a USB control read.
The value and index values should be given in host-endian byte order.
Exceptions:
|
|
|
|
:: DeviceHandle | A handle for the device to communicate with.
| -> RequestType | The type of request.
| -> Recipient | The recipient of the request.
| -> Word8 | Request.
| -> Word16 | Value.
| -> Word16 | Index.
| -> ByteString | The ByteString to write,
| -> Timeout | Timeout (in milliseconds) that this function
should wait before giving up due to no
response being received. For no timeout, use
value 0.
| -> IO Size | | Perform a USB control write.
The value and index values should be given in host-endian byte order.
Exceptions:
|
|
|
Bulk transfers
|
|
|
:: DeviceHandle | A handle for the device to communicate with.
| -> EndpointAddress | The address of a valid endpoint to communicate
with. Because we are reading, make sure this is
an In endpoint!!! If it isn't the behaviour
is undefined.
| -> Size | The maximum number of bytes to read.
| -> Timeout | Timeout (in milliseconds) that this function
should wait before giving up due to no response
being received. For no timeout, use value 0.
| -> IO ByteString | The function returns the ByteString that was
read. Note that the length of this ByteString
<= the requested size to read.
| Perform a USB bulk read.
Exceptions:
|
|
|
|
:: DeviceHandle | A handle for the device to communicate with.
| -> EndpointAddress | The address of a valid endpoint to communicate
with. Because we are writing, make sure this
is an Out endpoint!!! If it isn't the
behaviour is undefined.
| -> ByteString | The ByteString to write.
| -> Timeout | Timeout (in milliseconds) that this function
should wait before giving up due to no
response being received. For no timeout, use
value 0.
| -> IO Size | The function returns the number of bytes
actually written.
| Perform a USB bulk write.
Exceptions:
|
|
|
Interrupt transfers
|
|
|
:: DeviceHandle | A handle for the device to communicate
with.
| -> EndpointAddress | The address of a valid endpoint to
communicate with. Because we are reading,
make sure this is an In endpoint!!! If
it isn't the behaviour is undefined.
| -> Size | The maximum number of bytes to read.
| -> Timeout | Timeout (in milliseconds) that this
function should wait before giving up due
to no response being received. For no
timeout, use value 0.
| -> IO ByteString | The function returns the ByteString that
was read. Note that the length of this
ByteString <= the requested size to read.
| Perform a USB interrupt read.
Exceptions:
|
|
|
|
:: DeviceHandle | A handle for the device to communicate
with.
| -> EndpointAddress | The address of a valid endpoint to
communicate with. Because we are writing,
make sure this is an Out endpoint!!! If
it isn't the behaviour is undefined.
| -> ByteString | The ByteString to write.
| -> Timeout | Timeout (in milliseconds) that this
function should wait before giving up due
to no response being received. For no
timeout, use value 0.
| -> IO Size | The function returns the number of bytes
actually written.
| Perform a USB interrupt write.
Exceptions:
|
|
|
Produced by Haddock version 2.4.2 |