The Pedigree Project 0.1
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Rtc Class Reference

#include <Rtc.h>

+ Inheritance diagram for Rtc:
+ Collaboration diagram for Rtc:

Classes

class  CmosTransactionGuard
 
struct  periodicIrqInfo_t
 

Public Member Functions

virtual bool registerHandler (TimerHandler *handler)
 
virtual bool unregisterHandler (TimerHandler *handler)
 
bool armHandler (TimerHandler *handler, uint64_t absoluteDeadlineNs) override
 
bool supportsDeadlines () const override
 
void deadlineInterrupt () override
 
virtual void addAlarm (class Event *pEvent, size_t alarmSecs, size_t alarmUsecs=0)
 
virtual void removeAlarm (class Event *pEvent)
 
virtual size_t removeAlarm (class Event *pEvent, bool bRetZero)
 
virtual size_t getYear ()
 
virtual uint8_t getMonth ()
 
virtual uint8_t getDayOfMonth ()
 
virtual uint8_t getDayOfWeek ()
 
virtual uint8_t getHour ()
 
virtual uint8_t getMinute ()
 
virtual uint8_t getSecond ()
 
virtual uint64_t getNanosecond ()
 
Time::Timestamp getUnixTimestamp () override
 
virtual uint64_t getTickCount ()
 
virtual uint64_t getTickCountNano ()
 
virtual uint64_t getTickCountNanoFast ()
 
Time::CpuTimeSample sampleCpuTime () override
 
bool initialise1 (uint8_t centuryIndex) INITIALISATION_ONLY
 
bool initialise2 () INITIALISATION_ONLY
 
void initialiseProcessorClock () INITIALISATION_ONLY
 
bool initialise3 ()
 
virtual void synchronise (bool tohw=false)
 
void uninitialise ()
 

Static Public Member Functions

static Rtc & instance ()
 
static EXPORTED_PUBLIC uint8_t readCmos (uint8_t index)
 
static EXPORTED_PUBLIC void writeCmos (uint8_t index, uint8_t value)
 

Protected Member Functions

 Rtc () INITIALISATION_ONLY
 
virtual ~Rtc ()
 
- Protected Member Functions inherited from Timer
 Timer ()
 
virtual ~Timer ()
 

Private Types

using Alarm = RtcAlarmQueue::Record
 

Private Member Functions

 Rtc (const Rtc &)
 
Rtc & operator= (const Rtc &)
 
IrqDisposition irq (irq_id_t number) override
 
void processElapsedTime (uint64_t observed)
 
uint64_t advanceCivilClock (uint64_t observed, uint64_t *elapsedSeconds=nullptr)
 
int runDeadlineWorker ()
 
void publishNextDeadlineLocked ()
 
void setPeriodicInterruptEnabled (bool enabled)
 
void setIndexLocked (uint8_t index)
 
bool waitForUpdateCompletion (uint8_t index)
 
bool read (uint8_t index, uint8_t &value)
 
uint8_t readLocked (uint8_t index)
 
void writeLocked (uint8_t index, uint8_t value)
 
uint8_t read (uint8_t index)
 
bool write (uint8_t index, uint8_t value)
 
bool readHardwareClock ()
 
bool writeHardwareClock ()
 
bool inhibitClockUpdatesLocked (uint8_t &status)
 
void drainRemoteAlarmDispatch (class Event *pEvent, void *owner)
 
- Private Member Functions inherited from IrqHandler
virtual bool acceptsSpuriousInterrupts () const
 
virtual ~IrqHandler ()
 
- Private Member Functions inherited from IrqHandlerBase
virtual ~IrqHandlerBase ()
 

Static Private Member Functions

static int deadlineWorkerEntry (void *context)
 

Private Attributes

IoPort m_IoPort
 
irq_id_t m_IrqId
 
size_t m_PeriodicIrqInfoIndex
 
uint8_t m_CenturyIndex
 
size_t m_Year
 
uint8_t m_Month
 
uint8_t m_DayOfMonth
 
uint8_t m_Hour
 
uint8_t m_Minute
 
uint8_t m_Second
 
uint64_t m_Nanosecond
 
Atomic< uint64_t > m_TickCount
 
uint64_t m_ProcessedTickCount
 
TimerHandlerRegistry m_HandlerRegistry
 
PerProcessorScheduler * m_DeadlineScheduler
 
OwnedThread m_DeadlineWorker
 
WaitQueue m_DeadlineWaiters
 
