-
Notifications
You must be signed in to change notification settings - Fork 7.4k
RTC API refine documentation and test coverage #56584
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
RTC API refine documentation and test coverage #56584
Conversation
1aaad4f
to
dfcf5bd
Compare
doc/releases/release-notes-3.4.rst
Outdated
functions :c:func:`rtc_set_time` and :c:func:`rtc_get_time`, the optional functions | ||
:c:func:`rtc_alarm_get_supported_fields`, :c:func:`rtc_alarm_set_time`, | ||
:c:func:`rtc_alarm_get_time`, :c:func:`rtc_alarm_is_pending` and | ||
:c:func:`rtc_alarm_set_callback` enabled by :kconfig:option:`CONFIG_RTC_ALARM`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:c:func:`rtc_alarm_set_callback` enabled by :kconfig:option:`CONFIG_RTC_ALARM`, | |
:c:func:`rtc_alarm_set_callback` are enabled with :kconfig:option:`CONFIG_RTC_ALARM`, |
doc/releases/release-notes-3.4.rst
Outdated
:c:func:`rtc_alarm_get_supported_fields`, :c:func:`rtc_alarm_set_time`, | ||
:c:func:`rtc_alarm_get_time`, :c:func:`rtc_alarm_is_pending` and | ||
:c:func:`rtc_alarm_set_callback` enabled by :kconfig:option:`CONFIG_RTC_ALARM`, | ||
theoptional function :c:func:`rtc_update_set_callback` enabled by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
theoptional function :c:func:`rtc_update_set_callback` enabled by | |
the optional function :c:func:`rtc_update_set_callback` is enabled with |
doc/releases/release-notes-3.4.rst
Outdated
:c:func:`rtc_alarm_set_callback` enabled by :kconfig:option:`CONFIG_RTC_ALARM`, | ||
theoptional function :c:func:`rtc_update_set_callback` enabled by | ||
:kconfig:option:`CONFIG_RTC_UPDATE` and lastly the optional functions | ||
:c:func:`rtc_set_calibration` and :c:func:`rtc_get_calibration` enabled by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:c:func:`rtc_set_calibration` and :c:func:`rtc_get_calibration` enabled by | |
:c:func:`rtc_set_calibration` and :c:func:`rtc_get_calibration` are enabled with |
dts/bindings/rtc/rtc-device.yaml
Outdated
@@ -8,6 +8,6 @@ description: RTC device common bindings | |||
properties: | |||
alarms-count: | |||
type: int | |||
required: true | |||
default: 0 | |||
description: | | |||
Number of alarms supported by RTC device |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a description for a default, something like "Default of 0 to indicate that unless set otherwise, the RTC has no alarms"
dfcf5bd
to
a0a3c2c
Compare
a0a3c2c
to
454de00
Compare
doc/hardware/peripherals/rtc.rst
Outdated
$ west build -p -b <your board> zephyr/tests/drivers/rtc/rtc_api/ | ||
west build -p -b <your board> zephyr/tests/drivers/rtc/rtc_api/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be using zephyr-app-commands::
here.
doc/hardware/peripherals/rtc.rst
Outdated
$ west build -p -b <your board> -t menuconfig zephyr/tests/drivers/rtc/rtc_api/ | ||
west build -p -b <your board> -t menuconfig zephyr/tests/drivers/rtc/rtc_api/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
doc/hardware/peripherals/rtc.rst
Outdated
$ west build | ||
west build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too.
Fixed spelling mistakes, added links in place of highlighted text where appropriate and switched unformatted blocks with bash commands to bash code blocks. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
Added entry for new RTC API in new APIs section of release notes. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
Hid type definitions of API functions from documentation using INTERNAL_HIDDEN condition. Changed nested groups inside rtc_interface group to use @name instead. Use @anchor to reference definitions for RTC_ALARM_TIME_MASK. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
The test suite was limited to the native_posix board, now it is built and run for any board supported by CI. The native_posix yaml files for both 32 and 64 bit boards have been expanded to support rtc, allowing CI to build and test the rtc_api test suite against the native_posix and native_posix_64 boards. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
This commit makes the alarms-count dts property of the rtc-device.yaml optional, setting the default to 0. This simplifies the dts rtc dts node by not requiring the property to be set to 0 if it is not supported. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
454de00
to
c4098f2
Compare
This PR is based on the remaining comments from @nordicjm on this PR #52618
The PR performs the following