blob: 1b76b7785d80b7488c927abdaf69967d2172c66b [file] [log] [blame]
load("//bazel:defs.bzl", "compatible_with_rp2")
package(default_visibility = ["//visibility:public"])
# This exists to break a dependency cycle between
# this library and //src/common/pico_time.
# Application code should always use :hardware_timer instead.
cc_library(
name = "hardware_timer_headers",
hdrs = ["include/hardware/timer.h"],
includes = ["include"],
target_compatible_with = compatible_with_rp2(),
visibility = ["//src/common/pico_time:__pkg__"],
deps = [
"//src/common/pico_base:pico_base_interface",
"//src/rp2_common/pico_platform:hardware_structs",
],
)
cc_library(
name = "hardware_timer",
srcs = ["timer.c"],
hdrs = ["include/hardware/timer.h"],
includes = ["include"],
target_compatible_with = compatible_with_rp2(),
deps = [
"//src/common/pico_base:pico_base_interface",
"//src/rp2_common/hardware_claim",
"//src/rp2_common/hardware_irq",
"//src/rp2_common/hardware_sync",
"//src/rp2_common/pico_platform:hardware_structs",
],
)