SchedulerWorkerWake m_DeadlineWake
 
Atomic< size_t > m_DeadlinePending
 
Atomic< size_t > m_StopDeadlineWorker
 
Atomic< size_t > m_DeadlineMode
 
RtcAlarmQueue m_AlarmQueue
 
Spinlock m_Lock
 
Mutex m_CmosLock
 
PcTscClock::Calibration m_TscCalibration
 
uint64_t m_Tsc0
 
PcTscClock::MonotonicPublication m_MonotonicTicks
 

Static Private Attributes

static periodicIrqInfo_t periodicIrqInfo [12]
 
static Rtc m_Instance
 

Detailed Description

Class for the Real-time clock / CMOS implementing the Timer interface

Definition at line 50 of file Rtc.h.

Member Typedef Documentation

◆ Alarm

Definition at line 242 of file Rtc.h.

Constructor & Destructor Documentation

◆ Rtc() [1/2]

Rtc::Rtc ( )
protected

The default constructor

Definition at line 736 of file Rtc.cc.

◆ ~Rtc()

virtual Rtc::~Rtc ( )
inlineprotectedvirtual

The destructor

Definition at line 111 of file Rtc.h.

◆ Rtc() [2/2]

Rtc::Rtc ( const Rtc &  )
private

The copy-constructor

Note
NOT implemented

Member Function Documentation

◆ addAlarm()

void Rtc::addAlarm ( class Event *  pEvent,
size_t  alarmSecs,
size_t  alarmUsecs = 0 
)
virtual

Dispatches the Event pEvent to the current thread in alarmSecs time.

Parameters
pEventEvent to dispatch.
alarmSecsNumber of seconds to wait.

Implements Timer.

Definition at line 195 of file Rtc.cc.

References Spinlock::acquire(), getTickCountNano(), ProcessorBase::information(), m_AlarmQueue, m_Lock, and Spinlock::release().

◆ advanceCivilClock()

uint64_t Rtc::advanceCivilClock ( uint64_t  observed,
uint64_t *  elapsedSeconds = nullptr 
)
private

Definition at line 876 of file Rtc.cc.

◆ armHandler()

bool Rtc::armHandler ( TimerHandler *  ,
uint64_t   
)
overridevirtual

Arms a registered handler for one callback at an absolute monotonic nanosecond deadline. A zero deadline disarms it. The handler may rearm itself from its callback.

Reimplemented from Timer.

Definition at line 315 of file Rtc.cc.

References TimerHandlerRegistry::armHandler(), getTickCountNano(), m_HandlerRegistry, and m_Lock.

◆ deadlineInterrupt()

void Rtc::deadlineInterrupt ( )
overridevirtual

Notifies the timekeeper of a clockevent from hard interrupt context.

Reimplemented from Timer.

Definition at line 337 of file Rtc.cc.

References PerProcessorScheduler::ringIrqWorkDoorbell().

◆ deadlineWorkerEntry()

int Rtc::deadlineWorkerEntry ( void *  context)
staticprivate

Definition at line 345 of file Rtc.cc.

◆ drainRemoteAlarmDispatch()

void Rtc::drainRemoteAlarmDispatch ( class Event *  pEvent,
void *  owner 
)
private

Drains a sendEvent handoff owned by another processor.

Definition at line 218 of file Rtc.cc.

References Spinlock::acquire(), Thread::getDebugState(), ProcessorBase::getInterrupts(), ProcessorBase::information(), Scheduler::instance(), m_AlarmQueue, m_Lock, ProcessorBase::pause(), Spinlock::release(), Thread::setDebugState(), and Scheduler::yield().

Referenced by removeAlarm(), and removeAlarm().

+ Here is the caller graph for this function:

◆ getDayOfMonth()

uint8_t Rtc::getDayOfMonth ( )
virtual

Get the current day of month

Returns
the current day of month

Implements Timer.

Definition at line 378 of file Rtc.cc.

References m_DayOfMonth.

◆ getDayOfWeek()

uint8_t Rtc::getDayOfWeek ( )
virtual

Get the current day of week

Returns
the current day of week

Implements Timer.

Definition at line 381 of file Rtc.cc.

References m_DayOfMonth, m_Month, and m_Year.

◆ getHour()

uint8_t Rtc::getHour ( )
virtual

Get the current hour

Returns
the current hour

Implements Timer.

Definition at line 395 of file Rtc.cc.

References m_Hour.

◆ getMinute()

uint8_t Rtc::getMinute ( )
virtual

