30 float dutyCycle,
unsigned int disableDelayMs)
31 : inhibitPin(inhibitPin), pwm(timer, frequency), channel(channel),
32 frequency(frequency), dutyCycle(dutyCycle), disableDelayMs(disableDelayMs)
51 miosix::Thread::sleep(disableDelayMs);
60 this->dutyCycle = dutyCycle;
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.
~HBridge()
Disables the H-bridge.
void setDutyCycle(float dutyCycle)
Changes the current duty cycle and saves it.
void disableChannel(TimerUtils::Channel channel)
void setDutyCycle(TimerUtils::Channel channel, float dutyCycle)
Sets the duty cycle for the specified channel.
bool isChannelEnabled(TimerUtils::Channel channel)
void enableChannel(TimerUtils::Channel channel, Polarity polarity=Polarity::NORMAL)
This file includes all the types the logdecoder script will decode.