1# Copyright 2024 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15load("@rules_python//sphinxdocs:sphinx_docs_library.bzl", "sphinx_docs_library") 16load("//pw_build:compatibility.bzl", "incompatible_with_mcu") 17load("//pw_build:pw_cc_binary.bzl", "pw_cc_binary") 18load("//pw_unit_test:pw_cc_test.bzl", "pw_cc_test") 19 20package( 21 default_visibility = ["//visibility:public"], 22 features = ["-layering_check"], 23) 24 25licenses(["notice"]) 26 27pw_cc_test( 28 name = "basic", 29 srcs = ["basic.cc"], 30 deps = [ 31 "//pw_allocator:testing", 32 "//pw_async2:coro", 33 "//pw_async2:dispatcher", 34 ], 35) 36 37# count-example-start 38pw_cc_binary( 39 name = "count", 40 srcs = ["count.cc"], 41 target_compatible_with = incompatible_with_mcu(), 42 deps = [ 43 "//pw_allocator:libc_allocator", 44 "//pw_async2:allocate_task", 45 "//pw_async2:coro", 46 "//pw_async2:coro_or_else_task", 47 "//pw_async2:dispatcher", 48 "//pw_async2:system_time_provider", 49 "//pw_chrono:system_clock", 50 "//pw_log", 51 "//pw_result", 52 "//pw_status", 53 ], 54) 55# count-example-end 56 57pw_cc_test( 58 name = "coro_blinky_loop", 59 srcs = ["coro_blinky_loop.cc"], 60 deps = [ 61 "//pw_allocator:testing", 62 "//pw_async2:coro", 63 "//pw_async2:dispatcher", 64 "//pw_async2:simulated_time_provider", 65 "//pw_async2:time_provider", 66 "//pw_chrono:system_clock", 67 ], 68) 69 70pw_cc_test( 71 name = "once_send_recv", 72 srcs = ["once_send_recv.cc"], 73 deps = [ 74 "//pw_allocator:testing", 75 "//pw_async2:coro", 76 "//pw_async2:dispatcher", 77 "//pw_async2:once_sender", 78 ], 79) 80 81sphinx_docs_library( 82 name = "docs", 83 srcs = [ 84 "BUILD.bazel", 85 "BUILD.gn", 86 "basic.cc", 87 "coro_blinky_loop.cc", 88 "count.cc", 89 "once_send_recv.cc", 90 ], 91 target_compatible_with = incompatible_with_mcu(), 92) 93