Get the current minute

Returns
the current minute

Implements Timer.

Definition at line 398 of file Rtc.cc.

References m_Minute.

◆ getMonth()

uint8_t Rtc::getMonth ( )
virtual

Get the current month

Returns
the current month

Implements Timer.

Definition at line 375 of file Rtc.cc.

References m_Month.

◆ getNanosecond()

uint64_t Rtc::getNanosecond ( )
virtual

Get the current nanosecond

Returns
the current nanosecond

Implements Timer.

Definition at line 404 of file Rtc.cc.

References m_Nanosecond.

◆ getSecond()

uint8_t Rtc::getSecond ( )
virtual

Get the current second

Returns
the current second

Implements Timer.

Definition at line 401 of file Rtc.cc.

References m_Second.

◆ getTickCount()

uint64_t Rtc::getTickCount ( )
virtual

Get the Tick count (time elapsed since system bootup)

Returns
the tick count in milliseconds

Implements Timer.

Definition at line 413 of file Rtc.cc.

References getTickCountNano().

◆ getTickCountNano()

uint64_t Rtc::getTickCountNano ( )
virtual

Get the Tick count (time elapsed since system bootup) in nanosconds.

Returns
the tick count in nanoseconds

Reimplemented from Timer.

Definition at line 416 of file Rtc.cc.

References ProcessorBase::getInterrupts(), ProcessorBase::information(), m_MonotonicTicks, m_TickCount, m_Tsc0, m_TscCalibration, and ProcessorBase::setInterrupts().

Referenced by addAlarm(), armHandler(), getTickCount(), initialise3(), irq(), removeAlarm(), and uninitialise().

+ Here is the caller graph for this function:

◆ getTickCountNanoFast()

uint64_t Rtc::getTickCountNanoFast ( )
virtual

Get the tick count while the caller already owns the IRQ-disabled window.

Reimplemented from Timer.

Definition at line 437 of file Rtc.cc.

References sampleCpuTime().

◆ getUnixTimestamp()

Time::Timestamp Rtc::getUnixTimestamp ( )
overridevirtual

Get the time in UNIX timestamp form (seconds since Jan 1st, 1970).

Reimplemented from Timer.

Definition at line 407 of file Rtc.cc.

References Timer::getUnixTimestamp().

◆ getYear()

size_t Rtc::getYear ( )
virtual

Get the current year

Returns
the current year

Implements Timer.

Definition at line 372 of file Rtc.cc.

References m_Year.

◆ inhibitClockUpdatesLocked()

bool Rtc::inhibitClockUpdatesLocked ( uint8_t &  status)
private

Definition at line 968 of file Rtc.cc.

◆ initialise1()

bool Rtc::initialise1 ( uint8_t  centuryIndex)

Initialises the class

Returns
true, if successful, false otherwise

Definition at line 455 of file Rtc.cc.

References IoPort::allocate(), Hex, m_HandlerRegistry, m_IoPort, m_IrqId, m_PeriodicIrqInfoIndex, periodicIrqInfo, Rtc::periodicIrqInfo_t::rateBits, readHardwareClock(), TimerHandlerRegistry::reset(), and write().

Referenced by Pc::initialise().

+ Here is the caller graph for this function:

◆ initialise2()

bool Rtc::initialise2 ( )

◆ initialise3()

bool Rtc::initialise3 ( )

◆ initialiseProcessorClock()

void Rtc::initialiseProcessorClock ( )

Anchors the calling application processor to global monotonic time.

Definition at line 583 of file Rtc.cc.

References ProcessorBase::getInterrupts(), ProcessorBase::information(), m_MonotonicTicks, m_TickCount, and ProcessorBase::setInterrupts().

◆ instance()

static Rtc & Rtc::instance ( )
inlinestatic

Definition at line 52 of file Rtc.h.

◆ irq()

IrqDisposition Rtc::irq ( irq_id_t  number)
overrideprivatevirtual

Handles a pending IRQ in thread context.

Implements IrqHandler.

Definition at line 768 of file Rtc.cc.

References getTickCountNano(), m_CmosLock, and processElapsedTime().

◆ operator=()

Rtc & Rtc::operator= ( const Rtc &  )
private

The assignment operator

Note
NOT implemented

◆ processElapsedTime()

void Rtc::processElapsedTime ( uint64_t  observed)
private

◆ publishNextDeadlineLocked()

void Rtc::publishNextDeadlineLocked ( )
private

Definition at line 327 of file Rtc.cc.

◆ read() [1/2]

uint8_t Rtc::read ( uint8_t  index)
private

Read the value in the CMOS at a specific index

Parameters
[in]indexthe index
Returns
the value at the index

Definition at line 934 of file Rtc.cc.

◆ read() [2/2]

bool Rtc::read ( uint8_t  index,
uint8_t &  value 
)
private

Definition at line 940 of file Rtc.cc.

◆ readCmos()

uint8_t Rtc::readCmos ( uint8_t  index)
static

Access CMOS through the RTC-owned selector/data transaction.

These entrypoints exist for PC compatibility layers which need CMOS bytes but must not access ports 0x70/0x71 independently of the RTC.

Definition at line 930 of file Rtc.cc.

References m_Instance.

◆ readHardwareClock()

bool Rtc::readHardwareClock ( )
private

Transfer a complete clock snapshot without partially publishing it.

Definition at line 984 of file Rtc.cc.

References m_CmosLock, m_DayOfMonth, m_Hour, m_Minute, m_Month, m_Second, m_Year, and waitForUpdateCompletion().

Referenced by initialise1(), and synchronise().

+ Here is the caller graph for this function:

◆ readLocked()

uint8_t Rtc::readLocked ( uint8_t  index)
private

Definition at line 949 of file Rtc.cc.

◆ registerHandler()

bool Rtc::registerHandler ( TimerHandler *  handler)
virtual

Implements Timer.

Definition at line 302 of file Rtc.cc.

◆ removeAlarm() [1/2]

void Rtc::removeAlarm ( class Event *  pEvent)
virtual

Removes the event pEvent from the alarm queue. Once this returns, the timer will not begin another delivery of this event.

Parameters
pEventEvent to remove alarm for.

Implements Timer.

Definition at line 252 of file Rtc.cc.

References Spinlock::acquire(), drainRemoteAlarmDispatch(), m_AlarmQueue, m_Lock, and Spinlock::release().

◆ removeAlarm() [2/2]

size_t Rtc::removeAlarm ( class Event *  pEvent,
bool  bRetZero 
)
virtual

Removes the event pEvent from the alarm queue. Once this returns, the timer will not begin another delivery of this event.

Parameters
pEventEvent to remove alarm for.
bRetZeroIf true, returns zero rather the time until firing
Returns
The number of seconds before the event would have fired, or zero if bRetZero is true.

Implements Timer.

Definition at line 271 of file Rtc.cc.

References Spinlock::acquire(), drainRemoteAlarmDispatch(), getTickCountNano(), m_AlarmQueue, m_Lock, and Spinlock::release().

◆ runDeadlineWorker()

int Rtc::runDeadlineWorker ( )
private

Definition at line 349 of file Rtc.cc.

◆ sampleCpuTime()

Time::CpuTimeSample Rtc::sampleCpuTime ( )
overridevirtual

Samples nanoseconds and CPU identity while the caller keeps interrupts disabled.

Reimplemented from Timer.

Definition at line 441 of file Rtc.cc.

References ProcessorBase::index(), ProcessorBase::information(), m_Tsc0, and m_TscCalibration.

Referenced by getTickCountNanoFast().

+ Here is the caller graph for this function:

◆ setIndexLocked()

void Rtc::setIndexLocked ( uint8_t  index)
private

Set the index register

Parameters
[in]indexthe new index

Definition at line 898 of file Rtc.cc.

References m_IoPort, IoPort::read8(), and IoPort::write8().

Referenced by waitForUpdateCompletion().

+ Here is the caller graph for this function:

◆ setPeriodicInterruptEnabled()

void Rtc::setPeriodicInterruptEnabled ( bool  enabled)
private

Atomically changes the RTC periodic-interrupt source and clears C.

Definition at line 1033 of file Rtc.cc.

References m_CmosLock.

Referenced by initialise2(), initialise3(), and uninitialise().

+ Here is the caller graph for this function:

◆ supportsDeadlines()

bool Rtc::supportsDeadlines ( ) const
inlineoverridevirtual

Whether absolute handler deadlines are available on this timer.

Reimplemented from Timer.

Definition at line 62 of file Rtc.h.

◆ synchronise()

void Rtc::synchronise ( bool  tohw = false)
virtual

Synchronise the time/date with the hardware

Reimplemented from Timer.

Definition at line 683 of file Rtc.cc.

References readHardwareClock().

Referenced by uninitialise().

+ Here is the caller graph for this function:

◆ uninitialise()

void Rtc::uninitialise ( )

◆ unregisterHandler()

bool Rtc::unregisterHandler ( TimerHandler *  handler)
virtual

Implements Timer.

Definition at line 306 of file Rtc.cc.

◆ waitForUpdateCompletion()

bool Rtc::waitForUpdateCompletion ( uint8_t  index)
private

Wait until the Update of the RTC entries in the CMOS is complete, if we want to access one of those entries

Parameters
[in]indexthe index we want to access afterwards
Returns
true if the update completed before the hardware deadline

Definition at line 903 of file Rtc.cc.

References m_CmosLock, m_IoPort, ProcessorBase::pause(), IoPort::read8(), and setIndexLocked().

Referenced by readHardwareClock(), and write().

+ Here is the caller graph for this function:

◆ write()

bool Rtc::write ( uint8_t  index,
uint8_t  value 
)
private

Write the value to the CMOS at a specific index

Parameters
[in]indexthe index
[in]valuethe value
Returns
true if the write was performed

Definition at line 954 of file Rtc.cc.

References m_CmosLock, and waitForUpdateCompletion().

Referenced by initialise1(), and initialise3().

+ Here is the caller graph for this function:

◆ writeCmos()

void Rtc::writeCmos ( uint8_t  index,
uint8_t  value 
)
static

Definition at line 964 of file Rtc.cc.

◆ writeHardwareClock()

bool Rtc::writeHardwareClock ( )
private

Definition at line 1009 of file Rtc.cc.

◆ writeLocked()

void Rtc::writeLocked ( uint8_t  index,
uint8_t  value 
)
private

Definition at line 1028 of file Rtc.cc.

Member Data Documentation

◆ m_AlarmQueue

RtcAlarmQueue Rtc::m_AlarmQueue
private

Intrusive alarm ownership; queue operations never allocate in IRQs.

Definition at line 245 of file Rtc.h.

Referenced by addAlarm(), drainRemoteAlarmDispatch(), processElapsedTime(), removeAlarm(), removeAlarm(), and uninitialise().

◆ m_CenturyIndex

uint8_t Rtc::m_CenturyIndex
private

Definition at line 192 of file Rtc.h.

◆ m_CmosLock

Mutex Rtc::m_CmosLock
private

Serialises the CMOS index/data register pair across processors.

Definition at line 250 of file Rtc.h.

Referenced by irq(), readHardwareClock(), setPeriodicInterruptEnabled(), waitForUpdateCompletion(), and write().

◆ m_DayOfMonth

uint8_t Rtc::m_DayOfMonth
private

The current day of month

Definition at line 199 of file Rtc.h.

Referenced by getDayOfMonth(), getDayOfWeek(), and readHardwareClock().

◆ m_DeadlineMode

Atomic<size_t> Rtc::m_DeadlineMode
private

Definition at line 240 of file Rtc.h.

◆ m_DeadlinePending

Atomic<size_t> Rtc::m_DeadlinePending
private

Definition at line 238 of file Rtc.h.

◆ m_DeadlineScheduler

PerProcessorScheduler* Rtc::m_DeadlineScheduler
private

Definition at line 234 of file Rtc.h.

◆ m_DeadlineWaiters

WaitQueue Rtc::m_DeadlineWaiters
private

Definition at line 236 of file Rtc.h.

◆ m_DeadlineWake

SchedulerWorkerWake Rtc::m_DeadlineWake
private

Definition at line 237 of file Rtc.h.

◆ m_DeadlineWorker

OwnedThread Rtc::m_DeadlineWorker
private

Definition at line 235 of file Rtc.h.

◆ m_HandlerRegistry

TimerHandlerRegistry Rtc::m_HandlerRegistry
private

Timer handlers and their callback lifetime state.

Definition at line 232 of file Rtc.h.

Referenced by armHandler(), initialise1(), processElapsedTime(), and uninitialise().

◆ m_Hour

uint8_t Rtc::m_Hour
private

The current hour

Definition at line 201 of file Rtc.h.

Referenced by getHour(), and readHardwareClock().

◆ m_Instance

Rtc Rtc::m_Instance
staticprivate

The Rtc class instance

Definition at line 229 of file Rtc.h.

Referenced by readCmos().

◆ m_IoPort

IoPort Rtc::m_IoPort
private

The CMOS/Real-time Clock I/O port range

Definition at line 184 of file Rtc.h.

Referenced by initialise1(), setIndexLocked(), uninitialise(), and waitForUpdateCompletion().

