| # 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/drivers.gni") |
| |
| driver_bind_rules("pcf8563_rtc_bind") { |
| rules = "pcf8563_rtc.bind" |
| header_output = "pcf8563_rtc_bind.h" |
| tests = "bind-tests.json" |
| deps = [ "//src/devices/bind/fuchsia.nxp.platform" ] |
| } |
| |
| fuchsia_driver("nxp-driver") { |
| output_name = "nxp" |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| sources = [ "pcf8563-rtc.cc" ] |
| deps = [ |
| ":pcf8563_rtc_bind", |
| "//sdk/banjo/fuchsia.hardware.i2c:fuchsia.hardware.i2c_banjo_cpp", |
| "//sdk/fidl/fuchsia.hardware.rtc:fuchsia.hardware.rtc_c", |
| "//src/devices/i2c/lib/device-protocol-i2c", |
| "//src/devices/i2c/lib/device-protocol-i2c-channel", |
| "//src/devices/rtc/lib/rtc", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/hid", |
| "//zircon/system/ulib/sync", |
| "//zircon/system/ulib/zx", |
| ] |
| |
| # TODO(fxbug.dev/95833): This target uses the deprecated C bindings. |
| # Consider switching to the C++ bindings. See linked bug for details. |
| configs += [ "//build/c:fidl-deprecated-c-bindings" ] |
| } |
| |
| fuchsia_driver_component("nxp") { |
| info = "nxp-info.json" |
| component_name = "nxp" |
| deps = [ ":nxp-driver" ] |
| colocate = true |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":pcf8563_rtc_bind_test" ] |
| } |