• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15import("//build_overrides/pigweed.gni")
16
17import("$dir_pw_build/target_types.gni")
18import("$dir_pw_docgen/docs.gni")
19import("$dir_pw_fuzzer/fuzzer.gni")
20import("$dir_pw_unit_test/test.gni")
21
22config("public_include_path") {
23  include_dirs = [ "public" ]
24  visibility = [ ":*" ]
25}
26
27group("pw_bluetooth_hci") {
28  public_deps = [
29    ":packet",
30    ":uart_transport",
31  ]
32}
33
34pw_source_set("packet") {
35  public_configs = [ ":public_include_path" ]
36  public = [ "public/pw_bluetooth_hci/packet.h" ]
37  public_deps = [
38    dir_pw_assert,
39    dir_pw_bytes,
40    dir_pw_result,
41  ]
42  sources = [ "packet.cc" ]
43  deps = [ dir_pw_status ]
44}
45
46pw_source_set("uart_transport") {
47  public_configs = [ ":public_include_path" ]
48  public = [ "public/pw_bluetooth_hci/uart_transport.h" ]
49  sources = [ "uart_transport.cc" ]
50  public_deps = [
51    ":packet",
52    dir_pw_bytes,
53    dir_pw_function,
54    dir_pw_status,
55  ]
56}
57
58pw_test_group("tests") {
59  tests = [
60    ":packet_test",
61    ":uart_transport_test",
62    ":uart_transport_fuzzer",
63  ]
64}
65
66pw_test("packet_test") {
67  sources = [ "packet_test.cc" ]
68  deps = [
69    ":packet",
70    dir_pw_bytes,
71    dir_pw_status,
72  ]
73}
74
75pw_test("uart_transport_test") {
76  sources = [ "uart_transport_test.cc" ]
77  deps = [
78    ":packet",
79    ":uart_transport",
80    dir_pw_bytes,
81    dir_pw_status,
82  ]
83}
84
85pw_fuzzer("uart_transport_fuzzer") {
86  sources = [ "uart_transport_fuzzer.cc" ]
87  deps = [
88    ":packet",
89    ":uart_transport",
90    dir_pw_bytes,
91    dir_pw_status,
92    dir_pw_stream,
93  ]
94}
95
96pw_doc_group("docs") {
97  sources = [ "docs.rst" ]
98}
99