genode/repos/os/src/drivers/rtc/rtc.h
Josef Söntgen 47e6d72bf2 rtc_drv: add support for setting RTC
The rtc_drv on x86 can now by used to also set the RTC. If the config
attribute 'allow_setting_rtc' is set to 'yes' the driver will update
the RTC from the content of the 'set-rtc' ROM module. A valid ROM must
contain a top node with the following attributes: 'year', 'month',
'day', 'hour', 'minute' and 'second'.

* Only rudimentary checking of the provided values is done.
* '12H' mode is not supported.

Fixes #3438.
2019-08-13 12:02:03 +02:00

29 lines
598 B
C++

/*
* \brief RTC driver interface
* \author Christian Helmuth
* \date 2015-01-06
*/
/*
* Copyright (C) 2015-2019 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _DRIVERS__RTC__SPEC__X86__RTC_H_
#define _DRIVERS__RTC__SPEC__X86__RTC_H_
#include <base/env.h>
#include <rtc_session/rtc_session.h>
namespace Rtc {
using namespace Genode;
Timestamp get_time(Env &env);
void set_time(Env &env, Timestamp ts);
}
#endif /* _DRIVERS__RTC__SPEC__X86__RTC_H_ */