|
FreeNOS
|
#include <ARM64Timer.h>
Public Member Functions | |
| ARM64Timer () | |
| Constructor. | |
| virtual Result | setFrequency (const Size hertz) |
| Set timer frequency. | |
| virtual Result | tick () |
| Process timer tick. | |
Public Member Functions inherited from Timer | |
| struct Timer::Info | ALIGN (8) Info |
| Timer information structure. | |
| Timer () | |
| Constructor. | |
| Size | getInterrupt () const |
| Get timer interrupt number. | |
| Size | getFrequency () const |
| Get timer frequency. | |
| virtual Result | getCurrent (Info *info, const Size msecOffset=0) |
| Get current timer info. | |
| virtual Result | initialize () |
| Initialize the timer. | |
| virtual Result | start () |
| Start the timer. | |
| virtual Result | stop () |
| Stop the timer. | |
| virtual Result | wait (u32 microseconds) const |
| Busy wait a number of microseconds. | |
| bool | isExpired (const Info &info) const |
| Check if a timer value is expired. | |
Private Member Functions | |
| u32 | getSystemFrequency (void) const |
| Retrieve system timer frequency. | |
| void | setPL1PhysicalTimerValue (const u32 value) |
| Set Physical Timer 1 value. | |
| void | setPL1PhysicalTimerControl (const u32 value) |
| Set Physical Timer 1 control value. | |
Private Attributes | |
| Size | m_initialTimerCounter |
| Currently configured initial timer counter. | |
Static Private Attributes | |
| static const u32 | TimerControlEnable = 1 |
| Set this bit in the PL1 control register to enable it. | |
Additional Inherited Members | |
Public Types inherited from Timer | |
| enum | Result { Success , NotFound , IOError , InvalidFrequency } |
| Result codes. More... | |
Data Fields inherited from Timer | |
| enum Timer::Result | ALIGN |
Protected Attributes inherited from Timer | |
| Size | m_ticks |
| The current timer ticks. | |
| Size | m_frequency |
| Frequency of the Timer. | |
| Size | m_int |
| Timer interrupt number. | |
ARM64 Generic Timer.
Definition at line 40 of file ARM64Timer.h.
| ARM64Timer::ARM64Timer | ( | ) |
|
private |
Retrieve system timer frequency.
Definition at line 29 of file ARM64Timer.cpp.
References ARM64Control::read(), and ARM64Control::SystemFrequency.
Referenced by setFrequency().
|
virtual |
Set timer frequency.
| hertz | Frequency of the timer in hertz. |
Reimplemented from Timer.
Definition at line 48 of file ARM64Timer.cpp.
References getSystemFrequency(), m_initialTimerCounter, Timer::setFrequency(), and tick().
Referenced by RaspberryKernel::RaspberryKernel().
|
private |
Set Physical Timer 1 control value.
| value | New timer control value |
Definition at line 42 of file ARM64Timer.cpp.
References ARM64Control::PhysicalTimerControl, and ARM64Control::write().
Referenced by tick().
|
private |
Set Physical Timer 1 value.
| value | New timer value |
Definition at line 36 of file ARM64Timer.cpp.
References ARM64Control::PhysicalTimerValue, and ARM64Control::write().
Referenced by tick().
|
virtual |
Process timer tick.
Should be called on each timer interrupt to restart the timer by applying the initial timer counter value.
Reimplemented from Timer.
Definition at line 56 of file ARM64Timer.cpp.
References m_initialTimerCounter, setPL1PhysicalTimerControl(), setPL1PhysicalTimerValue(), Timer::tick(), and TimerControlEnable.
Referenced by setFrequency().
|
private |
Currently configured initial timer counter.
Definition at line 99 of file ARM64Timer.h.
Referenced by setFrequency(), and tick().
|
staticprivate |
Set this bit in the PL1 control register to enable it.
Definition at line 45 of file ARM64Timer.h.
Referenced by tick().