diff options
author | Brian Cully <bjc@kublai.com> | 2019-07-28 12:12:41 -0400 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2019-07-28 12:12:41 -0400 |
commit | d13c53906ffba1495f49fcf90f1f3260bb17703f (patch) | |
tree | 9f19f3487210c05ed8921020fe11a92d1ab9bf09 /usbh/src/device.rs | |
parent | d5927616c9fa4feb4cf819c81e26536ca97b1c4e (diff) | |
download | samd21-demo-d13c53906ffba1495f49fcf90f1f3260bb17703f.tar.gz samd21-demo-d13c53906ffba1495f49fcf90f1f3260bb17703f.zip |
Add pipe::NO_DATA_STAGE const for convenience.
For use in `control_req`'s buffer argument if no data stage is
required. It was either this or have a separate function.
Diffstat (limited to 'usbh/src/device.rs')
-rw-r--r-- | usbh/src/device.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usbh/src/device.rs b/usbh/src/device.rs index eeaa33b..bdb993e 100644 --- a/usbh/src/device.rs +++ b/usbh/src/device.rs @@ -1,4 +1,4 @@ -use super::pipe::{Pipe, PipeErr, PipeTable}; +use super::pipe::{Pipe, PipeErr, PipeTable, NO_DATA_STAGE}; use super::usbproto::*; use core::convert::TryInto; @@ -199,7 +199,7 @@ impl Device { RequestCode::SetConfiguration, WValue::from((conf, 0)), 0, - Option::<&mut ()>::None, + NO_DATA_STAGE, self.millis, )?; debug!(" -- configuration set"); @@ -214,7 +214,7 @@ impl Device { RequestCode::GetInterface, // This is also idle, but can't have two enums with the same value. WValue::from((0, 0)), 0, - Option::<&mut ()>::None, + NO_DATA_STAGE, self.millis, )?; debug!(" -- idle set"); |