Skip to content

Commit

Permalink
#[cfg] is required
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Oct 26, 2024
1 parent d03e34d commit 22acc5b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,11 @@ impl UsbDeviceHandler for NusbUsbHostDeviceHandler {
if cfg!(not(target_os = "windows")) {
if setup.request_type & 0x80 == 0 {
// control out
#[cfg(not(target_os = "windows"))]
handle.control_out_blocking(control, req, timeout).ok();
} else {
// control in
#[cfg(not(target_os = "windows"))]
if let Ok(len) = handle.control_in_blocking(control, &mut buffer, timeout) {
return Ok(Vec::from(&buffer[..len]));
}
Expand Down

0 comments on commit 22acc5b

Please sign in to comment.