RTC.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * RTC.h
8  *
9  ****/
10 
16 #pragma once
17 
18 #include <cstdint>
19 
24 class RtcClass
25 {
26 public:
30 
34  uint64_t getRtcNanoseconds();
35 
40  uint32_t getRtcSeconds();
41 
46  bool setRtcNanoseconds(uint64_t nanoseconds);
47 
53  bool setRtcSeconds(uint32_t seconds);
54 };
55 
63 extern RtcClass RTC;
64 
Definition: RTC.h:25
uint32_t getRtcSeconds()
Get seconds from RTC.
RtcClass()
Instantiate real time clock object.
bool setRtcNanoseconds(uint64_t nanoseconds)
Set RTC nanoseconds.
uint64_t getRtcNanoseconds()
Get nanoseconds from RTC.
bool setRtcSeconds(uint32_t seconds)
Set RTC.
RtcClass RTC
Global instance of real time clock object.