blob: 716c65ba4c9b6863be44a815272cb00977cef46e [file] [log] [blame] [edit]
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:rp2": [
"//src/rp2_common/hardware_timer:hardware_timer_headers",
],
"//bazel/constraint:host": [
"//src/host/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:rp2": [
"//src/rp2_common/hardware_timer",
],
"//bazel/constraint:host": [
"//src/host/hardware_timer",
],
}),
)