1# Copyright 2020 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15load( 16 "//pw_build:pigweed.bzl", 17 "pw_cc_test", 18) 19load( 20 "//pw_protobuf_compiler:pw_proto_library.bzl", 21 "pw_proto_library", 22) 23 24package(default_visibility = ["//visibility:public"]) 25 26licenses(["notice"]) 27 28cc_library( 29 name = "pw_digital_io", 30 srcs = ["digital_io.cc"], 31 hdrs = [ 32 "public/pw_digital_io/digital_io.h", 33 "public/pw_digital_io/internal/conversions.h", 34 "public/pw_digital_io/polarity.h", 35 ], 36 includes = ["public"], 37 deps = [ 38 "//pw_assert", 39 "//pw_function", 40 "//pw_result", 41 "//pw_status", 42 "//pw_toolchain:sibling_cast", 43 ], 44) 45 46pw_cc_test( 47 name = "digital_io_test", 48 srcs = ["digital_io_test.cc"], 49 deps = [ 50 ":pw_digital_io", 51 "//pw_unit_test", 52 ], 53) 54 55cc_library( 56 name = "digital_io_controller", 57 hdrs = ["public/pw_digital_io/digital_io_controller.h"], 58 includes = ["public"], 59) 60 61cc_library( 62 name = "digital_io_service", 63 srcs = ["digital_io_service.cc"], 64 hdrs = ["public/pw_digital_io/digital_io_service.h"], 65 includes = ["public"], 66 deps = [ 67 ":digital_io_proto_cc.pwpb", 68 ":digital_io_proto_cc.pwpb_rpc", 69 ":pw_digital_io", 70 "//pw_function", 71 "//pw_rpc/pwpb:server_api", 72 "//pw_span", 73 ], 74) 75 76proto_library( 77 name = "digital_io_proto", 78 srcs = ["digital_io.proto"], 79) 80 81pw_proto_library( 82 name = "digital_io_proto_cc", 83 deps = [":digital_io_proto"], 84) 85