Trait EnableMotionControl

Source
pub trait EnableMotionControl<Resources, const TIMER_HZ: u32> {
    type WithMotionControl: MotionControl;

    // Required method
    fn enable_motion_control(self, res: Resources) -> Self::WithMotionControl;
}
Expand description

Enable motion control for a driver

The Resources type parameter defines the hardware resources required for motion control.

Required Associated Types§

Source

type WithMotionControl: MotionControl

The type of the driver after motion control has been enabled

Required Methods§

Source

fn enable_motion_control(self, res: Resources) -> Self::WithMotionControl

Enable step control

Implementors§

Source§

impl<Driver, Timer, Profile, Convert, const TIMER_HZ: u32> EnableMotionControl<(Timer, Profile, Convert), TIMER_HZ> for Driver
where Driver: SetDirection + Step, Profile: MotionProfile, Timer: Timer<TIMER_HZ>, <Profile as MotionProfile>::Velocity: Copy, Convert: DelayToTicks<<Profile as MotionProfile>::Delay, TIMER_HZ>,

Source§

type WithMotionControl = SoftwareMotionControl<Driver, Timer, Profile, Convert, TIMER_HZ>