libyggdrasil
v1.0.0
|
Timer implementation for Midgard. More...
#include <timer.hpp>
Static Public Member Functions | |
static bool | init () |
Init function. More... | |
static bool | deinit () |
Deinit function. More... | |
static void | enable () |
Enable the counter. More... | |
static void | disable () |
Disable the counter. More... | |
static Size | getCount () |
Get the counter value. More... | |
static void | setCount (Size cnt) |
Set the counter value. More... | |
static u32 | getPwmFrequency () |
Get the pwm frequency. More... | |
static bool | setPwmFrequency (u32 f_hz, Size resolution=0) |
Set the pwm frequency and (optional) the maximal ticks within on cycle for all channels. More... | |
Static Public Attributes | |
template<u8 Number> | |
static constexpr auto | Channel = TimerChannel<Context, Number, Size>() |
Timer channel. More... | |
static constexpr auto | Encoder = TimerEncoder<Context, Size>() |
Timer in encoder mode. More... | |
static constexpr auto | ProfileCounter = TimerProfileCounter<Context, Size>() |
Timer used as profile counter. More... | |
Timer implementation for Midgard.
|
inlinestatic |
Deinit function.
|
inlinestatic |
Disable the counter.
|
inlinestatic |
Enable the counter.
|
inlinestatic |
Get the counter value.
|
inlinestatic |
Get the pwm frequency.
|
inlinestatic |
Init function.
|
inlinestatic |
Set the counter value.
cnt | New timer value |
|
inlinestatic |
Set the pwm frequency and (optional) the maximal ticks within on cycle for all channels.
f_hz | new frequency in hz |
resolution | of the pwm, for 0 the actual value will be used |
|
staticconstexpr |
Timer channel.
Number | Channel number |
|
staticconstexpr |
Timer in encoder mode.
|
staticconstexpr |
Timer used as profile counter.