[−][src]Struct pico_driver::LoaderPS2000
Dynamically loads the ps2000 driver
Fields
driver: Driver
apply_fix: unsafe extern "system" fn(_: u32, _: i16) -> u32
open_unit: Arc<Mutex<unsafe extern "system" fn() -> i16>>
Only a single unit can be opened at any one time
close_unit: unsafe extern "system" fn(_: i16) -> i16
ping_unit: unsafe extern "system" fn(_: i16) -> i16
get_unit_info: unsafe extern "system" fn(_: i16, _: *mut i8, _: i16, _: i16) -> i16
set_channel: unsafe extern "system" fn(_: i16, _: i16, _: i16, _: i16, _: i16) -> i16
run_streaming: unsafe extern "system" fn(_: i16, _: u32, _: i32, _: u32, _: i16, _: u32, _: u32) -> i16
stop_streaming: unsafe extern "system" fn(_: i16) -> i16
get_latest_streaming_values: unsafe extern "system" fn(_: i16, _: unsafe extern "C" fn(overview_buffers: *const *const i16, overflow: i16, triggered_at: u32, triggered: i16, auto_stop: i16, n_values: u32)) -> i16
Implementations
impl LoaderPS2000
[src]
pub fn load<P: AsRef<Path>>(path: P) -> Result<LoaderPS2000, DriverLoadError>
[src]
Attempts to load ps2000 driver
pub fn get_latest_streaming_values_wrap<F: FnMut(*const *const i16, i16, u32, i16, i16, u32)>(
&self,
handle: i16,
callback: F
) -> i16
[src]
&self,
handle: i16,
callback: F
) -> i16
Wraps the c callback with libffi so we can use closures
This is required because the ps2000 driver doesn't pass a context object through to the callback. Without a context object, we cannot know which device the callback refers to. libffi lets us keep the context.
Trait Implementations
impl Clone for LoaderPS2000
[src]
fn clone(&self) -> LoaderPS2000
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for LoaderPS2000
[src]
Auto Trait Implementations
impl !RefUnwindSafe for LoaderPS2000
impl Send for LoaderPS2000
impl Sync for LoaderPS2000
impl Unpin for LoaderPS2000
impl !UnwindSafe for LoaderPS2000
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,