pub struct AltAccelSwitchProfile {
pub user_accel: AccelConfig,
pub alternate_accel: AltAccelConfig,
pub control: AltConfigControl,
}Expand description
Convenience bundle for a common accel-only alternate-configuration setup.
This represents a practical battery-oriented pattern:
- a low-power user accelerometer configuration for normal operation
- a high-performance alternate accelerometer configuration for higher-fidelity sampling after a feature-engine event
- an
AltConfigControlvalue that enables accel switching and keeps gyro on the user configuration
Fields§
§user_accel: AccelConfigUser accelerometer configuration written to ACC_CONF.
alternate_accel: AltAccelConfigAlternate accelerometer configuration written to ALT_ACC_CONF.
control: AltConfigControlMatching alternate-configuration control policy.
Implementations§
Source§impl AltAccelSwitchProfile
impl AltAccelSwitchProfile
Sourcepub const fn low_power_to_high_performance(
user_odr: OutputDataRate,
alternate_odr: OutputDataRate,
switch_to_alternate: AltConfigSwitchSource,
switch_to_user: AltConfigSwitchSource,
) -> Self
pub const fn low_power_to_high_performance( user_odr: OutputDataRate, alternate_odr: OutputDataRate, switch_to_alternate: AltConfigSwitchSource, switch_to_user: AltConfigSwitchSource, ) -> Self
Build a recommended accel-only low-power to high-performance switching profile.
This helper keeps:
- accelerometer range at
AccelRange::G8 - user accel mode at
AccelMode::LowPowerwithAvg2 - alternate accel mode at
AccelMode::HighPerformancewithAvg1 - gyro alternate switching disabled
reset_on_user_config_writeenabled
The caller still needs to configure the feature-engine event that will generate the chosen switch sources, for example any-motion or no-motion.
Trait Implementations§
Source§impl Clone for AltAccelSwitchProfile
impl Clone for AltAccelSwitchProfile
Source§fn clone(&self) -> AltAccelSwitchProfile
fn clone(&self) -> AltAccelSwitchProfile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AltAccelSwitchProfile
impl Debug for AltAccelSwitchProfile
Source§impl Format for AltAccelSwitchProfile
impl Format for AltAccelSwitchProfile
Source§impl PartialEq for AltAccelSwitchProfile
impl PartialEq for AltAccelSwitchProfile
impl Copy for AltAccelSwitchProfile
impl Eq for AltAccelSwitchProfile
impl StructuralPartialEq for AltAccelSwitchProfile
Auto Trait Implementations§
impl Freeze for AltAccelSwitchProfile
impl RefUnwindSafe for AltAccelSwitchProfile
impl Send for AltAccelSwitchProfile
impl Sync for AltAccelSwitchProfile
impl Unpin for AltAccelSwitchProfile
impl UnsafeUnpin for AltAccelSwitchProfile
impl UnwindSafe for AltAccelSwitchProfile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more