blob: e7014830fa56507fc6d940dbf2c943043e8c375f [file] [log] [blame]
# 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("ssd1306-bind") {
rules = "ssd1306.bind"
header_output = "ssd1306-bind.h"
tests = "bind-tests.json"
deps = [ "//src/devices/bind/fuchsia.platform" ]
}
fuchsia_driver("ssd1306_driver-driver") {
output_name = "ssd1306_driver"
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
sources = [ "ssd1306.cc" ]
deps = [
":ssd1306-bind",
"//sdk/banjo/fuchsia.hardware.dotmatrixdisplay:fuchsia.hardware.dotmatrixdisplay_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.i2c:fuchsia.hardware.i2c_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.dotmatrixdisplay:fuchsia.hardware.dotmatrixdisplay_llcpp",
"//src/devices/i2c/lib/device-protocol-i2c",
"//src/devices/i2c/lib/device-protocol-i2c-channel",
"//src/devices/lib/driver",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/sync",
"//zircon/system/ulib/zircon-internal",
]
}
fuchsia_driver_component("ssd1306_driver") {
component_name = "ssd1306_driver"
deps = [ ":ssd1306_driver-driver" ]
info = "ssd1306_driver-info.json"
colocate = true
}
fuchsia_driver_package("ssd1306") {
driver_components = [ ":ssd1306_driver" ]
}
test("ssd1306-test") {
sources = [
"ssd1306.cc",
"test.cc",
]
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
deps = [
":ssd1306-bind",
"//sdk/banjo/fuchsia.hardware.dotmatrixdisplay:fuchsia.hardware.dotmatrixdisplay_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.i2c:fuchsia.hardware.i2c_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.dotmatrixdisplay:fuchsia.hardware.dotmatrixdisplay_llcpp",
"//src/devices/i2c/lib/device-protocol-i2c",
"//src/devices/i2c/lib/device-protocol-i2c-channel",
"//src/devices/i2c/testing/fake-i2c",
"//src/devices/lib/driver",
"//src/devices/testing/mock-ddk",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/sync",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zxtest",
]
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
group("tests") {
testonly = true
deps = [
":ssd1306-bind_test",
":ssd1306-test-package",
]
}
fuchsia_unittest_package("ssd1306-test-package") {
package_name = "ssd1306-test"
deps = [ ":ssd1306-test" ]
}