Enum pico_common::Driver[][src]

pub enum Driver {
    PS2000,
    PS2000A,
    PS3000A,
    PS4000,
    PS4000A,
    PS5000A,
    PS6000,
    PS6000A,
    PicoIPP,
    IOMP5,
}

Supported Pico drivers

Variants

PS2000
PS2000A
PS3000A
PS4000
PS4000A
PS5000A
PS6000
PS6000A
PicoIPP

Only used to get the full dependency name on each platform

IOMP5

Only used to get the full dependency name on each platform

Implementations

impl Driver[src]

pub fn from_pid(pid: u16) -> Option<Driver>[src]

Returns the relevant Driver for the supplied USB PID

pub fn get_binary_name(self) -> String[src]

Returns the platform dependent name of the driver binary with file extension

let driver = pico_common::Driver::PS2000A;
let binary_name = driver.get_binary_name();

if cfg!(target_os = "windows") {
    assert_eq!(binary_name, "ps2000a.dll");
} else if cfg!(target_os = "macos") {
    assert_eq!(binary_name, "libps2000a.dylib");
} else {
    assert_eq!(binary_name, "libps2000a.so");
}

pub fn get_dependencies_for_platform() -> Vec<Driver>[src]

Gets the required driver dependencies for this platform

Trait Implementations

impl Clone for Driver[src]

impl Copy for Driver[src]

impl Debug for Driver[src]

impl Display for Driver[src]

impl Eq for Driver[src]

impl FromStr for Driver[src]

type Err = ParseError

The associated error which can be returned from parsing.

impl Hash for Driver[src]

impl IntoEnumIterator for Driver[src]

type Iterator = DriverEnumIterator

Type of the iterator over the variants.

impl Ord for Driver[src]

impl PartialEq<Driver> for Driver[src]

impl PartialOrd<Driver> for Driver[src]

impl StructuralEq for Driver[src]

impl StructuralPartialEq for Driver[src]

Auto Trait Implementations

impl RefUnwindSafe for Driver

impl Send for Driver

impl Sync for Driver

impl Unpin for Driver

impl UnwindSafe for Driver

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.