[−][src]Struct pico_driver::LoaderCommon
Dynamically loads various Pico drivers
Fields
driver: Driver
apply_fix: unsafe extern "system" fn(_: u32, _: i16) -> u32
enumerate_units: unsafe extern "system" fn(_: *mut i16, _: *mut i8, _: *mut i16) -> u32
open_unit: Arc<Mutex<OpenUnitFn>>
close_unit: unsafe extern "system" fn(_: i16) -> u32
ping_unit: unsafe extern "system" fn(_: i16) -> u32
change_power_source: Option<unsafe extern "system" fn(_: i16, _: u32) -> u32>
get_unit_info: unsafe extern "system" fn(_: i16, _: *mut i8, _: i16, _: *mut i16, _: u32) -> u32
get_channel_info: Option<unsafe extern "system" fn(_: i16, _: i32, _: i32, _: *mut i32, _: *mut i32, _: i32) -> u32>
get_maximum_value: Option<unsafe extern "system" fn(_: i16, _: *mut i16) -> u32>
set_channel: SetChannelFn
run_streaming: RunStreamingFn
stop_streaming: unsafe extern "system" fn(_: i16) -> u32
set_data_buffer: SetBufferFn
get_latest_streaming_values: unsafe extern "system" fn(_: i16, _: unsafe extern "C" fn(handle: i16, no_df_samples: i32, start_index: u32, overflow: i16, trigger_at: u32, triggered: i16, auto_stop: i16, context: *mut c_void), _: *mut c_void) -> u32
set_probe_callback: Option<unsafe extern "system" fn(_: i16, _: unsafe extern "system" fn(handle: i16, status: u32, probes: *mut UserProbeInteractions, n_probes: u32)) -> u32>
Implementations
impl LoaderCommon
[src]
pub fn load<P: AsRef<Path>>(
driver: Driver,
path: P
) -> Result<LoaderCommon, DriverLoadError>
[src]
driver: Driver,
path: P
) -> Result<LoaderCommon, DriverLoadError>
Attempts to load a driver
pub fn get_latest_streaming_values_wrap<F: FnMut(i16, i32, u32, i16, u32, i16, i16, *mut c_void)>(
&self,
handle: i16,
callback: F
) -> u32
[src]
&self,
handle: i16,
callback: F
) -> u32
Wraps the c callback with libffi so we can use closures
libffi isn't the only way to do this because we have c_void context. However, we already need libffi for the ps2000 driver and this is easy.
Trait Implementations
impl Clone for LoaderCommon
[src]
fn clone(&self) -> LoaderCommon
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for LoaderCommon
[src]
Auto Trait Implementations
impl !RefUnwindSafe for LoaderCommon
impl Send for LoaderCommon
impl Sync for LoaderCommon
impl Unpin for LoaderCommon
impl !UnwindSafe for LoaderCommon
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>,