aboutsummaryrefslogtreecommitdiffstats
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/usb.rs18
1 files changed, 17 insertions, 1 deletions
diff --git a/app/src/usb.rs b/app/src/usb.rs
index c15e1b5..acb4457 100644
--- a/app/src/usb.rs
+++ b/app/src/usb.rs
@@ -1,7 +1,7 @@
mod pipe;
mod usbproto;
-use crate::{log, logln, logln_now, rtc};
+use crate::{log, log_now, logln, logln_now, rtc};
use pipe::{DataBuf, PipeErr, PipeTable, USBPipeType, USBToken};
use rb::{Reader, RingBuffer, Writer};
use usbproto::*;
@@ -430,6 +430,22 @@ impl USBHost {
let until = rtc::millis() + 300;
while rtc::millis() < until {}
+ logln_now!("getting config");
+ let tmp: USBConfigurationDescriptor = Default::default();
+ //let vol_descr = ::vcell::VolatileCell::new(tmp);
+ self.control_req(
+ new_address,
+ 0,
+ BMRequestType::get_descr(),
+ USBRequest::GetConfiguration,
+ WValue::from((0, 0)),
+ 0,
+ Some(DataBuf::from(&tmp)),
+ )?;
+
+ //let desc = vol_descr.get();
+ logln_now!("cdesc.len: {}", tmp.b_length);
+
// Once addressed, SET_CONFIGURATION(0)
logln_now!("+++ setting configuration");
let conf: u8 = 0;