#include <timer0.h>
|
template<uint32_t CPUFREQUENCY> |
static bool | autoFill (Config &config, uint32_t desiredCycleTime, uint32_t *actualCycleTime=nullptr) |
|
Implements the Timer interface using the Timer0 hardware unit.
◆ configure()
void Timer0::configure |
( |
const Config & |
config | ) |
|
|
overridevirtual |
Configures the timer device.
- Parameters
-
config | Configuration for timer device. |
Implements Timer.
◆ enableOutputCompareMatchInterrupt()
void Timer0::enableOutputCompareMatchInterrupt |
( |
bool |
state | ) |
|
|
overridevirtual |
Enables or disabled the Output Compare Match interrupt.
- Parameters
-
state | True to enable interrupt, false to disable. |
Implements Timer.
◆ enableOverflowInterrupt()
void Timer0::enableOverflowInterrupt |
( |
bool |
state | ) |
|
|
overridevirtual |
Enables or disabled the Overflow interrupt.
- Parameters
-
state | True to enable interrupt, false to disable. |
Implements Timer.
◆ forceOutputCompareMatch()
void Timer0::forceOutputCompareMatch |
( |
void |
| ) |
|
|
overridevirtual |
Strobes the force output compare match flag.
Implements Timer.
◆ getCounterRegister()
uint8_t Timer0::getCounterRegister |
( |
void |
| ) |
|
|
overridevirtual |
Gets the current value of the counter register.
- Returns
- Current value of the counter register.
Implements Timer.
◆ setCounterRegister()
void Timer0::setCounterRegister |
( |
uint8_t |
value | ) |
|
|
overridevirtual |
Sets the counter register value.
- Parameters
-
Implements Timer.
◆ setInterruptHandler()
Sets callback for interrupts.
- Parameters
-
handler | Pointer to class implementing the interrupt handler interface. |
Implements Timer.
◆ setOutputCompareValue()
void Timer0::setOutputCompareValue |
( |
uint8_t |
value | ) |
|
|
overridevirtual |
Sets the output compare register value.
- Parameters
-
Implements Timer.