blob: f5183bfa83fc0f8941181a1561a889afbd1738c2 [file] [log] [blame]
# Copyright 2022 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.
load(
"@rules_fuchsia//fuchsia:defs.bzl",
"fuchsia_component_manifest",
"fuchsia_driver_bind_bytecode",
"fuchsia_driver_component",
"fuchsia_package",
)
fuchsia_component_manifest(
name = "manifest",
src = "meta/da7219.cml",
includes = [
"@fuchsia_sdk//pkg/syslog:client",
],
)
fuchsia_driver_bind_bytecode(
name = "bind_bytecode",
output = "da7219.bindbc",
rules = "da7219.bind",
deps = [
"@fuchsia_sdk//fidl/fuchsia.hardware.i2c:fuchsia.hardware.i2c_bindlib",
],
)
cc_binary(
name = "da7219",
srcs = [
"da7219.cc",
"da7219.h",
"i2c_channel.cc",
"i2c_channel.h",
],
linkshared = True,
deps = [
"@fuchsia_sdk//fidl/fuchsia.hardware.audio:fuchsia.hardware.audio_llcpp_cc",
"@fuchsia_sdk//fidl/fuchsia.hardware.i2c:fuchsia.hardware.i2c_llcpp_cc",
"@fuchsia_sdk//pkg/driver2_cpp",
],
)
fuchsia_driver_component(
name = "component",
bind_bytecode = ":bind_bytecode",
driver_lib = ":da7219",
manifest = ":manifest",
)
fuchsia_package(
name = "pkg",
package_name = "da7219",
visibility = ["//visibility:public"],
deps = [
":component",
],
)