The Ticker device demonstrates HPET interrupts.
More...
#include <device/ticker.h>
|
| bool | windup (uint64_t us) |
| | Windup / initialize. More...
|
| |
| bool | prologue () override |
| | Prologue of timer interrupts. More...
|
| |
| void | epilogue () override |
| | Epilogue of timer interrupts. More...
|
| |
| uint64_t | interval () const |
| | Retrieve the interrupt interval. More...
|
| |
| void | activate () |
| | Activate the timer. More...
|
| |
| void | stop () |
| | Stop the timer. More...
|
| |
|
| Gate () |
| | Constructor.
|
| |
| virtual | ~Gate () |
| | Destructor. More...
|
| |
| virtual bool | prologue ()=0 |
| | Device-specific interrupt handling routine that is executed immediately after the interrupt occurs (asynchronously). More...
|
| |
| virtual void | epilogue () |
| | Possibly delayed, synchronously executed Device-specific interrupt handling routine. More...
|
| |
The Ticker device demonstrates HPET interrupts.
Periodic HPET interrupts increase the counter, which is displayed on a designated spot on the screen and shows the current systems runtime.
◆ windup()
| bool Ticker::windup |
( |
uint64_t |
us | ) |
|
Windup / initialize.
Assigns itself to the Plugbox and initializes a HPET::Comparator in such a way that regular interrupts are triggered approx. every us microseconds when Ticker::activate() is called.
- Note
- This method must find a comparator capable of periodic interrupts.
-
For IOAPIC::config use Trigger Mode `LEVEL` with Polarity `LOW` to ensure operation on both Qemu/KVM and our test hardware.
- Parameters
-
| us | Desired interrupt interval in microseconds. |
- Returns
- Indicates if the interval could be set.
- Optional:
- Implement Method
◆ prologue()
| bool Ticker::prologue |
( |
| ) |
|
|
overridevirtual |
Prologue of timer interrupts.
- Returns
true if the interrupt was issued by the HPET and Ticker::epilogue should be executed.
- Optional:
- Implement Method
Implements Gate.
◆ epilogue()
| void Ticker::epilogue |
( |
| ) |
|
|
overridevirtual |
Epilogue of timer interrupts.
Increases and displays the counter value (uptime)
- Optional:
- Implement Method
Reimplemented from Gate.
◆ interval()
| uint64_t Ticker::interval |
( |
| ) |
const |
|
inline |
Retrieve the interrupt interval.
- Returns
- Interval in microseconds
- Optional:
- Implement method
◆ activate()
| void Ticker::activate |
( |
| ) |
|
|
inline |
Activate the timer.
- Optional:
- Implement method
◆ stop()
The documentation for this class was generated from the following files: