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("@rules_cc//cc:cc_library.bzl", "cc_library") 16load("//pw_unit_test:pw_cc_test.bzl", "pw_cc_test") 17 18package( 19 default_visibility = ["//visibility:public"], 20 features = ["-layering_check"], 21) 22 23cc_library( 24 name = "iso", 25 srcs = [ 26 "iso_inbound_packet_assembler.cc", 27 "iso_stream.cc", 28 "iso_stream_manager.cc", 29 ], 30 hdrs = [ 31 "public/pw_bluetooth_sapphire/internal/host/iso/iso_common.h", 32 "public/pw_bluetooth_sapphire/internal/host/iso/iso_inbound_packet_assembler.h", 33 "public/pw_bluetooth_sapphire/internal/host/iso/iso_stream.h", 34 "public/pw_bluetooth_sapphire/internal/host/iso/iso_stream_manager.h", 35 ], 36 implementation_deps = [ 37 "//pw_bluetooth_sapphire/host/hci", 38 ], 39 strip_include_prefix = "public", 40 tags = ["noclangtidy"], 41 deps = [ 42 "//pw_bluetooth:emboss_hci_data", 43 "//pw_bluetooth:emboss_hci_events", 44 "//pw_bluetooth_sapphire/host/common", 45 "//pw_bluetooth_sapphire/host/hci-spec", 46 "//pw_bluetooth_sapphire/host/transport", 47 "//pw_function", 48 "//pw_span", 49 ], 50) 51 52cc_library( 53 name = "testing", 54 testonly = True, 55 hdrs = [ 56 "public/pw_bluetooth_sapphire/internal/host/iso/fake_iso_stream.h", 57 ], 58 strip_include_prefix = "public", 59 tags = ["noclangtidy"], 60 deps = [ 61 ":iso", 62 ], 63) 64 65pw_cc_test( 66 name = "iso_test", 67 srcs = [ 68 "iso_common_test.cc", 69 "iso_inbound_packet_assembler_test.cc", 70 "iso_stream_manager_test.cc", 71 "iso_stream_test.cc", 72 ], 73 # TODO: https://pwbug.dev/393957973 - Fix this test. 74 tags = [ 75 "noasan", 76 "notsan", 77 ], 78 test_main = "//pw_bluetooth_sapphire/host/testing:gtest_main", 79 deps = [ 80 ":iso", 81 "//pw_bluetooth_sapphire/host/testing", 82 "//pw_bluetooth_sapphire/host/testing:mock_controller", 83 ], 84) 85