| # 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("i8042_bind") { |
| rules = "i8042.bind" |
| tests = "bind_tests.json" |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.interrupt:fuchsia.hardware.interrupt_bindlib", |
| "//sdk/fidl/fuchsia.hardware.sysmem:fuchsia.hardware.sysmem_bindlib", |
| "//src/devices/bind/fuchsia.acpi", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":i8042_bind_test", |
| ":pc-ps2-tests", |
| ] |
| } |
| |
| common_deps = [ |
| "//sdk/fidl/fuchsia.hardware.input:fuchsia.hardware.input_cpp", |
| "//sdk/fidl/fuchsia.input.report:fuchsia.input.report_cpp", |
| "//sdk/lib/input_report_reader", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/driver:driver_runtime", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//src/ui/input/lib/hid", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/hwreg", |
| "//zircon/system/ulib/zircon-internal", |
| ] |
| |
| fuchsia_driver("pc-ps2-driver") { |
| output_name = "pc-ps2" |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| sources = [ |
| "controller.cc", |
| "device.cc", |
| ] |
| deps = common_deps |
| |
| # TODO(https://fxbug.dev/42136089): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| fuchsia_driver_component("pc-ps2") { |
| component_name = "pc-ps2" |
| deps = [ |
| ":i8042_bind", |
| ":pc-ps2-driver", |
| ] |
| info = "pc-ps2-info.json" |
| manifest = "meta/pc-ps2.cml" |
| } |
| |
| fuchsia_driver_package("package") { |
| package_name = "pc-ps2" |
| driver_components = [ ":pc-ps2" ] |
| } |
| |
| test("pc-ps2-tests-bin") { |
| output_name = "pc-ps2-tests" |
| sources = [ |
| "controller.cc", |
| "device.cc", |
| "unit-tests.cc", |
| ] |
| |
| deps = common_deps + [ |
| "//src/devices/testing/mock-ddk", |
| "//zircon/system/ulib/zxtest", |
| ] |
| |
| # TODO(https://fxbug.dev/42182222): remove this |
| defines = [ "PS2_TEST" ] |
| } |
| |
| fuchsia_unittest_package("pc-ps2-tests") { |
| deps = [ ":pc-ps2-tests-bin" ] |
| } |