Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timeout documentation #151

Merged
merged 1 commit into from
Oct 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions src/device_handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ impl<T: UsbContext> DeviceHandle<T> {
///
/// This function attempts to read from the interrupt endpoint with the address given by the
/// `endpoint` parameter and fills `buf` with any data received from the endpoint. The function
/// blocks up to the amount of time specified by `timeout`. Minimal `timeout` is 1 microseconds.
/// blocks up to the amount of time specified by `timeout`. Minimal `timeout` is 1 milliseconds,
/// anything smaller will result in an infinite block.
///
/// If the return value is `Ok(n)`, then `buf` is populated with `n` bytes of data received
/// from the endpoint.
Expand Down Expand Up @@ -369,7 +370,8 @@ impl<T: UsbContext> DeviceHandle<T> {
///
/// This function attempts to write the contents of `buf` to the interrupt endpoint with the
/// address given by the `endpoint` parameter. The function blocks up to the amount of time
/// specified by `timeout`. Minimal `timeout` is 1 microseconds.
/// specified by `timeout`. Minimal `timeout` is 1 milliseconds, anything smaller will
/// result in an infinite block.
///
/// If the return value is `Ok(n)`, then `n` bytes of `buf` were written to the endpoint.
///
Expand Down Expand Up @@ -422,7 +424,8 @@ impl<T: UsbContext> DeviceHandle<T> {
///
/// This function attempts to read from the bulk endpoint with the address given by the
/// `endpoint` parameter and fills `buf` with any data received from the endpoint. The function
/// blocks up to the amount of time specified by `timeout`. Minimal `timeout` is 1 microseconds.
/// blocks up to the amount of time specified by `timeout`. Minimal `timeout` is 1 milliseconds,
/// anything smaller will result in an infinite block.
///
/// If the return value is `Ok(n)`, then `buf` is populated with `n` bytes of data received
/// from the endpoint.
Expand Down Expand Up @@ -477,7 +480,8 @@ impl<T: UsbContext> DeviceHandle<T> {
///
/// This function attempts to write the contents of `buf` to the bulk endpoint with the address
/// given by the `endpoint` parameter. The function blocks up to the amount of time specified
/// by `timeout`. Minimal `timeout` is 1 microseconds.
/// by `timeout`. Minimal `timeout` is 1 milliseconds, anything smaller will result in an
/// infinite block.
///
/// If the return value is `Ok(n)`, then `n` bytes of `buf` were written to the endpoint.
///
Expand Down Expand Up @@ -525,7 +529,8 @@ impl<T: UsbContext> DeviceHandle<T> {
///
/// This function attempts to read data from the device using a control transfer and fills
/// `buf` with any data received during the transfer. The function blocks up to the amount of
/// time specified by `timeout`. Minimal `timeout` is 1 microseconds.
/// time specified by `timeout`. Minimal `timeout` is 1 milliseconds, anything smaller will
/// result in an infinite block.
///
/// The parameters `request_type`, `request`, `value`, and `index` specify the fields of the
/// control transfer setup packet (`bmRequestType`, `bRequest`, `wValue`, and `wIndex`
Expand Down Expand Up @@ -584,7 +589,7 @@ impl<T: UsbContext> DeviceHandle<T> {
///
/// This function attempts to write the contents of `buf` to the device using a control
/// transfer. The function blocks up to the amount of time specified by `timeout`.
/// Minimal `timeout` is 1 microseconds.
/// Minimal `timeout` is 1 milliseconds, anything smaller will result in an infinite block.
///
/// The parameters `request_type`, `request`, `value`, and `index` specify the fields of the
/// control transfer setup packet (`bmRequestType`, `bRequest`, `wValue`, and `wIndex`
Expand Down