1// Copyright 2023 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 15package { 16 default_applicable_licenses: ["external_pigweed_license"], 17} 18 19cc_library_static { 20 name: "pw_digital_io", 21 cpp_std: "c++20", 22 vendor_available: true, 23 host_supported: true, 24 defaults: [ 25 "pw_android_common_backends", 26 ], 27 header_libs: [ 28 "pw_assert", 29 ], 30 export_header_lib_headers: [ 31 "pw_assert", 32 ], 33 whole_static_libs: [ 34 "pw_function", 35 "pw_result", 36 "pw_status", 37 "pw_toolchain", 38 ], 39 export_static_lib_headers: [ 40 "pw_function", 41 "pw_result", 42 "pw_status", 43 "pw_toolchain", 44 ], 45 export_include_dirs: [ 46 "public", 47 ], 48 srcs: [ 49 "digital_io.cc", 50 ], 51} 52 53genrule { 54 name: "pw_digital_io_proto_with_prefix", 55 defaults: ["pw_rpc_add_prefix_to_proto"], 56 srcs: ["digital_io.proto"], 57 out: ["pw_digital_io/digital_io.proto"], 58} 59 60genrule { 61 name: "pw_digital_io_pwpb_rpc_header", 62 defaults: ["pw_rpc_generate_pwpb_rpc_header_with_prefix"], 63 srcs: [":pw_digital_io_proto_with_prefix"], 64 out: ["pw_digital_io/digital_io.rpc.pwpb.h"], 65} 66 67genrule { 68 name: "pw_digital_io_pwpb_proto_header", 69 defaults: ["pw_rpc_generate_pwpb_proto_with_prefix"], 70 srcs: [":pw_digital_io_proto_with_prefix"], 71 out: ["pw_digital_io/digital_io.pwpb.h"], 72} 73 74cc_library_headers { 75 name: "pw_digital_io_service_pwpb", 76 cpp_std: "c++20", 77 vendor_available: true, 78 host_supported: true, 79 generated_headers: [ 80 "pw_digital_io_pwpb_proto_header", 81 "pw_digital_io_pwpb_rpc_header", 82 ], 83 export_generated_headers: [ 84 "pw_digital_io_pwpb_proto_header", 85 "pw_digital_io_pwpb_rpc_header", 86 ], 87} 88