pico-sdk/src/host/hardware_timer/BUILD.bazel
armandomontanez 07d6dc1315
[Bazel] Fix bazel build, add presubmit (#1973)
* [Bazel] Fix bazel build, add presubmit

* Fixes a missing dep in the Bazel build breaking the host build.
* Automagically finds all board headers.
* Improves presubmit script polish for GH Action readiness.
* Adds a GitHub action workflow for the Bazel build.
* Disable failing checks
* Disables Windows, as there's a mix of real build errors and
  overly-ambitious checks that don't work on Windows.
* Disables extra checks temporarily since it's currently failing.
2024-10-12 17:41:43 -05:00

33 lines
1,012 B
Text

package(default_visibility = ["//visibility:public"])
_DEFINES = [
"PICO_HARDWARE_TIMER_RESOLUTION_US=1000",
# TODO: This seems to be the default, make configurable eventually.
"PICO_TIME_DEFAULT_ALARM_POOL_DISABLED=1",
]
# 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"],
defines = _DEFINES,
includes = ["include"],
target_compatible_with = ["//bazel/constraint:host"],
visibility = [
"//src/common/pico_time:__pkg__",
"//src/host/pico_platform:__pkg__",
],
deps = ["//src/common/pico_base_headers"],
)
cc_library(
name = "hardware_timer",
srcs = ["timer.c"],
hdrs = ["include/hardware/timer.h"],
defines = _DEFINES,
includes = ["include"],
target_compatible_with = ["//bazel/constraint:host"],
deps = ["//src/host/pico_platform"],
)