| # 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/config/fuchsia/rules.gni") |
| import("//build/test.gni") |
| import("//src/sys/build/components.gni") |
| |
| bind_rules("bma253-bind") { |
| rules = "bma253.bind" |
| output = "bma253-bind.h" |
| tests = "bma253-bind-test.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.i2c", |
| "//src/devices/bind/fuchsia.platform", |
| ] |
| } |
| |
| driver_module("bma253") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ "bma253.cc" ] |
| deps = [ |
| ":bma253-bind", |
| "//sdk/banjo/fuchsia.hardware.clock:fuchsia.hardware.clock_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.gpio", |
| "//sdk/banjo/fuchsia.hardware.hidbus", |
| "//sdk/banjo/fuchsia.hardware.i2c", |
| "//sdk/lib/fit", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/i2c/lib/device-protocol-i2c", |
| "//src/devices/i2c/lib/device-protocol-i2c-channel", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/mmio", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/hid", |
| "//zircon/system/ulib/simplehid", |
| ] |
| } |
| |
| test("bma253-test") { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| output_name = "bma253-test" |
| configs += [ "//build/config:all_source" ] |
| sources = [ |
| "bma253-test.cc", |
| "bma253.cc", |
| ] |
| deps = [ |
| ":bma253-bind", |
| "//sdk/banjo/fuchsia.hardware.gpio:fuchsia.hardware.gpio_mock", |
| "//sdk/banjo/fuchsia.hardware.i2c", |
| "//sdk/lib/fdio", |
| "//sdk/lib/fit", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/i2c/lib/device-protocol-i2c", |
| "//src/devices/i2c/lib/device-protocol-i2c-channel", |
| "//src/devices/i2c/testing/mock-i2c", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/mmio", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//src/ui/input/testing/mock-hidbus-ifc", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/hid", |
| "//zircon/system/ulib/simplehid", |
| ] |
| } |
| |
| fuchsia_unittest_package("bma253-test-package") { |
| package_name = "bma253-test" |
| deps = [ ":bma253-test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":bma253-bind_test", |
| ":bma253-test-package", |
| ] |
| } |