blob: 718066b74dce2d19e19eb458ca9e9478463e7aa8 [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.
import("//build/bind/bind.gni")
import("//build/components.gni")
import("//build/drivers.gni")
import("//build/test.gni")
driver_bind_rules("cypress_cy8cmbr3108-bind") {
rules = "cypress_cy8cmbr3108.bind"
header_output = "cypress_cy8cmbr3108-bind.h"
tests = "tests.json"
deps = [ "//src/devices/bind/fuchsia.synaptics.platform" ]
}
fuchsia_driver("cypress-driver") {
output_name = "cypress"
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
sources = [ "cy8cmbr3108.cc" ]
deps = [
":cypress_cy8cmbr3108-bind",
"//sdk/banjo/fuchsia.hardware.gpio:fuchsia.hardware.gpio_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.hidbus:fuchsia.hardware.hidbus_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.i2c:fuchsia.hardware.i2c_llcpp",
"//src/devices/lib/driver",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/hid",
"//zircon/system/ulib/hwreg-i2c",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
]
}
fuchsia_driver_component("cypress") {
component_name = "cypress"
deps = [ ":cypress-driver" ]
info = "cypress-info.json"
colocate = true
}
test("cypress-touch-test") {
output_name = "cypress-touch-test"
configs += [ "//build/config:all_source" ]
sources = [
"cy8cmbr3108-test.cc",
"cy8cmbr3108.cc",
]
deps = [
":cypress_cy8cmbr3108-bind",
"//sdk/banjo/fuchsia.hardware.gpio:fuchsia.hardware.gpio_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.gpio:fuchsia.hardware.gpio_banjo_cpp_mock",
"//sdk/banjo/fuchsia.hardware.hidbus:fuchsia.hardware.hidbus_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.i2c:fuchsia.hardware.i2c_llcpp",
"//src/devices/i2c/testing/mock-i2c",
"//src/devices/testing/mock-ddk",
"//src/lib/ddk",
"//src/lib/ddktl",
"//src/ui/input/testing/fake-hidbus-ifc",
"//src/ui/input/testing/mock-hidbus-ifc",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/hid",
"//zircon/system/ulib/hwreg-i2c",
"//zircon/system/ulib/mock-function",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
"//zircon/system/ulib/zxtest",
]
}
fuchsia_unittest_package("cypress-touch-test-package") {
package_name = "cypress-touch-test"
deps = [ ":cypress-touch-test" ]
}
group("tests") {
testonly = true
deps = [
":cypress-touch-test-package",
":cypress_cy8cmbr3108-bind_test",
]
}