blob: c945cf7d7ecc69869635cddf0ef6002fae07825d [file] [log] [blame]
# 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.
group("tests") {
testonly = true
deps = [ "tests" ]
}
config("includes") {
include_dirs = [ "include" ]
}
source_set("usb") {
public = [
"include/usb/request-cpp.h",
"include/usb/usb-request.h",
"include/usb/usb.h",
]
sources = [
"align.h",
"usb-request.cc",
"usb-wrapper.cc",
"usb.c",
]
public_deps = [
"//sdk/banjo/fuchsia.hardware.usb:fuchsia.hardware.usb_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.usb.composite:fuchsia.hardware.usb.composite_banjo_cpp",
# <ddk/usb/usb.h> has #include <fuchsia/hardware/usb/c/banjo.h>.
"//src/lib/ddk",
# <usb/request-cpp.h> has #include <lib/operation/operation.h>.
"//sdk/lib/fit",
"//src/devices/lib/dev-operation",
]
deps = [
"//sdk/banjo/ddk.hw.physiter:ddk.hw.physiter_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.usb:fuchsia.hardware.usb_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.usb.composite:fuchsia.hardware.usb.composite_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.usb.request:fuchsia.hardware.usb.request_banjo_cpp",
"//src/lib/ddk",
"//src/lib/ddktl",
]
public_configs = [ ":includes" ]
}
config("enable_dfv2_compat_logging") {
defines = [ "DFV2_COMPAT_LOGGING" ]
}
source_set("usb-dfv2-compat-logging") {
public = [
"include/usb/request-cpp.h",
"include/usb/usb-request.h",
"include/usb/usb.h",
]
sources = [
"align.h",
"usb-request.cc",
"usb-wrapper.cc",
"usb.c",
]
public_deps = [
"//sdk/banjo/fuchsia.hardware.usb:fuchsia.hardware.usb_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.usb.composite:fuchsia.hardware.usb.composite_banjo_cpp",
# <ddk/usb/usb.h> has #include <fuchsia/hardware/usb/c/banjo.h>.
"//src/lib/ddk",
# <usb/request-cpp.h> has #include <lib/operation/operation.h>.
"//sdk/lib/fit",
"//src/devices/lib/dev-operation:dev-operation-dfv2-compat-logging",
]
deps = [
"//sdk/banjo/ddk.hw.physiter:ddk.hw.physiter_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.usb:fuchsia.hardware.usb_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.usb.composite:fuchsia.hardware.usb.composite_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.usb.request:fuchsia.hardware.usb.request_banjo_cpp",
"//sdk/lib/driver/compat/cpp:logging",
"//src/lib/ddk",
"//src/lib/ddktl",
]
public_configs = [
":enable_dfv2_compat_logging",
":includes",
]
}
source_set("usb-fidl") {
public = [ "include/usb/request-fidl.h" ]
sources = [
"include/usb/usb-request.h",
"include/usb/usb.h",
]
public_deps = [
# usb-fidl needs these for now. May be removed in a future where we don't hack usb_request_physmap, etc.
"//sdk/banjo/fuchsia.hardware.usb:fuchsia.hardware.usb_banjo_c",
"//sdk/banjo/fuchsia.hardware.usb:fuchsia.hardware.usb_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.usb.composite:fuchsia.hardware.usb.composite_banjo_c",
]
deps = [
"//sdk/fidl/fuchsia.hardware.usb.request:fuchsia.hardware.usb.request_cpp",
]
public_configs = [ ":includes" ]
}
source_set("usb-header") {
public = [ "include/usb/usb.h" ]
public_configs = [ ":includes" ]
public_deps = [
"//sdk/banjo/fuchsia.hardware.usb:fuchsia.hardware.usb_banjo_c",
"//sdk/banjo/fuchsia.hardware.usb:fuchsia.hardware.usb_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.usb.composite:fuchsia.hardware.usb.composite_banjo_c",
]
}
source_set("audio") {
public = [ "include/usb/audio.h" ]
public_configs = [ ":includes" ]
}
source_set("video") {
public = [ "include/usb/video.h" ]
public_configs = [ ":includes" ]
}
source_set("dfu") {
public = [ "include/usb/dfu.h" ]
public_configs = [ ":includes" ]
}
source_set("ums") {
public = [ "include/usb/ums.h" ]
public_configs = [ ":includes" ]
}
source_set("hid") {
public = [ "include/usb/hid.h" ]
public_configs = [ ":includes" ]
}
source_set("cdc") {
public = [ "include/usb/cdc.h" ]
public_configs = [ ":includes" ]
}
source_set("dwc2") {
public = [ "include/usb/dwc2/metadata.h" ]
public_configs = [ ":includes" ]
}
source_set("peripheral") {
public = [ "include/usb/peripheral.h" ]
public_configs = [ ":includes" ]
}
source_set("peripheral-test") {
public = [ "include/usb/peripheral-test.h" ]
public_configs = [ ":includes" ]
}