pub enum Driver {
PS2000,
PS2000A,
PS3000A,
PS4000,
PS4000A,
PS5000A,
PS6000,
PS6000A,
PicoIPP,
IOMP5,
}
Expand description
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§
Source§impl Driver
impl Driver
Sourcepub fn from_pid(pid: u16) -> Option<Driver>
pub fn from_pid(pid: u16) -> Option<Driver>
Returns the relevant Driver
for the supplied USB PID
Sourcepub fn get_binary_name(self) -> String
pub fn get_binary_name(self) -> String
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");
}
Sourcepub fn get_dependencies_for_platform() -> Vec<Driver>
pub fn get_dependencies_for_platform() -> Vec<Driver>
Gets the required driver dependencies for this platform
Trait Implementations§
Source§impl IntoEnumIterator for Driver
impl IntoEnumIterator for Driver
Source§impl Ord for Driver
impl Ord for Driver
Source§impl PartialOrd for Driver
impl PartialOrd for Driver
impl Copy for Driver
impl Eq for Driver
impl StructuralPartialEq for Driver
Auto Trait Implementations§
impl Freeze for Driver
impl RefUnwindSafe for Driver
impl Send for Driver
impl Sync for Driver
impl Unpin for Driver
impl UnwindSafe for Driver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more