pub struct LsmConfig { /* private fields */ }
Expand description
Configuration of Lsm303c
Implementations
sourceimpl LsmConfig
impl LsmConfig
sourcepub fn new() -> Self
pub fn new() -> Self
Creates Lsm303c configuration with default
AccelScale
, MagScale
, AccelDataRate
,
MagDataRate
, MagMode
, AccelBlockDataUpdate
,
MagBlockDataUpdate
, MagXYOperativeMode
, MagZOperativeMode
,
AccelAxesControl
, and TempControl
.
sourcepub fn accel_scale(&mut self, accel_scale: AccelScale) -> &mut Self
pub fn accel_scale(&mut self, accel_scale: AccelScale) -> &mut Self
Sets accelerometer full reading scale (AccelScale
)
sourcepub fn mag_scale(&mut self, mag_scale: MagScale) -> &mut Self
pub fn mag_scale(&mut self, mag_scale: MagScale) -> &mut Self
Sets magnetrometer full reading scale (MagScale
)
sourcepub fn accel_data_rate(&mut self, accel_data_rate: AccelDataRate) -> &mut Self
pub fn accel_data_rate(&mut self, accel_data_rate: AccelDataRate) -> &mut Self
Sets accelerometer output data rate (AccelDataRate
)
sourcepub fn mag_data_rate(&mut self, mag_data_rate: MagDataRate) -> &mut Self
pub fn mag_data_rate(&mut self, mag_data_rate: MagDataRate) -> &mut Self
Sets magnetrometer output data rate (MagDataRate
)
sourcepub fn accel_block_data_update(
&mut self,
accel_block_data_update: AccelBlockDataUpdate
) -> &mut Self
pub fn accel_block_data_update(
&mut self,
accel_block_data_update: AccelBlockDataUpdate
) -> &mut Self
Sets accelerometer block data update (AccelBlockDataUpdate
)
sourcepub fn mag_block_data_update(
&mut self,
mag_block_data_update: MagBlockDataUpdate
) -> &mut Self
pub fn mag_block_data_update(
&mut self,
mag_block_data_update: MagBlockDataUpdate
) -> &mut Self
Sets magnetrometer block data update (MagBlockDataUpdate
)
sourcepub fn mag_xy_operative_mode(
&mut self,
operative_mode: MagXYOperativeMode
) -> &mut Self
pub fn mag_xy_operative_mode(
&mut self,
operative_mode: MagXYOperativeMode
) -> &mut Self
Sets magnetrometer x and y axes operative mode (MagXYOperativeMode
)
sourcepub fn mag_z_operative_mode(
&mut self,
operative_mode: MagZOperativeMode
) -> &mut Self
pub fn mag_z_operative_mode(
&mut self,
operative_mode: MagZOperativeMode
) -> &mut Self
Sets magnetrometer z axis operative mode (MagZOperativeMode
)
sourcepub fn accel_axes_control(&mut self, axes_control: AccelAxesControl) -> &mut Self
pub fn accel_axes_control(&mut self, axes_control: AccelAxesControl) -> &mut Self
Sets accel axes control (AccelAxesControl
)
sourcepub fn temp_control(&mut self, temp_control: TempControl) -> &mut Self
pub fn temp_control(&mut self, temp_control: TempControl) -> &mut Self
Sets temperature control (TempControl
)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for LsmConfig
impl Send for LsmConfig
impl Sync for LsmConfig
impl Unpin for LsmConfig
impl UnwindSafe for LsmConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.