| # 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") |
| |
| bind_rules("serial_async_bind") { |
| rules = "serial.bind" |
| output = "serial_bind.h" |
| tests = "tests/tests.json" |
| deps = [ "//src/devices/bind/fuchsia.serial" ] |
| } |
| |
| driver_module("serial-async") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| deps = [ |
| ":common", |
| "//src/devices/lib/driver", |
| ] |
| } |
| |
| source_set("common") { |
| sources = [ |
| "serial.cc", |
| "serial.h", |
| ] |
| public_deps = [ |
| ":serial_async_bind", |
| "//sdk/banjo/ddk.protocol.serial", |
| "//sdk/banjo/ddk.protocol.serialimpl.async", |
| "//sdk/fidl/fuchsia.hardware.serial:fuchsia.hardware.serial_llcpp", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/async", |
| "//zircon/public/lib/async-cpp", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/fidl-async:fidl-async-cpp", |
| "//zircon/system/ulib/fidl-utils", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":serial_async_bind_test", |
| "tests", |
| ] |
| } |