1# Copyright 2024 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("@pigweed//pw_unit_test:pw_cc_test.bzl", "pw_cc_test") 16 17package(default_visibility = ["//visibility:public"]) 18 19exports_files(glob(["**/*"])) 20 21cc_library( 22 name = "hci", 23 srcs = [ 24 "acl_connection.cc", 25 "advertising_handle_map.cc", 26 "android_extended_low_energy_advertiser.cc", 27 "bredr_connection.cc", 28 "bredr_connection_request.cc", 29 "connection.cc", 30 "extended_low_energy_advertiser.cc", 31 "extended_low_energy_scanner.cc", 32 "legacy_low_energy_advertiser.cc", 33 "legacy_low_energy_scanner.cc", 34 "low_energy_advertiser.cc", 35 "low_energy_connection.cc", 36 "low_energy_connector.cc", 37 "low_energy_scanner.cc", 38 "sco_connection.cc", 39 "sequential_command_runner.cc", 40 ], 41 deps = [ 42 "//pw_bluetooth_sapphire:public", 43 "//pw_bluetooth_sapphire/host/transport", 44 "@pigweed//pw_async:heap_dispatcher", 45 "@pigweed//pw_bluetooth:emboss_hci", 46 "@pigweed//third_party/fuchsia:fit", 47 ], 48) 49 50cc_library( 51 name = "testing", 52 srcs = [ 53 "fake_bredr_connection.cc", 54 "fake_local_address_delegate.cc", 55 "fake_low_energy_connection.cc", 56 "fake_sco_connection.cc", 57 ], 58 deps = [ 59 ":hci", 60 "//pw_bluetooth_sapphire:public", 61 "//pw_bluetooth_sapphire/host/common", 62 "@pigweed//pw_async:heap_dispatcher", 63 ], 64) 65 66pw_cc_test( 67 name = "hci_test", 68 srcs = [ 69 "advertising_handle_map_test.cc", 70 "connection_test.cc", 71 "extended_low_energy_advertiser_test.cc", 72 "extended_low_energy_scanner_test.cc", 73 "legacy_low_energy_advertiser_test.cc", 74 "legacy_low_energy_scanner_test.cc", 75 "low_energy_advertiser_test.cc", 76 "low_energy_connector_test.cc", 77 "low_energy_multiple_advertising_test.cc", 78 "low_energy_scanner_test.cc", 79 "sequential_command_runner_test.cc", 80 ], 81 test_main = "//pw_bluetooth_sapphire/host/testing:gtest_main", 82 deps = [ 83 ":hci", 84 ":testing", 85 "//pw_bluetooth_sapphire/host/testing", 86 "@pigweed//pw_bluetooth:emboss_hci_test", 87 ], 88) 89