| 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 = select({ |
| "//bazel/constraint:rp2": [], |
| "//conditions:default": ["@platforms//:incompatible"], |
| }), |
| 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 = select({ |
| "//bazel/constraint:rp2": [], |
| "//conditions:default": ["@platforms//:incompatible"], |
| }), |
| 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", |
| ], |
| ) |