semf
|
Class to interface pwm's hardware module of the microcontroller. More...
#include <pwm.h>
Public Member Functions | |
virtual | ~Pwm ()=default |
virtual void | setMaxValue (unsigned int maxValue)=0 |
Set the maximum possible PWM value. More... | |
virtual unsigned int | maxValue () const =0 |
Returns the maximum possible PWM value. More... | |
virtual void | set (unsigned int value, bool inverted=false)=0 |
Set a PWM value. Duty cycle is value / maxValue. More... | |
virtual unsigned int | value () const =0 |
Returns the current PWM value. More... | |
virtual void | start ()=0 |
virtual void | stop ()=0 |
virtual bool | isEnabled () const =0 |
Returns the current status of PWM module. More... | |
Public Attributes | |
Signal< Error > | error |
Class to interface pwm's hardware module of the microcontroller.
|
virtualdefault |
|
pure virtual |
Returns the current status of PWM module.
Implemented in semf::Stm32Pwm, and semf::SoftPwm.
|
pure virtual |
Returns the maximum possible PWM value.
Implemented in semf::Stm32Pwm, and semf::SoftPwm.
|
pure virtual |
Set a PWM value. Duty cycle is value / maxValue.
value | The new PWM value. |
inverted | Invert the PWM output. |
Implemented in semf::Stm32Pwm, and semf::SoftPwm.
|
pure virtual |
Set the maximum possible PWM value.
maxValue | The maximum possible PWM value. |
Implemented in semf::Stm32Pwm, and semf::SoftPwm.
|
pure virtual |
Start the PWM hardware.
Implemented in semf::Stm32Pwm, and semf::SoftPwm.
|
pure virtual |
Stop the PWM hardware.
Implemented in semf::Stm32Pwm, and semf::SoftPwm.
|
pure virtual |
Returns the current PWM value.
Implemented in semf::Stm32Pwm, and semf::SoftPwm.