[][src]Struct mynewt::kernel::os::os_dev_handlers

#[repr(C)]
pub struct os_dev_handlers { pub od_open: os_dev_open_func_t, pub od_suspend: os_dev_suspend_func_t, pub od_resume: os_dev_resume_func_t, pub od_close: os_dev_close_func_t, }

Device handlers, implementers of device drivers should fill these out to control device operation.

Fields

od_open: os_dev_open_func_t

Device open handler, called when the user opens the device. Any locking of the device should be done within the open handler.

od_suspend: os_dev_suspend_func_t

Suspend handler, called when the device is being suspended. Up to the implementer to save device state before power down, so that the device can be cleanly resumed -- or error out and delay suspension.

od_resume: os_dev_resume_func_t

Resume handler, restores device state after a suspend operation.

od_close: os_dev_close_func_t

Close handler, releases the device, including any locks that may have been taken by open().

Trait Implementations

impl Default for os_dev_handlers[src]

Auto Trait Implementations

impl Send for os_dev_handlers

impl Sync for os_dev_handlers

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]