73 HBridge(miosix::GpioPin inhibitPin, TIM_TypeDef* timer,
75 float dutyCycle = 0,
unsigned int disableDelayMs = 50);
124 miosix::GpioPin inhibitPin;
128 unsigned int frequency;
130 unsigned int disableDelayMs;
Driver to operate an H-bridge.
void testDutyCycle(float dutyCycle)
Same as setDutyCycle() but does not memorize the value.
HBridge(miosix::GpioPin inhibitPin, TIM_TypeDef *timer, TimerUtils::Channel channel, unsigned int frequency, float dutyCycle=0, unsigned int disableDelayMs=50)
Prepares the enable pin and the timer.
void disable()
Stops the pwm signal and deactivates the H-bridge after the configured amount of time.
void enable()
Enables the H-bridge and starts the pwm signal.
void resetDutyCycle()
Resets the duty cycle to the last configure value.
~HBridge()
Disables the H-bridge.
void setDutyCycle(float dutyCycle)
Changes the current duty cycle and saves it.
Driver for easy access to the PWM capabilities of the general purpose timers.
This file includes all the types the logdecoder script will decode.