aboutsummaryrefslogtreecommitdiffstats
path: root/usbh/src/pipe.rs
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2019-07-28 10:43:37 -0400
committerBrian Cully <bjc@kublai.com>2019-07-28 10:43:37 -0400
commit4296cae4d5e8f54c3dbb57a17db646aaaa995a09 (patch)
tree60c426d0ecae26256124592e074604ee47823369 /usbh/src/pipe.rs
parentf39e0425a67277556db1c55547574b4205ed03e9 (diff)
downloadsamd21-demo-4296cae4d5e8f54c3dbb57a17db646aaaa995a09.tar.gz
samd21-demo-4296cae4d5e8f54c3dbb57a17db646aaaa995a09.zip
Rename RequestType subfields.
Mostly obvious stuff, but change `USBSetupType` to `RequestKind`, so it doesn't conflict with the `RequestType` in which it lives. This also solves the problem with `typ` and `set_typ` methods (now `kind` and `set_kind`).
Diffstat (limited to 'usbh/src/pipe.rs')
-rw-r--r--usbh/src/pipe.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/usbh/src/pipe.rs b/usbh/src/pipe.rs
index 0a8503b..beac863 100644
--- a/usbh/src/pipe.rs
+++ b/usbh/src/pipe.rs
@@ -142,13 +142,13 @@ impl Pipe<'_, '_> {
// TODO: data stage, has up to 5,000ms (in 500ms
// per-packet chunks) to complete. cf ยง9.2.6.4 of USB 2.0.
match bm_request_type.direction()? {
- USBSetupDirection::DeviceToHost => {
+ RequestDirection::DeviceToHost => {
trace!("buf0: {:?}", &b);
self.in_transfer(&b, NAK_LIMIT, millis)?;
trace!("buf1: {:?}", &b);
}
- USBSetupDirection::HostToDevice => {
+ RequestDirection::HostToDevice => {
debug!("Should OUT for {}b", b.len);
}
}
@@ -166,8 +166,8 @@ impl Pipe<'_, '_> {
});
let token = match bm_request_type.direction()? {
- USBSetupDirection::DeviceToHost => USBToken::Out,
- USBSetupDirection::HostToDevice => USBToken::In,
+ RequestDirection::DeviceToHost => USBToken::Out,
+ RequestDirection::HostToDevice => USBToken::In,
};
// TODO: should probably make `pipe.send` have optional