1package(default_visibility = ["//visibility:public"]) 2 3_DEFINES = [ 4 "PICO_HARDWARE_TIMER_RESOLUTION_US=1000", 5 # TODO: This seems to be the default, make configurable eventually. 6 "PICO_TIME_DEFAULT_ALARM_POOL_DISABLED=1", 7] 8 9# This exists to break a dependency cycle between 10# this library and //src/common/pico_time. 11# Application code should always use :hardware_timer instead. 12cc_library( 13 name = "hardware_timer_headers", 14 hdrs = ["include/hardware/timer.h"], 15 defines = _DEFINES, 16 includes = ["include"], 17 target_compatible_with = ["//bazel/constraint:host"], 18 visibility = [ 19 "//src/common/pico_time:__pkg__", 20 "//src/host/pico_platform:__pkg__", 21 ], 22 deps = ["//src/common/pico_base_headers"], 23) 24 25cc_library( 26 name = "hardware_timer", 27 srcs = ["timer.c"], 28 hdrs = ["include/hardware/timer.h"], 29 defines = _DEFINES, 30 includes = ["include"], 31 target_compatible_with = ["//bazel/constraint:host"], 32 deps = ["//src/host/pico_platform"], 33) 34