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_bytes:bit", 39 dir_pw_assert, 40 dir_pw_bytes, 41 dir_pw_result, 42 dir_pw_span, 43 ] 44 sources = [ "packet.cc" ] 45 deps = [ dir_pw_status ] 46} 47 48pw_source_set("uart_transport") { 49 public_configs = [ ":public_include_path" ] 50 public = [ "public/pw_bluetooth_hci/uart_transport.h" ] 51 sources = [ "uart_transport.cc" ] 52 public_deps = [ 53 ":packet", 54 "$dir_pw_bytes:bit", 55 dir_pw_bytes, 56 dir_pw_function, 57 dir_pw_span, 58 dir_pw_status, 59 ] 60} 61 62pw_test_group("tests") { 63 tests = [ 64 ":packet_test", 65 ":uart_transport_test", 66 ] 67 group_deps = [ ":fuzzers" ] 68} 69 70pw_fuzzer_group("fuzzers") { 71 fuzzers = [ ":uart_transport_fuzzer" ] 72} 73 74pw_test("packet_test") { 75 sources = [ "packet_test.cc" ] 76 deps = [ 77 ":packet", 78 "$dir_pw_containers", 79 dir_pw_bytes, 80 dir_pw_status, 81 ] 82} 83 84pw_test("uart_transport_test") { 85 sources = [ "uart_transport_test.cc" ] 86 deps = [ 87 ":packet", 88 ":uart_transport", 89 dir_pw_bytes, 90 dir_pw_status, 91 ] 92} 93 94pw_fuzzer("uart_transport_fuzzer") { 95 sources = [ "uart_transport_fuzzer.cc" ] 96 deps = [ 97 ":packet", 98 ":uart_transport", 99 dir_pw_bytes, 100 dir_pw_status, 101 dir_pw_stream, 102 ] 103} 104 105pw_doc_group("docs") { 106 sources = [ "docs.rst" ] 107} 108