blob: 7837ffa5aed09511e9d4af7d54aace4074c7caa7 [file] [log] [blame]
# Copyright 2018 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.
import("//build/bind/bind.gni")
import("//build/cipd.gni")
import("//build/config/fuchsia/rules.gni")
import("//build/dist/resource.gni")
import("//src/sys/build/components.gni")
bind_rules("bt_hci_atheros_bind") {
rules = "bt_hci_atheros.bind"
output = "bt_hci_atheros_bind.h"
tests = "bind_tests.json"
deps = [
"//src/devices/bind/fuchsia.bluetooth",
"//src/devices/bind/fuchsia.usb",
]
}
driver_module("driver") {
output_name = "bt-hci-atheros"
sources = [
"device.cc",
"device.h",
"driver.cc",
"logging.h",
]
deps = [
":bt_hci_atheros_bind",
"//sdk/banjo/fuchsia.hardware.usb",
"//sdk/fidl/fuchsia.hardware.bluetooth:fuchsia.hardware.bluetooth_c",
"//sdk/lib/syslog/cpp:backend_legacy",
"//src/connectivity/bluetooth/core/bt-host/hci",
"//src/connectivity/bluetooth/core/bt-host/hci-spec",
"//src/devices/lib/driver",
"//src/devices/usb/lib/usb",
"//src/devices/usb/lib/usb",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/sync",
"//zircon/public/lib/zx",
]
configs += [ "//build/config/fuchsia:enable_zircon_asserts" ]
}
if (internal_access) {
resource("btatheros-firmware") {
sources = [
"//prebuilt/connectivity/bluetooth/firmware/atheros/nvm_00130300.bin",
"//prebuilt/connectivity/bluetooth/firmware/atheros/nvm_00130302.bin",
"//prebuilt/connectivity/bluetooth/firmware/atheros/nvm_usb_00000200.bin",
"//prebuilt/connectivity/bluetooth/firmware/atheros/nvm_usb_00000201.bin",
"//prebuilt/connectivity/bluetooth/firmware/atheros/nvm_usb_00000300.bin",
"//prebuilt/connectivity/bluetooth/firmware/atheros/nvm_usb_00000302.bin",
"//prebuilt/connectivity/bluetooth/firmware/atheros/rampatch_00130300.bin",
"//prebuilt/connectivity/bluetooth/firmware/atheros/rampatch_00130302.bin",
"//prebuilt/connectivity/bluetooth/firmware/atheros/rampatch_usb_00000200.bin",
"//prebuilt/connectivity/bluetooth/firmware/atheros/rampatch_usb_00000201.bin",
"//prebuilt/connectivity/bluetooth/firmware/atheros/rampatch_usb_00000300.bin",
"//prebuilt/connectivity/bluetooth/firmware/atheros/rampatch_usb_00000302.bin",
]
outputs = [ "lib/firmware/{{source_file_part}}" ]
}
}
fuchsia_system_package("atheros") {
deps = [ ":driver" ]
if (internal_access) {
deps += [ ":btatheros-firmware" ]
}
# This package is reachable from //garnet/packages/prod:all
allowed_in_extra_deps = true
}
group("tests") {
testonly = true
deps = [ ":bt_hci_atheros_bind_test" ]
}