[−][src]Struct pico_sdk::driver::LoaderPS2000
Dynamically loads the ps2000 driver
Fields
driver: Driverapply_fix: unsafe extern "system" fn(u32, i16) -> u32open_unit: Arc<Mutex<RawMutex, unsafe extern "system" fn() -> i16>>Only a single unit can be opened at any one time
close_unit: unsafe extern "system" fn(i16) -> i16ping_unit: unsafe extern "system" fn(i16) -> i16get_unit_info: unsafe extern "system" fn(i16, *mut i8, i16, i16) -> i16set_channel: unsafe extern "system" fn(i16, i16, i16, i16, i16) -> i16run_streaming: unsafe extern "system" fn(i16, u32, i32, u32, i16, u32, u32) -> i16stop_streaming: unsafe extern "system" fn(i16) -> i16get_latest_streaming_values: unsafe extern "system" fn(i16, unsafe extern "C" fn(*const *const i16, i16, u32, i16, i16, u32)) -> i16Implementations
impl LoaderPS2000[src]
pub fn load<P>(path: P) -> Result<LoaderPS2000, DriverLoadError> where
P: AsRef<Path>, [src]
P: AsRef<Path>,
Attempts to load ps2000 driver
pub fn get_latest_streaming_values_wrap<F>(
&self,
handle: i16,
callback: F
) -> i16 where
F: FnMut(*const *const i16, i16, u32, i16, i16, u32), [src]
&self,
handle: i16,
callback: F
) -> i16 where
F: FnMut(*const *const i16, i16, u32, i16, i16, u32),
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]
pub 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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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>,