pub struct SmartShiftFeatureV0 { /* private fields */ }Expand description
SmartShift / 0x2111 feature, version 0+.
Implementations§
Source§impl SmartShiftFeatureV0
impl SmartShiftFeatureV0
Sourcepub async fn get_status(&self) -> Result<SmartShiftStatus, Hidpp20Error>
pub async fn get_status(&self) -> Result<SmartShiftStatus, Hidpp20Error>
Read the current wheelMode + autoDisengage + currentTunableTorque.
Reserved mode bytes fall back to SmartShiftMode::Ratchet because
that’s the “safe” / clicky behaviour most users expect.
Sourcepub async fn set_status(
&self,
mode: SmartShiftMode,
auto_disengage: u8,
tunable_torque: u8,
) -> Result<(), Hidpp20Error>
pub async fn set_status( &self, mode: SmartShiftMode, auto_disengage: u8, tunable_torque: u8, ) -> Result<(), Hidpp20Error>
Write a new wheelMode + autoDisengage + currentTunableTorque. The
firmware stores all three persistently in the device’s NVM, so callers
should read the current tunable_torque (and any field they don’t mean
to change) via Self::get_status and re-send it here.
Trait Implementations§
Source§impl Clone for SmartShiftFeatureV0
impl Clone for SmartShiftFeatureV0
Source§fn clone(&self) -> SmartShiftFeatureV0
fn clone(&self) -> SmartShiftFeatureV0
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CreatableFeature for SmartShiftFeatureV0
impl CreatableFeature for SmartShiftFeatureV0
Source§const STARTING_VERSION: u8 = 0
const STARTING_VERSION: u8 = 0
The version of the feature the implementation starts to support.
impl Feature for SmartShiftFeatureV0
Auto Trait Implementations§
impl !RefUnwindSafe for SmartShiftFeatureV0
impl !UnwindSafe for SmartShiftFeatureV0
impl Freeze for SmartShiftFeatureV0
impl Send for SmartShiftFeatureV0
impl Sync for SmartShiftFeatureV0
impl Unpin for SmartShiftFeatureV0
impl UnsafeUnpin for SmartShiftFeatureV0
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