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_bytes:bit", 47 "//pw_result", 48 "//pw_status", 49 ], 50) 51 52pw_cc_library( 53 name = "uart_transport", 54 srcs = [ 55 "uart_transport.cc", 56 ], 57 hdrs = [ 58 "public/pw_bluetooth_hci/uart_transport.h", 59 ], 60 includes = ["public"], 61 deps = [ 62 ":packet", 63 "//pw_bytes", 64 "//pw_bytes:bit", 65 "//pw_function", 66 "//pw_status", 67 ], 68) 69 70pw_cc_test( 71 name = "packet_test", 72 srcs = ["packet_test.cc"], 73 deps = [ 74 ":packet", 75 "//pw_bytes", 76 "//pw_containers", 77 "//pw_status", 78 "//pw_unit_test", 79 ], 80) 81 82pw_cc_test( 83 name = "uart_transport_test", 84 srcs = ["uart_transport_test.cc"], 85 deps = [ 86 ":packet", 87 ":uart_transport", 88 "//pw_bytes", 89 "//pw_status", 90 "//pw_unit_test", 91 ], 92) 93 94pw_cc_fuzz_test( 95 name = "uart_transport_fuzzer", 96 srcs = ["uart_transport_fuzzer.cc"], 97 deps = [ 98 ":packet", 99 ":uart_transport", 100 "//pw_bytes", 101 "//pw_fuzzer", 102 "//pw_status", 103 "//pw_stream", 104 ], 105) 106