docs: Fix the quickref documentation of rtc.datetime().
Such that it matches the implementation and the documentation of the `machine.RTC` class. Signed-off-by: robert-hh <robert@hammelrath.com>
This commit is contained in:
@@ -577,7 +577,9 @@ See :ref:`machine.RTC <machine.RTC>` ::
|
|||||||
from machine import RTC
|
from machine import RTC
|
||||||
|
|
||||||
rtc = RTC()
|
rtc = RTC()
|
||||||
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
|
rtc.datetime((2017, 8, 23, 0, 1, 12, 48, 0)) # set a specific date and
|
||||||
|
# time, eg. 2017/8/23 1:12:48
|
||||||
|
# the day-of-week value is ignored
|
||||||
rtc.datetime() # get date and time
|
rtc.datetime() # get date and time
|
||||||
|
|
||||||
WDT (Watchdog timer)
|
WDT (Watchdog timer)
|
||||||
|
|||||||
@@ -284,7 +284,9 @@ See :ref:`machine.RTC <machine.RTC>` ::
|
|||||||
from machine import RTC
|
from machine import RTC
|
||||||
|
|
||||||
rtc = RTC()
|
rtc = RTC()
|
||||||
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
|
rtc.datetime((2017, 8, 23, 0, 1, 12, 48, 0)) # set a specific date and
|
||||||
|
# time, eg. 2017/8/23 1:12:48
|
||||||
|
# the day-of-week value is ignored
|
||||||
rtc.datetime() # get date and time
|
rtc.datetime() # get date and time
|
||||||
|
|
||||||
# synchronize with ntp
|
# synchronize with ntp
|
||||||
|
|||||||
@@ -429,7 +429,9 @@ See :ref:`machine.RTC <machine.RTC>`::
|
|||||||
from machine import RTC
|
from machine import RTC
|
||||||
|
|
||||||
rtc = RTC()
|
rtc = RTC()
|
||||||
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
|
rtc.datetime((2017, 8, 23, 0, 1, 12, 48, 0)) # set a specific date and
|
||||||
|
# time, eg. 2017/8/23 1:12:48
|
||||||
|
# the day-of-week value is ignored
|
||||||
rtc.datetime() # get date and time
|
rtc.datetime() # get date and time
|
||||||
rtc.now() # return date and time in CPython format.
|
rtc.now() # return date and time in CPython format.
|
||||||
|
|
||||||
|
|||||||
@@ -138,7 +138,9 @@ See :ref:`pyb.RTC <pyb.RTC>` ::
|
|||||||
from pyb import RTC
|
from pyb import RTC
|
||||||
|
|
||||||
rtc = RTC()
|
rtc = RTC()
|
||||||
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
|
rtc.datetime((2017, 8, 23, 0, 1, 12, 48, 0)) # set a specific date and
|
||||||
|
# time, eg. 2017/8/23 1:12:48
|
||||||
|
# the day-of-week value is ignored
|
||||||
rtc.datetime() # get date and time
|
rtc.datetime() # get date and time
|
||||||
|
|
||||||
PWM (pulse width modulation)
|
PWM (pulse width modulation)
|
||||||
|
|||||||
@@ -206,8 +206,9 @@ See :ref:`machine.RTC <machine.RTC>` ::
|
|||||||
from machine import RTC
|
from machine import RTC
|
||||||
|
|
||||||
rtc = RTC()
|
rtc = RTC()
|
||||||
rtc.datetime((2017, 8, 23, 1, 12, 48, 0, 0)) # set a specific date and time
|
rtc.datetime((2017, 8, 23, 0, 1, 12, 48, 0)) # set a specific date and
|
||||||
# time, eg 2017/8/23 1:12:48
|
# time, eg. 2017/8/23 1:12:48
|
||||||
|
# the day-of-week value is ignored
|
||||||
rtc.datetime() # get date and time
|
rtc.datetime() # get date and time
|
||||||
|
|
||||||
Following functions are not supported at the present::
|
Following functions are not supported at the present::
|
||||||
|
|||||||
@@ -310,8 +310,9 @@ See :ref:`machine.RTC <machine.RTC>` ::
|
|||||||
from machine import RTC
|
from machine import RTC
|
||||||
|
|
||||||
rtc = RTC()
|
rtc = RTC()
|
||||||
rtc.datetime((2017, 8, 23, 2, 12, 48, 0, 0)) # set a specific date and
|
rtc.datetime((2017, 8, 23, 0, 1, 12, 48, 0)) # set a specific date and
|
||||||
# time, eg. 2017/8/23 1:12:48
|
# time, eg. 2017/8/23 1:12:48
|
||||||
|
# the day-of-week value is ignored
|
||||||
rtc.datetime() # get date and time
|
rtc.datetime() # get date and time
|
||||||
|
|
||||||
WDT (Watchdog timer)
|
WDT (Watchdog timer)
|
||||||
|
|||||||
Reference in New Issue
Block a user