pub struct MotorDriverWrapper<E1, E2, P1, P2> { /* private fields */ }Implementations§
Source§impl<E1, E2, P1, P2> MotorDriverWrapper<E1, E2, P1, P2>
impl<E1, E2, P1, P2> MotorDriverWrapper<E1, E2, P1, P2>
pub fn builder() -> MotorDriverBuilder<E1, E2, P1, P2>
Trait Implementations§
Source§impl<E1, E2, P1, P2> MotorDriver for MotorDriverWrapper<E1, E2, P1, P2>
impl<E1, E2, P1, P2> MotorDriver for MotorDriverWrapper<E1, E2, P1, P2>
Source§type Error = MotorDriverError
type Error = MotorDriverError
The error type returned by this driver’s operations.
Source§fn initialize(&mut self) -> Result<(), Self::Error>
fn initialize(&mut self) -> Result<(), Self::Error>
Initializes the motor driver hardware. Read more
Source§fn set_speed(&mut self, speed: i16) -> Result<(), Self::Error>
fn set_speed(&mut self, speed: i16) -> Result<(), Self::Error>
Sets the motor speed and direction. Read more
Source§fn set_direction(&mut self, forward: bool) -> Result<(), Self::Error>
fn set_direction(&mut self, forward: bool) -> Result<(), Self::Error>
Sets the motor direction without changing speed magnitude. Read more
Source§fn stop(&mut self) -> Result<(), Self::Error>
fn stop(&mut self) -> Result<(), Self::Error>
Stops the motor by setting PWM to zero (coast stop). Read more
Source§fn get_speed(&self) -> Result<i16, Self::Error>
fn get_speed(&self) -> Result<i16, Self::Error>
Gets the current motor speed setting. Read more
Source§fn get_direction(&self) -> Result<bool, Self::Error>
fn get_direction(&self) -> Result<bool, Self::Error>
Gets the current motor direction. Read more
Source§fn get_current(&self) -> Result<f32, Self::Error>
fn get_current(&self) -> Result<f32, Self::Error>
Gets the current motor current consumption. Read more
Source§fn get_voltage(&self) -> Result<f32, Self::Error>
fn get_voltage(&self) -> Result<f32, Self::Error>
Gets the current motor supply voltage. Read more
Source§fn get_temperature(&self) -> Result<f32, Self::Error>
fn get_temperature(&self) -> Result<f32, Self::Error>
Gets the current motor driver temperature. Read more
Source§fn get_fault_status(&self) -> Result<u8, Self::Error>
fn get_fault_status(&self) -> Result<u8, Self::Error>
Gets the current fault status of the motor driver. Read more
Auto Trait Implementations§
impl<E1, E2, P1, P2> Freeze for MotorDriverWrapper<E1, E2, P1, P2>
impl<E1, E2, P1, P2> RefUnwindSafe for MotorDriverWrapper<E1, E2, P1, P2>
impl<E1, E2, P1, P2> Send for MotorDriverWrapper<E1, E2, P1, P2>
impl<E1, E2, P1, P2> Sync for MotorDriverWrapper<E1, E2, P1, P2>
impl<E1, E2, P1, P2> Unpin for MotorDriverWrapper<E1, E2, P1, P2>
impl<E1, E2, P1, P2> UnsafeUnpin for MotorDriverWrapper<E1, E2, P1, P2>
impl<E1, E2, P1, P2> UnwindSafe for MotorDriverWrapper<E1, E2, P1, P2>
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