summaryrefslogtreecommitdiff
path: root/shared-bindings/rtc/__init__.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared-bindings/rtc/__init__.c')
-rw-r--r--shared-bindings/rtc/__init__.c42
1 files changed, 15 insertions, 27 deletions
diff --git a/shared-bindings/rtc/__init__.c b/shared-bindings/rtc/__init__.c
index 22eda9b66..b204d511c 100644
--- a/shared-bindings/rtc/__init__.c
+++ b/shared-bindings/rtc/__init__.c
@@ -31,23 +31,11 @@
#include "shared-bindings/rtc/RTC.h"
#include "shared-bindings/time/__init__.h"
-//| :mod:`rtc` --- Real Time Clock
-//| ========================================================
-//|
-//| .. module:: rtc
-//| :synopsis: Real Time Clock
-//| :platform: SAMD21, SAMD51, nRF52
+//| """Real Time Clock
//|
//| The `rtc` module provides support for a Real Time Clock. You can access and manage the
//| RTC using :class:`rtc.RTC`. It also backs the :func:`time.time` and :func:`time.localtime`
-//| functions using the onboard RTC if present.
-//|
-//| Classes
-//|
-//| .. toctree::
-//| :maxdepth: 3
-//|
-//| RTC
+//| functions using the onboard RTC if present."""
//|
void rtc_reset(void) {
@@ -62,22 +50,22 @@ mp_obj_t rtc_get_time_source_time(void) {
return struct_time_from_tm(&tm);
}
-//| .. function:: set_time_source(rtc)
-//|
-//| Sets the RTC time source used by :func:`time.localtime`.
-//| The default is :class:`rtc.RTC`, but it's useful to use this to override the
-//| time source for testing purposes. For example::
+//| def set_time_source(rtc: Any) -> Any:
+//| """Sets the RTC time source used by :func:`time.localtime`.
+//| The default is :class:`rtc.RTC`, but it's useful to use this to override the
+//| time source for testing purposes. For example::
//|
-//| import rtc
-//| import time
+//| import rtc
+//| import time
//|
-//| class RTC(object):
-//| @property
-//| def datetime(self):
-//| return time.struct_time((2018, 3, 17, 21, 1, 47, 0, 0, 0))
+//| class RTC(object):
+//| @property
+//| def datetime(self):
+//| return time.struct_time((2018, 3, 17, 21, 1, 47, 0, 0, 0))
//|
-//| r = RTC()
-//| rtc.set_time_source(r)
+//| r = RTC()
+//| rtc.set_time_source(r)"""
+//| ...
//|
STATIC mp_obj_t rtc_set_time_source(mp_obj_t time_source) {
MP_STATE_VM(rtc_time_source) = time_source;