| # 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. |
| |
| zx_library("hwreg") { |
| sdk = "source" |
| sdk_headers = [ |
| "hwreg/asm.h", |
| "hwreg/bitfields.h", |
| "hwreg/indirect.h", |
| "hwreg/internal.h", |
| "hwreg/mmio.h", |
| "hwreg/pio.h", |
| ] |
| kernel = true |
| static = true |
| host = true |
| sources = [ "printers.cc" ] |
| if (!is_kernel) { |
| sources += [ "asm.cc" ] |
| deps = [ "$zx/system/ulib/fit" ] |
| } |
| } |
| |
| zx_library("hwreg-mock") { |
| testonly = true |
| sdk = "source" |
| sdk_headers = [ "hwreg/mock.h" ] |
| kernel = true |
| static = true |
| host = true |
| sources = [] |
| deps = [ "$zx/system/ulib/mock-function" ] |
| public_deps = [ |
| # <hwreg/mock.h> has #include <lib/mock-function/mock-function.h>. |
| "$zx/system/ulib/mock-function:headers", |
| ] |
| } |
| |
| zx_library("hwreg-i2c") { |
| sdk = "source" |
| sdk_headers = [ |
| "hwreg/bitfields.h", |
| "hwreg/indirect.h", |
| "hwreg/internal.h", |
| "hwreg/i2c.h", |
| ] |
| kernel = true |
| static = true |
| sources = [ "printers.cc" ] |
| |
| public_deps = [ |
| # <hwreg/i2c.h> has #include <lib/device-protocol/i2c.h>. |
| "$zx/system/dev/lib/device-protocol-i2c:headers", |
| ] |
| } |