Skip to content

machine.RTC.init documentation is incorrect #5733

@dhylands

Description

@dhylands

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.

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

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

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy