mirror of
https://github.com/G2-Games/minidisc-cli.git
synced 2025-04-19 11:42:53 -05:00
Fixed imports
This commit is contained in:
parent
3646a4ac05
commit
0a75b6a013
3 changed files with 5 additions and 5 deletions
|
@ -7,7 +7,7 @@ use thiserror::Error;
|
||||||
// USB stuff
|
// USB stuff
|
||||||
use cross_usb::prelude::*;
|
use cross_usb::prelude::*;
|
||||||
use cross_usb::usb::{ControlIn, ControlOut, ControlType, Recipient, UsbError};
|
use cross_usb::usb::{ControlIn, ControlOut, ControlType, Recipient, UsbError};
|
||||||
use cross_usb::{DeviceInfo, Interface};
|
use cross_usb::{Descriptor, Interface};
|
||||||
|
|
||||||
use super::utils::cross_sleep;
|
use super::utils::cross_sleep;
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ impl NetMD {
|
||||||
const READ_REPLY_RETRY_INTERVAL: u32 = 10;
|
const READ_REPLY_RETRY_INTERVAL: u32 = 10;
|
||||||
|
|
||||||
/// Creates a new interface to a NetMD device
|
/// 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 {
|
let mut model = DeviceId {
|
||||||
vendor_id: usb_descriptor.vendor_id().await,
|
vendor_id: usb_descriptor.vendor_id().await,
|
||||||
product_id: usb_descriptor.product_id().await,
|
product_id: usb_descriptor.product_id().await,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#![cfg_attr(debug_assertions, allow(dead_code))]
|
#![cfg_attr(debug_assertions, allow(dead_code))]
|
||||||
use cross_usb::DeviceInfo;
|
use cross_usb::Descriptor;
|
||||||
use num_derive::FromPrimitive;
|
use num_derive::FromPrimitive;
|
||||||
use num_traits::FromPrimitive;
|
use num_traits::FromPrimitive;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
|
@ -278,7 +278,7 @@ pub struct NetMDContext {
|
||||||
|
|
||||||
impl NetMDContext {
|
impl NetMDContext {
|
||||||
/// Create a new context to control a NetMD device
|
/// 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?;
|
let interface = NetMDInterface::new(device).await?;
|
||||||
|
|
||||||
Ok(Self { interface })
|
Ok(Self { interface })
|
||||||
|
|
|
@ -310,7 +310,7 @@ impl NetMDInterface {
|
||||||
const INTERIM_RESPONSE_RETRY_INTERVAL: u32 = 100;
|
const INTERIM_RESPONSE_RETRY_INTERVAL: u32 = 100;
|
||||||
|
|
||||||
/// Get a new interface to a NetMD device
|
/// 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?;
|
let device = base::NetMD::new(device).await?;
|
||||||
Ok(NetMDInterface { device })
|
Ok(NetMDInterface { device })
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue