blob: b429dc5a61f9ac06bf1505eec546198521f76d42 [file] [log] [blame]
package(default_visibility = ["//visibility:public"])
# This exists to break a dependency cycle between
# this library and //src/common/pico_sync.
# Application code should always use :pico_time instead.
cc_library(
name = "pico_time_headers",
hdrs = [
"include/pico/time.h",
"include/pico/timeout_helper.h",
],
includes = ["include"],
visibility = [
"//src/common/pico_sync:__pkg__",
"//src/rp2_common/tinyusb:__pkg__",
],
deps = select({
"//bazel/constraint:host": [
"//src/host/hardware_timer:hardware_timer_headers",
],
"//conditions:default": [
"//src/rp2_common/hardware_timer:hardware_timer_headers",
],
}),
)
cc_library(
name = "pico_time",
srcs = [
"time.c",
"timeout_helper.c",
],
hdrs = [
"include/pico/time.h",
"include/pico/timeout_helper.h",
],
includes = ["include"],
deps = [
"//src/common/pico_base:pico_base_interface",
"//src/common/pico_sync",
"//src/common/pico_util",
] + select({
"//bazel/constraint:host": [
"//src/host/hardware_timer",
],
"//conditions:default": [
"//src/rp2_common/hardware_timer",
],
}),
)