aboutsummaryrefslogtreecommitdiffstats
path: root/usbh/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'usbh/src/lib.rs')
-rwxr-xr-xusbh/src/lib.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/usbh/src/lib.rs b/usbh/src/lib.rs
index 8f6f0d8..a38ae87 100755
--- a/usbh/src/lib.rs
+++ b/usbh/src/lib.rs
@@ -401,7 +401,7 @@ where
// addr: 0x20007774
let tmp: USBDeviceDescriptor = Default::default();
// addr: 0x20007788
- let vol_descr = ::vcell::VolatileCell::new(tmp);
+ let mut vol_descr = ::vcell::VolatileCell::new(tmp);
self.control_req(
0,
0,
@@ -409,7 +409,7 @@ where
USBRequest::GetDescriptor,
WValue::from((0, USBDescriptor::Device as u8)),
0,
- Some(DataBuf::from(&vol_descr)),
+ Some(DataBuf::from(&mut vol_descr)),
)?;
let desc = vol_descr.get();
@@ -435,7 +435,7 @@ where
info!("getting config with array");
//let tmp: USBConfigurationDescriptor = Default::default();
- let tmp: [u8; 9] = [0; 9];
+ let mut tmp: [u8; 9] = [0; 9];
//let vol_descr = ::vcell::VolatileCell::new(tmp);
self.control_req(
new_address,
@@ -444,7 +444,7 @@ where
USBRequest::GetConfiguration,
WValue::from((0, 0)),
0,
- Some(DataBuf::from(&tmp)),
+ Some(DataBuf::from(&mut tmp)),
)?;
//let desc = vol_descr.get();
@@ -487,7 +487,7 @@ where
/*
* Setup stage.
*/
- let setup_packet = USBSetupPacket {
+ let mut setup_packet = USBSetupPacket {
bm_request_type: bm_request_type,
b_request: b_request,
w_value: w_value,
@@ -500,7 +500,7 @@ where
let mut pipe = self.pipe_table.pipe_for(self.usb.host_mut(), addr, ep);
pipe.send(
USBToken::Setup,
- &DataBuf::from(&setup_packet),
+ &DataBuf::from(&mut setup_packet),
NAK_LIMIT,
self.millis,
)?;