semf
|
Class for using a PWM as an output with permille value handling. More...
#include <pwmout.h>
Public Member Functions | |
PwmOut (Pwm &pwm) | |
Constructor. More... | |
PwmOut (const PwmOut &other)=delete | |
void | enable (bool enable=true) override |
Enables / disable the PWM output. More... | |
void | disable (bool disable=true) override |
Enables / disable the PWM output. More... | |
bool | isEnabled () const override |
Current status of the PWM module. More... | |
void | start () override |
Enables the PWM. More... | |
void | stop () override |
Disable the PWM. More... | |
void | setValue (uint32_t pwm) override |
Change the PWM value. More... | |
uint32_t | value () const override |
Returns the current PWM value. More... | |
void | setPermille (uint16_t pwm) override |
Set the PWM value in permille. The pwm value is calculated based on the set maximum value. More... | |
uint16_t | permille () const override |
Returns the current PWM value in permille. The PWM value is calculated based on the set maximum value. More... | |
void | setMaxValue (uint32_t pwm) override |
Set the maximum value for the PWM. More... | |
uint32_t | maxValue () const override |
Returns the maximum possible PWM value. More... | |
void | setInverted (bool inverted) override |
To configure whether the PWM should be inverted. This configuration does not become active until the methods setValue() , setEnabled(bool enable) or start() have been called. More... | |
Public Member Functions inherited from semf::app::PwmOut | |
virtual | ~PwmOut ()=default |
virtual void | enable (bool enable=true)=0 |
Enables / disable the PWM output. More... | |
virtual void | disable (bool disable=true)=0 |
Enables / disable the PWM output. More... | |
virtual bool | isEnabled () const =0 |
Current status of the PWM module. More... | |
virtual void | start ()=0 |
Enables the PWM. More... | |
virtual void | stop ()=0 |
Disable the PWM. More... | |
virtual void | setValue (uint32_t pwm)=0 |
Change the PWM value. More... | |
virtual uint32_t | value () const =0 |
Returns the current PWM value. More... | |
virtual void | setPermille (uint16_t pwm)=0 |
Set the PWM value in permille. The pwm value is calculated based on the set maximum value. More... | |
virtual uint16_t | permille () const =0 |
Returns the current PWM value in permille. The PWM value is calculated based on the set maximum value. More... | |
virtual void | setMaxValue (uint32_t pwm)=0 |
Set the maximum value for the PWM. More... | |
virtual uint32_t | maxValue () const =0 |
Returns the maximum possible PWM value. More... | |
virtual void | setInverted (bool inverted)=0 |
To configure whether the PWM should be inverted. This configuration does not become active until the methods setValue() , setEnabled(bool enable) or start() have been called. More... | |
Class for using a PWM as an output with permille value handling.
|
explicit |
|
explicitdelete |
|
overridevirtual |
Enables / disable the PWM output.
disable |
|
Implements semf::app::PwmOut.
Definition at line 35 of file pwmout.cpp.
|
overridevirtual |
Enables / disable the PWM output.
enable |
|
Implements semf::app::PwmOut.
Definition at line 20 of file pwmout.cpp.
|
overridevirtual |
Current status of the PWM module.
Implements semf::app::PwmOut.
Definition at line 40 of file pwmout.cpp.
|
overridevirtual |
Returns the maximum possible PWM value.
Implements semf::app::PwmOut.
Definition at line 101 of file pwmout.cpp.
|
overridevirtual |
Returns the current PWM value in permille. The PWM value is calculated based on the set maximum value.
Implements semf::app::PwmOut.
Definition at line 81 of file pwmout.cpp.
|
overridevirtual |
To configure whether the PWM should be inverted. This configuration does not become active until the methods setValue()
, setEnabled(bool enable)
or start()
have been called.
inverted |
|
setValue()
, setEnabled()
and start()
. Implements semf::app::PwmOut.
Definition at line 106 of file pwmout.cpp.
|
overridevirtual |
Set the maximum value for the PWM.
pwm | The maximum possible PWM value. The minimum value is 1. |
Implements semf::app::PwmOut.
Definition at line 86 of file pwmout.cpp.
|
overridevirtual |
Set the PWM value in permille. The pwm value is calculated based on the set maximum value.
pwm | The PWM value in permille. Valid range is 0 - 1000. |
Implements semf::app::PwmOut.
Definition at line 71 of file pwmout.cpp.
|
overridevirtual |
Change the PWM value.
pwm | the new PWM value. |
Implements semf::app::PwmOut.
Definition at line 55 of file pwmout.cpp.
|
overridevirtual |
Enables the PWM.
Implements semf::app::PwmOut.
Definition at line 45 of file pwmout.cpp.
|
overridevirtual |
Disable the PWM.
Implements semf::app::PwmOut.
Definition at line 50 of file pwmout.cpp.
|
overridevirtual |
Returns the current PWM value.
Implements semf::app::PwmOut.
Definition at line 66 of file pwmout.cpp.