33 #ifndef __DEV_MC146818_HH__
34 #define __DEV_MC146818_HH__
46 warn(
"No RTC event handler defined.\n");
116 void setTime(
const struct tm time);
134 static inline
bool rega_dv_disabled(const RtcRegA &
reg);
155 bool bcd,
Tick frequency);
165 uint8_t
readData(const uint8_t addr);
185 #endif // __DEV_MC146818_HH__
uint8_t readData(const uint8_t addr)
RTC read data.
Real-Time Clock (MC146818)
void writeData(const uint8_t addr, const uint8_t data)
RTC write data.
Bitfield< 4 > uie
1 = enable alarm interrupt
const char * description() const
Event description.
void serialize(const std::string &base, CheckpointOut &cp) const
Serialize this object to the given output stream.
BitUnion8(RtcRegA) Bitfield< 7 > uip
Bitfield< 2 > dm
1 = output sqare wave at SQW pin
Bitfield< 5 > aie
1 = enable periodic clock interrupt
Bitfield< 6 > pie
stop clock updates
RtcRegB stat_regB
RTC status register B.
Bitfield< 0 > dse
0 = 12 hours, 1 = 24 hours
RTCEvent(MC146818 *_parent, Tick i)
RTCEvent event
RTC periodic interrupt event.
virtual void process()
Event process to occur at interrupt.
const std::string & name() const
RTCTickEvent tickEvent
RTC tick event.
uint64_t Tick
Tick count type.
void scheduleIntr()
Schedule the RTC periodic interrupt.
Event for RTC periodic interrupt.
Bitfield< 3, 0 > rs
Divider configuration.
virtual void handleEvent()
void setTime(const struct tm time)
virtual const char * description() const
Event description.
RTCTickEvent(MC146818 *_parent)
Event for RTC periodic interrupt.
std::ostream CheckpointOut
virtual void startup()
Start ticking.
void unserialize(const std::string &base, CheckpointIn &cp)
Reconstruct the state of this object from a checkpoint.
Bitfield< 3 > sqwe
1 = enable update-ended interrupt
Bitfield< 6, 4 > dv
1 = date and time update in progress
void process()
Event process to occur at interrupt.
Bitfield< 1 > format24h
0 = BCD, 1 = Binary coded time
EndBitUnion(RtcRegA) static inline bool rega_dv_disabled(const RtcRegA ®)
Is the DV field in regA set to disabled?