• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2020 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_facade.bzl", "pw_facade")
18
19package(default_visibility = ["//visibility:public"])
20
21licenses(["notice"])
22
23constraint_setting(
24    name = "backend_constraint_setting",
25)
26
27pw_facade(
28    name = "context",
29    hdrs = [
30        "public/pw_interrupt/context.h",
31    ],
32    backend = ":backend",
33    strip_include_prefix = "public",
34)
35
36label_flag(
37    name = "backend",
38    build_setting_default = ":backend_multiplexer",
39)
40
41alias(
42    name = "backend_multiplexer",
43    actual = select({
44        "//pw_interrupt_cortex_m:backend": "//pw_interrupt_cortex_m:context",
45        "//pw_interrupt_freertos:backend": "//pw_interrupt_freertos:context",
46        "//pw_interrupt_xtensa:backend": "//pw_interrupt_xtensa:context",
47        "//conditions:default": "//pw_build:unspecified_backend",
48    }),
49    visibility = ["//targets:__pkg__"],
50)
51
52filegroup(
53    name = "doxygen",
54    srcs = [
55        "public/pw_interrupt/context.h",
56    ],
57)
58
59sphinx_docs_library(
60    name = "docs",
61    srcs = [
62        "backends.rst",
63        "docs.rst",
64    ],
65    prefix = "pw_interrupt/",
66    target_compatible_with = incompatible_with_mcu(),
67)
68