◆ m_IrqId

irq_id_t Rtc::m_IrqId
private

The IRQ Identifier

Definition at line 187 of file Rtc.h.

Referenced by initialise1(), initialise3(), and uninitialise().

◆ m_Lock

Spinlock Rtc::m_Lock
private

Protects the alarm queue and the dispatch-ownership transition.

Definition at line 247 of file Rtc.h.

Referenced by addAlarm(), armHandler(), drainRemoteAlarmDispatch(), initialise3(), processElapsedTime(), removeAlarm(), removeAlarm(), and uninitialise().

◆ m_Minute

uint8_t Rtc::m_Minute
private

The current minute

Definition at line 203 of file Rtc.h.

Referenced by getMinute(), and readHardwareClock().

◆ m_MonotonicTicks

PcTscClock::MonotonicPublication Rtc::m_MonotonicTicks
private

Cross-processor monotonic floor, published without a retry loop.

Definition at line 259 of file Rtc.h.

Referenced by getTickCountNano(), initialise2(), and initialiseProcessorClock().

◆ m_Month

uint8_t Rtc::m_Month
private

The current month

Definition at line 197 of file Rtc.h.

Referenced by getDayOfWeek(), getMonth(), and readHardwareClock().

◆ m_Nanosecond

uint64_t Rtc::m_Nanosecond
private

The current nanosecond

Definition at line 207 of file Rtc.h.

Referenced by getNanosecond(), and processElapsedTime().

◆ m_PeriodicIrqInfoIndex

size_t Rtc::m_PeriodicIrqInfoIndex
private

Index into the periodicIrqInfo table

Definition at line 190 of file Rtc.h.

Referenced by initialise1(), initialise2(), and initialise3().

◆ m_ProcessedTickCount

uint64_t Rtc::m_ProcessedTickCount
private

Worker cursor used to aggregate delayed periodic delivery.

Definition at line 213 of file Rtc.h.

Referenced by initialise2(), initialise3(), and processElapsedTime().

◆ m_Second

uint8_t Rtc::m_Second
private

The current second

Definition at line 205 of file Rtc.h.

Referenced by getSecond(), and readHardwareClock().

◆ m_StopDeadlineWorker

Atomic<size_t> Rtc::m_StopDeadlineWorker
private

Definition at line 239 of file Rtc.h.

◆ m_TickCount

Atomic<uint64_t> Rtc::m_TickCount
private

Latest elapsed-time cursor published by the IRQ8 worker.

Definition at line 210 of file Rtc.h.

Referenced by getTickCountNano(), initialise2(), initialise3(), and initialiseProcessorClock().

◆ m_Tsc0

uint64_t Rtc::m_Tsc0
private

Bootstrap fallback before a per-processor anchor is available.

Definition at line 256 of file Rtc.h.

Referenced by getTickCountNano(), initialise2(), and sampleCpuTime().

◆ m_TscCalibration

PcTscClock::Calibration Rtc::m_TscCalibration
private

Exact RTC-calibrated conversion from TSC cycles to nanoseconds.

Definition at line 253 of file Rtc.h.

Referenced by getTickCountNano(), initialise2(), and sampleCpuTime().

◆ m_Year

size_t Rtc::m_Year
private

The current year

Definition at line 195 of file Rtc.h.

Referenced by getDayOfWeek(), getYear(), and readHardwareClock().

◆ periodicIrqInfo

Rtc::periodicIrqInfo_t Rtc::periodicIrqInfo
staticprivate
Initial value:
= {
{4, 0x0e, {250000000ULL, 250000000ULL}}, {8, 0x0d, {125000000ULL, 125000000ULL}},
{16, 0x0c, {62500000ULL, 62500000ULL}}, {32, 0x0b, {31250000ULL, 31250000ULL}},
{64, 0x0a, {15625000ULL, 15625000ULL}}, {128, 0x09, {7812500ULL, 7812500ULL}},
{256, 0x08, {3906250ULL, 3906250ULL}}, {512, 0x07, {1953125ULL, 1953125ULL}},
{1024, 0x06, {976562ULL, 976563ULL}}, {2048, 0x05, {488281ULL, 488281ULL}},
{4096, 0x04, {244140ULL, 244141ULL}}, {8192, 0x03, {122070ULL, 122070ULL}},
}

Information about the RTC's periodic irq

Definition at line 147 of file Rtc.h.

Referenced by initialise1(), initialise2(), and initialise3().


The documentation for this class was generated from the following files: