Peter Harper 7dfbb3c958
Add a delay after rtc_set_datetime (#2156)
If you call rtc_get_datetime immediately after rtc_set_datetime you get
junk back. According to the datasheet "Writing to the RTC will take
2 clk_rtc clock periods to arrive". So add a delay after calling
rtc_set_datetime in aon_timer_set_time_calendar.

Fixes #2148
2025-02-06 09:24:30 -06:00

28 lines
868 B
Python

load("//bazel:defs.bzl", "compatible_with_rp2")
load("//bazel/util:transition.bzl", "extra_copts_for_all_deps")
package(default_visibility = ["//visibility:public"])
cc_binary(
name = "pico_time_test_actual",
testonly = True,
srcs = ["pico_time_test.c"],
tags = ["manual"], # Built via pico_time_test.
# Doesn't appear to work on host builds yet.
target_compatible_with = compatible_with_rp2(),
deps = [
"//src/rp2_common/pico_stdlib",
"//src/rp2_common/pico_aon_timer",
"//test/pico_test",
],
)
extra_copts_for_all_deps(
name = "pico_time_test",
testonly = True,
src = ":pico_time_test_actual",
extra_copts = ["-DPICO_TIME_DEFAULT_ALARM_POOL_MAX_TIMERS=250"],
# Host doesn't support PICO_TIME_NO_ALARM_SUPPORT without pico_host_sdl.
target_compatible_with = compatible_with_rp2(),
)