• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2023 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
15import("//build_overrides/pigweed.gni")
16import("$dir_pw_build/target_types.gni")
17import("$dir_pw_unit_test/test.gni")
18
19dir_public_transport =
20    "../../public/pw_bluetooth_sapphire/internal/host/transport"
21
22pw_source_set("transport") {
23  public = [
24    "$dir_public_transport/acl_data_channel.h",
25    "$dir_public_transport/acl_data_packet.h",
26    "$dir_public_transport/command_channel.h",
27    "$dir_public_transport/control_packets.h",
28    "$dir_public_transport/data_buffer_info.h",
29    "$dir_public_transport/emboss_control_packets.h",
30    "$dir_public_transport/emboss_packet.h",
31    "$dir_public_transport/error.h",
32    "$dir_public_transport/link_type.h",
33    "$dir_public_transport/packet.h",
34    "$dir_public_transport/sco_data_channel.h",
35    "$dir_public_transport/sco_data_packet.h",
36    "$dir_public_transport/slab_allocators.h",
37    "$dir_public_transport/transport.h",
38  ]
39
40  sources = [
41    "acl_data_channel.cc",
42    "acl_data_packet.cc",
43    "command_channel.cc",
44    "control_packets.cc",
45    "emboss_control_packets.cc",
46    "error.cc",
47    "link_type.cc",
48    "sco_data_channel.cc",
49    "sco_data_packet.cc",
50    "transport.cc",
51  ]
52
53  public_deps = [
54    "$dir_pw_async:dispatcher",
55    "$dir_pw_async:task",
56    "$dir_pw_bluetooth",
57    "$dir_pw_bluetooth:emboss_hci_group",
58    "$dir_pw_bluetooth:emboss_hci_test",
59    "$dir_pw_bluetooth_sapphire/host/common",
60    "$dir_pw_bluetooth_sapphire/host/hci-spec",
61    "$dir_pw_third_party/fuchsia:fit",
62  ]
63
64  public_configs = [ "$dir_pw_bluetooth_sapphire:public_include_path" ]
65}
66
67pw_source_set("testing") {
68  public = [
69    "$dir_public_transport/fake_sco_data_channel.h",
70    "$dir_public_transport/mock_acl_data_channel.h",
71  ]
72  sources = [
73    "fake_sco_data_channel.cc",
74    "mock_acl_data_channel.cc",
75  ]
76
77  public_deps = [ ":transport" ]
78}
79
80pw_test("tests") {
81  sources = [
82    "acl_data_channel_test.cc",
83    "command_channel_test.cc",
84    "emboss_control_packets_test.cc",
85    "emboss_packet_test.cc",
86    "packet_test.cc",
87    "sco_data_channel_test.cc",
88    "sco_data_packet_test.cc",
89    "slab_allocators_test.cc",
90    "transport_test.cc",
91  ]
92
93  deps = [
94    ":transport",
95    "$dir_pw_bluetooth_sapphire/host/testing",
96  ]
97}
98