Template class for hardware based PWM outputs.
More...
#include <pwm.h>
|
| void | pwm (double perc) |
| | set pwm in percent
|
| |
| void | ticks (uint32_t ticks) |
| | set pwm as value of timer ticks
|
| |
| void | period (uint16_t period) |
| | change frequency by setting period of timer freq = base / period counter is blocked while period = 0
|
| |
|
| PWM (const Config &conf) |
| | Initialize Timer Channel.
|
| |
|
double | pwm () |
| | get currently set pwm value in percent
|
| |
|
uint32_t | ticks () |
| | get currently set pwm value in timer ticks
|
| |
Template class for hardware based PWM outputs.
◆ TIMER::PWM::Config
| struct TIMER::PWM::Config |
| Class Members |
|
HW * |
tim |
TIMER::HW peripheral. |
|
uint32_t |
chan |
Timer channel. |
|
AFIO |
pin |
pin in alternate function mode |
◆ pwm()
| void TIMER::PWM::pwm |
( |
double |
perc | ) |
|
|
inline |
set pwm in percent
- Parameters
-
◆ ticks()
| void TIMER::PWM::ticks |
( |
uint32_t |
ticks | ) |
|
|
inline |
set pwm as value of timer ticks
- Parameters
-
◆ period()
| void TIMER::PWM::period |
( |
uint16_t |
period | ) |
|
|
inline |
change frequency by setting period of timer freq = base / period counter is blocked while period = 0
- Parameters
-
The documentation for this class was generated from the following file: