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