RTCs support a variety of combinations of alarm time fields, set by the alarm time mask. Until now, alarm tests have selected only the minute and hour fields, as these are always supported, but some RTCs require setting every supported field when setting the alarm time, while other RTCs don't support setting every field. To support all RTCs in the test suite, a configuration has been added which makes the alarm time mask configurable. Boards can now define the specific alarm time mask they want to test within their boards .conf files. Additionally, the alarm tests have been refactored to not depend on the time.h library to determine the struct rtc_time times to set as these are constant, so they are now provided as const structs instead. Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
17 lines
319 B
Plaintext
17 lines
319 B
Plaintext
# Copyright (c) 2024 Bjarki Arge Andreasen
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
source "Kconfig.zephyr"
|
|
|
|
if RTC_ALARM
|
|
|
|
config TEST_RTC_ALARM_TIME_MASK
|
|
int "Alarm fields to set"
|
|
default 6
|
|
range 1 511
|
|
help
|
|
Set the RTC_ALARM_TIME_MASK_ bitmask to use when setting
|
|
RTC alarms during testing.
|
|
|
|
endif # RTC_ALARM
|