Skip to content

Commit e886a59

Browse files
Added some clarity debug
1 parent 064fdb6 commit e886a59

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

usb/src/device/tusb/device.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,17 @@ impl TUSBAudioGoXLR {
7171
loop {
7272
if Instant::now() > timeout {
7373
// We've hit a timeout, don't infinite loop, instead throw as error.
74+
warn!("Timeout Awaiting Response..");
7475
return false;
7576
}
7677

7778
let result = self.event_receivers.data_read.try_recv();
7879
match result {
7980
Ok(result) => break result,
80-
Err(TryRecvError::Disconnected) => break false,
81+
Err(TryRecvError::Disconnected) => {
82+
warn!("Channel has been Disconnected");
83+
break false;
84+
}
8185
Err(_) => continue,
8286
}
8387
}

usb/src/device/tusb/tusbaudio.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ impl TUSBAudio<'_> {
424424
// Register this event with the notifier..
425425
let result = unsafe { (self.register_device_notification)(handle, u32::MAX, event, 0) };
426426
if result != 0 {
427+
warn!("Unable to Register Notifications");
427428
bail!("Unable to register notifications");
428429
}
429430

0 commit comments

Comments
 (0)