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 19genrule { 20 name: "pw_i2c_proto_with_prefix", 21 defaults: ["pw_rpc_add_prefix_to_proto"], 22 srcs: [ 23 "i2c.pwpb_options", 24 "i2c.proto", 25 ], 26 out: [ 27 "pw_i2c/i2c.pwpb_options", 28 "pw_i2c/i2c.proto", 29 ], 30} 31 32genrule { 33 name: "pw_i2c_pwpb_rpc_header", 34 defaults: ["pw_rpc_generate_pwpb_rpc_header_with_prefix"], 35 srcs: [":pw_i2c_proto_with_prefix"], 36 out: ["pw_i2c/i2c.rpc.pwpb.h"], 37} 38 39genrule { 40 name: "pw_i2c_pwpb_proto_header", 41 defaults: ["pw_rpc_generate_pwpb_proto_with_prefix"], 42 srcs: [":pw_i2c_proto_with_prefix"], 43 out: ["pw_i2c/i2c.pwpb.h"], 44} 45 46cc_library_headers { 47 name: "pw_i2c_service_pwpb", 48 cpp_std: "c++20", 49 vendor_available: true, 50 host_supported: true, 51 generated_headers: [ 52 "pw_i2c_pwpb_proto_header", 53 "pw_i2c_pwpb_rpc_header", 54 ], 55 export_generated_headers: [ 56 "pw_i2c_pwpb_proto_header", 57 "pw_i2c_pwpb_rpc_header", 58 ], 59} 60