NOVA User-Level Environment
Version testbox/changed-memory-timing-317-g320d8b5
|
Device model for the MC146818 realtime clock. More...
Public Member Functions | |
void | reset (MessageTime &time) |
bool | receive (MessageIOIn &msg) |
bool | receive (MessageIOOut &msg) |
bool | receive (MessageIrqNotify &msg) |
bool | receive (MessageTimeout &msg) |
Rtc146818 (DBus< MessageTimer > &bus_timer, DBus< MessageIrqLines > &bus_irqlines, Clock *clock, unsigned timer, unsigned short iobase, unsigned irq) | |
Public Member Functions inherited from StaticReceiver< Rtc146818 > | |
StaticReceiver () | |
Public Member Functions inherited from Device | |
void | debug_dump () |
Device (const char *debug_name) |
Private Types | |
enum | { FREQ = 32768, tBUC = 8, tUC = 65 } |
Timing: More... |
Private Member Functions | |
unsigned char | convert_bcd (unsigned char value) |
unsigned char | ram (unsigned char index) |
Read values from RAM and convert time information from BCD and 12h format. | |
int | get_divider () |
timevalue | get_counter () |
unsigned | get_periodic_tics () |
void | set_irqflags (unsigned char value) |
Set the IRQ flags and raise an IRQ if needed. | |
timevalue | get_ram_time () |
Return the time from the RAM locations. | |
void | update_ram (timevalue seconds) |
Update the time with the given seconds. | |
timevalue | next_alarm (timevalue seconds) |
Returns the time of the next alarm in seconds. | |
unsigned | update_cycle (timevalue now) |
Performs an update cycle and updates the time in the RAM. | |
void | update_timer (timevalue last_seconds, timevalue now) |
Reprogram the next timer. |
Private Attributes | |
DBus< MessageTimer > & | _bus_timer |
DBus< MessageIrqLines > & | _bus_irqlines |
Clock * | _clock |
unsigned | _timer |
unsigned short | _iobase |
unsigned | _irq |
unsigned char | _index |
unsigned char | _ram [128] |
timevalue | _offset |
timevalue | _last |
Friends | |
class | RtcTest |
Additional Inherited Members | |
Static Public Member Functions inherited from StaticReceiver< Rtc146818 > | |
static bool | receive_static (Device *o, M &msg) |
Device model for the MC146818 realtime clock.
State: testing Features: 128byte RAM, gettime, updatetime, UIE, alarm, periodic-irqs, divider Missing: daylight-saving Unused: sqw-output Documentation: rtc82885.pdf, MC146818AS.pdf, Intel ICH{3-7} documentation
|
private |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Return the time from the RAM locations.
Returns the time of the next alarm in seconds.
|
inlineprivate |
Read values from RAM and convert time information from BCD and 12h format.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
Set the IRQ flags and raise an IRQ if needed.
|
inlineprivate |
Performs an update cycle and updates the time in the RAM.
|
inlineprivate |
Update the time with the given seconds.
Reprogram the next timer.
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |