Timer2Clock Struct Reference
Clock implementation for Hardware Timer 2. More...
#include <Clocks.h>
Inheritance diagram for Timer2Clock:
Collaboration diagram for Timer2Clock:
Public Types | |
using | TickType = uint32_t |
using | TicksConst = TicksConst< Clock, ticks > |
using | TimeConst = TimeConst< Clock, unit, time > |
using | TicksPerUnit = std::ratio_divide< std::ratio< frequency_ >, UnitTickRatio< unit > > |
using | TimeSource = TimeSource< Clock, unit, TimeType > |
using | Ticks = Ticks< Clock, T > |
using | MaxTicks = TicksConst< maxTicks_ > |
using | MaxTime = typename MaxTicks::template TimeConst< unit > |
Static Public Member Functions | |
static constexpr const char * | typeName () |
static uint32_t | ticks () |
static constexpr uint32_t | frequency () |
static constexpr MaxTicks | maxTicks () |
static constexpr MaxTime< unit > | maxTime () |
static Ratio32 | ticksPerUnit (Unit unit) |
Get ticks per unit as a Ratio object. More... | |
static constexpr TimeConst< unit, time > | timeConst () |
Class template defining a fixed time quantity. More... | |
static constexpr TicksConst< ticks > | ticksConst () |
Class template defining a fixed tick quantity. More... | |
static constexpr TimeSource< unit, TimeType > | timeSource () |
Create a Time Source for this Clock. More... | |
static Ticks< TimeType > | timeToTicks (TimeType time) |
Get the number of ticks for a given time. More... | |
static Time< TimeType > | ticksToTime (TimeType ticks) |
Get the time for a given number of clock ticks. More... | |
static String | toString () |
Detailed Description
Member Typedef Documentation
◆ MaxTicks
|
inherited |
◆ MaxTime
|
inherited |
◆ Ticks
|
inherited |
◆ TicksConst
|
inherited |
◆ TicksPerUnit
|
inherited |
◆ TickType
|
inherited |
◆ TimeConst
|
inherited |
◆ TimeSource
|
inherited |
Member Function Documentation
◆ frequency()
|
inlinestaticinherited |
◆ maxTicks()
|
inlinestaticinherited |
◆ maxTime()
|
inlinestaticinherited |
◆ ticks()
|
inlinestatic |
◆ ticksConst()
|
inlinestaticinherited |
Class template defining a fixed tick quantity.
- Template Parameters
-
ticks
- Return values
-
TicksConst<Clock,ticks>
◆ ticksPerUnit()
|
inlinestaticinherited |
Get ticks per unit as a Ratio object.
- Return values
-
BasicRatio32
◆ ticksToTime()
|
inlinestaticinherited |
Get the time for a given number of clock ticks.
- Parameters
-
ticks
- Return values
-
TimeType Time count, rounded to the nearest unit
◆ timeConst()
|
inlinestaticinherited |
Class template defining a fixed time quantity.
- Template Parameters
-
time
- Return values
-
TimeConst
◆ timeSource()
|
inlinestaticinherited |
Create a Time Source for this Clock.
- Template Parameters
-
unit TimeType
◆ timeToTicks()
|
inlinestaticinherited |
Get the number of ticks for a given time.
- Parameters
-
time
- Return values
-
TimeType Tick count, rounded to the nearest tick
◆ toString()
|
inlinestaticinherited |
◆ typeName()
|
inlinestatic |
The documentation for this struct was generated from the following file: