[−][src]Struct pico_sdk::driver::LoaderCommon
Dynamically loads various Pico drivers
Fields
driver: Driverapply_fix: unsafe extern "system" fn(u32, i16) -> u32enumerate_units: unsafe extern "system" fn(*mut i16, *mut i8, *mut i16) -> u32open_unit: Arc<Mutex<RawMutex, OpenUnitFn>>close_unit: unsafe extern "system" fn(i16) -> u32ping_unit: unsafe extern "system" fn(i16) -> u32change_power_source: Option<unsafe extern "system" fn(i16, u32) -> u32>get_unit_info: unsafe extern "system" fn(i16, *mut i8, i16, *mut i16, u32) -> u32get_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: SetChannelFnrun_streaming: RunStreamingFnstop_streaming: unsafe extern "system" fn(i16) -> u32set_data_buffer: SetBufferFnget_latest_streaming_values: unsafe extern "system" fn(i16, unsafe extern "C" fn(i16, i32, u32, i16, u32, i16, i16, *mut c_void), *mut c_void) -> u32set_probe_callback: Option<unsafe extern "system" fn(i16, unsafe extern "system" fn(i16, u32, *mut UserProbeInteractions, u32)) -> u32>Implementations
impl LoaderCommon[src]
pub fn load<P>(driver: Driver, path: P) -> Result<LoaderCommon, DriverLoadError> where
P: AsRef<Path>, [src]
P: AsRef<Path>,
Attempts to load a driver
pub fn get_latest_streaming_values_wrap<F>(
&self,
handle: i16,
callback: F
) -> u32 where
F: FnMut(i16, i32, u32, i16, u32, i16, i16, *mut c_void), [src]
&self,
handle: i16,
callback: F
) -> u32 where
F: FnMut(i16, i32, u32, i16, u32, i16, i16, *mut c_void),
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]
pub 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> 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>,