Fixed imports

This commit is contained in:
G2-Games 2024-08-14 13:39:03 -05:00
parent 3646a4ac05
commit 0a75b6a013
3 changed files with 5 additions and 5 deletions

View file

@ -7,7 +7,7 @@ use thiserror::Error;
// USB stuff
use cross_usb::prelude::*;
use cross_usb::usb::{ControlIn, ControlOut, ControlType, Recipient, UsbError};
use cross_usb::{DeviceInfo, Interface};
use cross_usb::{Descriptor, Interface};
use super::utils::cross_sleep;
@ -132,7 +132,7 @@ impl NetMD {
const READ_REPLY_RETRY_INTERVAL: u32 = 10;
/// Creates a new interface to a NetMD device
pub async fn new(usb_descriptor: DeviceInfo) -> Result<Self, NetMDError> {
pub async fn new(usb_descriptor: Descriptor) -> Result<Self, NetMDError> {
let mut model = DeviceId {
vendor_id: usb_descriptor.vendor_id().await,
product_id: usb_descriptor.product_id().await,

View file

@ -1,5 +1,5 @@
#![cfg_attr(debug_assertions, allow(dead_code))]
use cross_usb::DeviceInfo;
use cross_usb::Descriptor;
use num_derive::FromPrimitive;
use num_traits::FromPrimitive;
use regex::Regex;
@ -278,7 +278,7 @@ pub struct NetMDContext {
impl NetMDContext {
/// Create a new context to control a NetMD device
pub async fn new(device: DeviceInfo) -> Result<Self, InterfaceError> {
pub async fn new(device: Descriptor) -> Result<Self, InterfaceError> {
let interface = NetMDInterface::new(device).await?;
Ok(Self { interface })

View file

@ -310,7 +310,7 @@ impl NetMDInterface {
const INTERIM_RESPONSE_RETRY_INTERVAL: u32 = 100;
/// Get a new interface to a NetMD device
pub async fn new(device: cross_usb::DeviceInfo) -> Result<Self, InterfaceError> {
pub async fn new(device: cross_usb::Descriptor) -> Result<Self, InterfaceError> {
let device = base::NetMD::new(device).await?;
Ok(NetMDInterface { device })
}