• 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_test",
18)
19load("//pw_fuzzer:fuzzer.bzl", "pw_cc_fuzz_test")
20
21package(default_visibility = ["//visibility:public"])
22
23licenses(["notice"])
24
25cc_library(
26    name = "pw_bluetooth_hci",
27    deps = [
28        ":packet",
29        ":uart_transport",
30    ],
31)
32
33cc_library(
34    name = "packet",
35    srcs = [
36        "packet.cc",
37    ],
38    hdrs = [
39        "public/pw_bluetooth_hci/packet.h",
40    ],
41    includes = ["public"],
42    deps = [
43        "//pw_assert",
44        "//pw_bytes",
45        "//pw_bytes:bit",
46        "//pw_result",
47        "//pw_status",
48    ],
49)
50
51cc_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_bytes:bit",
64        "//pw_function",
65        "//pw_status",
66    ],
67)
68
69pw_cc_test(
70    name = "packet_test",
71    srcs = ["packet_test.cc"],
72    deps = [
73        ":packet",
74        "//pw_bytes",
75        "//pw_containers",
76        "//pw_status",
77        "//pw_unit_test",
78    ],
79)
80
81pw_cc_test(
82    name = "uart_transport_test",
83    srcs = ["uart_transport_test.cc"],
84    deps = [
85        ":packet",
86        ":uart_transport",
87        "//pw_bytes",
88        "//pw_status",
89        "//pw_unit_test",
90    ],
91)
92
93pw_cc_fuzz_test(
94    name = "uart_transport_fuzzer",
95    srcs = ["uart_transport_fuzzer.cc"],
96    deps = [
97        ":packet",
98        ":uart_transport",
99        "//pw_bytes",
100        "//pw_status",
101        "//pw_stream",
102    ],
103)
104