• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2021 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(
16    "//pw_build:pigweed.bzl",
17    "pw_cc_library",
18    "pw_cc_test",
19)
20load("//pw_fuzzer:fuzzer.bzl", "pw_cc_fuzz_test")
21
22package(default_visibility = ["//visibility:public"])
23
24licenses(["notice"])
25
26pw_cc_library(
27    name = "pw_bluetooth_hci",
28    deps = [
29        ":packet",
30        ":uart_transport",
31    ],
32)
33
34pw_cc_library(
35    name = "packet",
36    srcs = [
37        "packet.cc",
38    ],
39    hdrs = [
40        "public/pw_bluetooth_hci/packet.h",
41    ],
42    includes = ["public"],
43    deps = [
44        "//pw_assert",
45        "//pw_bytes",
46        "//pw_result",
47        "//pw_status",
48    ],
49)
50
51pw_cc_library(
52    name = "uart_transport",
53    srcs = [
54        "uart_transport.cc",
55    ],
56    hdrs = [
57        "public/pw_bluetooth_hci/uart_transport.h",
58    ],
59    includes = ["public"],
60    deps = [
61        ":packet",
62        "//pw_bytes",
63        "//pw_function",
64        "//pw_status",
65    ],
66)
67
68pw_cc_test(
69    name = "packet_test",
70    srcs = ["packet_test.cc"],
71    deps = [
72        ":packet",
73        "//pw_bytes",
74        "//pw_status",
75        "//pw_unit_test",
76    ],
77)
78
79pw_cc_test(
80    name = "uart_transport_test",
81    srcs = ["uart_transport_test.cc"],
82    deps = [
83        ":packet",
84        ":uart_transport",
85        "//pw_bytes",
86        "//pw_status",
87        "//pw_unit_test",
88    ],
89)
90
91pw_cc_fuzz_test(
92    name = "uart_transport_fuzzer",
93    srcs = ["uart_transport_fuzzer.cc"],
94    deps = [
95        ":packet",
96        ":uart_transport",
97        "//pw_bytes",
98        "//pw_fuzzer",
99        "//pw_status",
100        "//pw_stream",
101    ],
102)
103