Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include/drivers: Add RTC support #52618

Commits on Apr 3, 2023

  1. include/drivers: Add RTC API header and handlers

    This commit adds the rtc.h header file which contains
    API functions for real-time-clocks, which are low power
    devices which track and represent broken-down time.
    
    It also changes one line of doxygen documentation in the
    maxim_ds3132.h file to place it in its own group.
    
    The handlers for use of the API from userspace is also
    added with this commit.
    
    The API is split into one mandatory section, setting and
    getting time, and three optional sections, alarms, update
    event callback, and clock calibration.
    
    Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
    Bjarki Arge Andreasen committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    c4f0349 View commit details
    Browse the repository at this point in the history
  2. tests/drivers/rtc: Add unit tests for RTC devices

    This test suite adds tests for the following:
    
    - Setting and getting time
    - Validating time is incrementing correctly
    - Validating behavior of alarms with callback disabled
    - Validating behavior of alarms with callback enabled
    - Validating update callback
    
    The test suite uses the devicetree  alias rtc to find
    the device to test.
    
    Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
    Bjarki Arge Andreasen committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    ae7bda8 View commit details
    Browse the repository at this point in the history
  3. boards/posix/native_posix: Add emulated RTC device driver

    The emulated RTC device driver is used to emulate a real
    RTC device. Note that it is not a replacement for the
    native_rtc module, which is used to control simulated time,
    get time from the host system, etc.
    
    Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
    Bjarki Arge Andreasen committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    4e3a8ed View commit details
    Browse the repository at this point in the history
  4. MAINTAINERS.yml: Add Drivers: RTC: entry

    Added initial maintainers entry for RTC. Will be
    expanded with collaborators before merged.
    
    Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
    Bjarki Arge Andreasen committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    db2e4fb View commit details
    Browse the repository at this point in the history
  5. tests/drivers/rtc: Add rtc_api_helpers test suite

    This test suite validates the RTC API helper
    functions, like currently, and exclusively, the
    rtc_time_to_tm() helper function.
    
    It also validates that the struct rtc_time is
    member to member compatible with the struct tm
    from the tm_sec to and including the tm_isdts
    member.
    
    Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
    Bjarki Arge Andreasen committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    221558c View commit details
    Browse the repository at this point in the history