-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Open
Description
The machine.RTC documentation has some discrepancies.
The ESP8266 machine.RTC modules doesn't appear to have an init function, but rather has a datetime function.
micropython/ports/esp8266/machine_rtc.c
Line 127 in 8db5d2d
STATIC mp_obj_t pyb_rtc_datetime(size_t n_args, const mp_obj_t *args) { |
The order of the arguments to datetime appears to be (year, month, day, wday, hour, minute, seconds, milliseconds)
The ESP32 machine.RTC module
micropython/ports/esp32/machine_rtc.c
Line 87 in 8db5d2d
STATIC mp_obj_t machine_rtc_datetime_helper(mp_uint_t n_args, const mp_obj_t *args) { |
has an init function and a datetime function. The order of the arguments for datetime and init appears to be (year, month, day, hour, minute, seconds, microseconds)
The stm32 machine.RTC module forwards to pyb.RTC
Line 515 in 8db5d2d
mp_obj_t pyb_rtc_datetime(size_t n_args, const mp_obj_t *args) { |
which has an init function and datetime function, but the init function doesn't take any srguments. The datetime function appears to use the order (year, month, day, wday, hour, month, seconds, microseconds)
The documentation documents an init function with arguments in a different order to any of the above and doesnt't mention a datetime function.
And the EPS8266 appears to take milliseconds as the last argument, whereas the others take microseconds.
Metadata
Metadata
Assignees
Labels
No labels