Struct capsules::lps25hb::LPS25HB
[−]
[src]
pub struct LPS25HB<'a> { i2c: &'a I2CDevice, interrupt_pin: &'a Pin, callback: Cell<Option<Callback>>, state: Cell<State>, buffer: TakeCell<'static, [u8]>, }
Fields
i2c: &'a I2CDevice
interrupt_pin: &'a Pin
callback: Cell<Option<Callback>>
state: Cell<State>
buffer: TakeCell<'static, [u8]>
Methods
impl<'a> LPS25HB<'a>
[src]
pub fn new(
i2c: &'a I2CDevice,
interrupt_pin: &'a Pin,
buffer: &'static mut [u8]
) -> LPS25HB<'a>
[src]
i2c: &'a I2CDevice,
interrupt_pin: &'a Pin,
buffer: &'static mut [u8]
) -> LPS25HB<'a>
pub fn read_whoami(&self)
[src]
pub fn take_measurement(&self)
[src]
Trait Implementations
impl<'a> I2CClient for LPS25HB<'a>
[src]
fn command_complete(&self, buffer: &'static mut [u8], _error: Error)
[src]
Called when an I2C command completed. The error
denotes whether the command completed successfully or if an error occured. Read more
impl<'a> Client for LPS25HB<'a>
[src]
fn fired(&self, _: usize)
[src]
Called when an interrupt occurs. The identifier
will be the same value that was passed to enable_interrupt()
when the interrupt was configured. Read more
impl<'a> Driver for LPS25HB<'a>
[src]
fn subscribe(&self, subscribe_num: usize, callback: Callback) -> ReturnCode
[src]
subscribe
lets an application pass a callback to the driver to be called later. This returns ENOSUPPORT
if not used. Read more
fn command(
&self,
command_num: usize,
_: usize,
_: usize,
_: AppId
) -> ReturnCode
[src]
&self,
command_num: usize,
_: usize,
_: usize,
_: AppId
) -> ReturnCode
command
instructs a driver to perform some action synchronously. This returns ENOSUPPORT
if not used. Read more
fn allow(
&self,
app: AppId,
minor_num: usize,
slice: AppSlice<Shared, u8>
) -> ReturnCode
[src]
&self,
app: AppId,
minor_num: usize,
slice: AppSlice<Shared, u8>
) -> ReturnCode
allow
lets an application give the driver access to a buffer in the application's memory. This returns ENOSUPPORT
if not used. Read more