| # Copyright 2019 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| assert(!defined(zx) || zx != "/", |
| "This file can only be used in the Fuchsia GN build.") |
| |
| import("//build/config/fuchsia/rules.gni") |
| import("//build/test.gni") |
| import("//build/test/test_package.gni") |
| |
| import("//build/unification/firmware.gni") |
| |
| driver_module("bt-hci-broadcom") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| configs -= [ "//build/config/fuchsia:no_cpp_standard_library" ] |
| configs += [ |
| "//build/config/fuchsia:static_cpp_standard_library", |
| "//build/unification/config:zircon-migrated", |
| ] |
| sources = [ "bt-hci-broadcom.c" ] |
| deps = [ |
| "//sdk/banjo/ddk.protocol.bt.hci", |
| "//sdk/banjo/ddk.protocol.bt.vendor", |
| "//sdk/banjo/ddk.protocol.serialimpl.async", |
| "//sdk/fidl/fuchsia.hardware.bluetooth:fuchsia.hardware.bluetooth_c", |
| "//src/devices/lib/driver", |
| "//zircon/public/lib/fidl", |
| "//zircon/public/lib/sync", |
| "//zircon/system/ulib/ddk", |
| |
| # TODO(fxb/38132): Migrate to the new bind rules and delete the below |
| "//src/lib/ddk:ddk-deprecated-binding-headers", |
| ] |
| data_deps = [ ":firmware" ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| firmware("firmware") { |
| sources = [ "bluetooth/bcm4345c4/BCM4345C5.hcd" ] |
| } |
| |
| test("bt-hci-broadcom-test") { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| output_name = "bt-hci-broadcom-test" |
| configs += [ "//build/config:all_source" ] |
| sources = [ "bt-hci-broadcom-test.c" ] |
| deps = [ |
| "//sdk/banjo/ddk.protocol.bt.hci", |
| "//sdk/banjo/ddk.protocol.bt.vendor", |
| "//sdk/banjo/ddk.protocol.serialimpl.async", |
| "//sdk/fidl/fuchsia.hardware.bluetooth:fuchsia.hardware.bluetooth_c", |
| "//sdk/lib/fdio", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/bus/testing/mock-sdio", |
| "//src/devices/testing/fake_ddk", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/mock-function", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/ddk", |
| "//zircon/system/ulib/ddktl", |
| "//zircon/system/ulib/fzl", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| unittest_package("bt-hci-broadcom-test-package") { |
| package_name = "bt-hci-broadcom-test" |
| deps = [ ":bt-hci-broadcom-test" ] |
| |
| tests = [ |
| { |
| name = "bt-hci-broadcom-test" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":bt-hci-broadcom-test-package" ] |
| } |