blob: 559c0be1167149d42dfd7f0858dd49d7085ceb0c [file] [log] [blame]
# Copyright 2022 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.
# This file was generated by the `fx create` command. The template
# is located at `//tools/create/templates/driver-default/BUILD.gn.tmpl-cpp`.
# If you find something broken, we are eager to review fixes.
import("//build/bind/bind.gni")
import("//build/components.gni")
import("//build/drivers.gni")
import("//build/test.gni")
group("usb-fastboot-function") {
deps = [ ":pkg" ]
}
group("tests") {
testonly = true
deps = [ ":usb-fastboot-function-test" ]
}
driver_bind_rules("bind") {
rules = "usb_fastboot_function.bind"
bind_output = "usb_fastboot_function.bindbc"
deps = [
"//src/devices/bind/fuchsia.google.platform.usb",
"//src/devices/bind/fuchsia.usb",
"//src/devices/bind/fuchsia.usb.comm",
]
}
source_set("usb-fastboot-function-common") {
sources = [
"usb_fastboot_function.cc",
"usb_fastboot_function.h",
]
public_deps = [
":bind",
"//sdk/banjo/fuchsia.hardware.usb:fuchsia.hardware.usb_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.usb.function:fuchsia.hardware.usb.function_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.usb.request:fuchsia.hardware.usb.request_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.fastboot:fuchsia.hardware.fastboot_cpp",
"//src/devices/lib/driver",
"//src/devices/usb/lib/usb",
"//src/devices/usb/lib/usb:peripheral",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/fzl",
"//zircon/system/ulib/inspect",
"//zircon/system/ulib/sync",
"//zircon/system/ulib/trace",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
]
}
fuchsia_driver("driver") {
output_name = "usb-fastboot-function"
deps = [ ":usb-fastboot-function-common" ]
}
fuchsia_driver_component("component") {
component_name = "usb-fastboot-function"
deps = [ ":driver" ]
info = "usb_fastboot_function-info.json"
manifest = "meta/usb_fastboot_function.cml"
}
fuchsia_driver_package("pkg") {
package_name = "usb-fastboot-function"
driver_components = [ ":component" ]
}
test("usb-fastboot-function-test-bin") {
sources = [ "unit-tests.cc" ]
deps = [
":usb-fastboot-function-common",
"//sdk/banjo/fuchsia.hardware.usb.function:fuchsia.hardware.usb.function_banjo_cpp_mock",
"//sdk/fidl/fuchsia.hardware.fastboot:fuchsia.hardware.fastboot_cpp_testing",
"//sdk/lib/inspect/testing/cpp:zxtest",
"//src/devices/testing/mock-ddk",
"//zircon/system/ulib/zxtest",
]
}
fuchsia_unittest_package("usb-fastboot-function-test") {
deps = [ ":usb-fastboot-function-test-bin" ]
}