Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes

BasicRtc Class Reference

HostRtc generic code. More...

#include <rtc.h>

Inheritance diagram for BasicRtc:
HostRtc

List of all members.

Public Member Functions

void rtc_sync (Clock *clock)
timevalue rtc_wallclock ()
 Return seconds*FREQUENCY since epoch.
 BasicRtc (DBus< MessageIOIn > &bus_hwioin, DBus< MessageIOOut > &bus_hwioout, unsigned iobase)

Protected Types

enum  { MS_TIMEOUT = 2000 }

Protected Member Functions

unsigned char rtc_read (unsigned index)

Protected Attributes

unsigned _iobase

Detailed Description

HostRtc generic code.

Copyright (C) 2009, Bernhard Kauer <bk@vmmon.org> Economic rights: Technische Universitaet Dresden (Germany)

This file is part of Vancouver.

Vancouver is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Vancouver is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 2 for more details.


Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
MS_TIMEOUT 

Constructor & Destructor Documentation

BasicRtc::BasicRtc ( DBus< MessageIOIn > &  bus_hwioin,
DBus< MessageIOOut > &  bus_hwioout,
unsigned  iobase 
) [inline]

Member Function Documentation

unsigned char BasicRtc::rtc_read ( unsigned  index  )  [inline, protected]
void BasicRtc::rtc_sync ( Clock clock  )  [inline]

We wait for an update to happen to get a more accurate timing.

Instead of triggering on the UIP flag, which is typically enabled for less than 2ms, we wait on the Update-Ended-Flag which is set on the falling edge of the UIP flag and sticky until read out.

timevalue BasicRtc::rtc_wallclock (  )  [inline]

Return seconds*FREQUENCY since epoch.


Member Data Documentation

unsigned BasicRtc::_iobase [protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines