shaneajg | 0869f2c | 2020-07-08 10:39:14 -0400 | [diff] [blame] | 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 | |
| 15 | load( |
| 16 | "//pw_build:pigweed.bzl", |
| 17 | "pw_cc_library", |
| 18 | ) |
| 19 | |
| 20 | package(default_visibility = ["//visibility:public"]) |
| 21 | |
| 22 | licenses(["notice"]) # Apache License 2.0 |
| 23 | |
| 24 | pw_cc_library( |
Alexei Frolov | d3e5cb7 | 2021-01-08 13:08:45 -0800 | [diff] [blame] | 25 | name = "pw_hdlc", |
shaneajg | 0869f2c | 2020-07-08 10:39:14 -0400 | [diff] [blame] | 26 | srcs = [ |
Wyatt Hepler | cdb0f4e | 2020-09-14 08:49:17 -0700 | [diff] [blame] | 27 | "decoder.cc", |
| 28 | "encoder.cc", |
Alexei Frolov | 44cd952 | 2021-01-13 11:31:59 -0800 | [diff] [blame] | 29 | "public/pw_hdlc/internal/encoder.h", |
Alexei Frolov | b9fda58 | 2021-03-13 18:02:52 -0800 | [diff] [blame] | 30 | "public/pw_hdlc/internal/protocol.h", |
Wyatt Hepler | d427aa3 | 2020-09-18 09:09:34 -0700 | [diff] [blame] | 31 | "rpc_packets.cc", |
Wyatt Hepler | cdb0f4e | 2020-09-14 08:49:17 -0700 | [diff] [blame] | 32 | ], |
| 33 | hdrs = [ |
Alexei Frolov | d3e5cb7 | 2021-01-08 13:08:45 -0800 | [diff] [blame] | 34 | "public/pw_hdlc/decoder.h", |
| 35 | "public/pw_hdlc/encoder.h", |
shaneajg | 0869f2c | 2020-07-08 10:39:14 -0400 | [diff] [blame] | 36 | ], |
| 37 | includes = ["public"], |
shaneajg | 02d127a | 2020-08-11 12:54:56 -0400 | [diff] [blame] | 38 | deps = [ |
Wyatt Hepler | cdb0f4e | 2020-09-14 08:49:17 -0700 | [diff] [blame] | 39 | "//pw_bytes", |
| 40 | "//pw_checksum", |
shaneajg | 02d127a | 2020-08-11 12:54:56 -0400 | [diff] [blame] | 41 | "//pw_log", |
Wyatt Hepler | cdb0f4e | 2020-09-14 08:49:17 -0700 | [diff] [blame] | 42 | "//pw_result", |
shaneajg | 02d127a | 2020-08-11 12:54:56 -0400 | [diff] [blame] | 43 | "//pw_span", |
| 44 | "//pw_status", |
| 45 | "//pw_stream", |
Alexei Frolov | b9fda58 | 2021-03-13 18:02:52 -0800 | [diff] [blame] | 46 | "//pw_varint", |
shaneajg | 02d127a | 2020-08-11 12:54:56 -0400 | [diff] [blame] | 47 | ], |
| 48 | ) |
| 49 | |
Wyatt Hepler | 51ee98e | 2020-09-18 09:09:50 -0700 | [diff] [blame] | 50 | pw_cc_library( |
Alexei Frolov | e39af8d | 2020-12-30 14:55:09 -0800 | [diff] [blame] | 51 | name = "rpc_channel_output", |
Alexei Frolov | d3e5cb7 | 2021-01-08 13:08:45 -0800 | [diff] [blame] | 52 | hdrs = ["public/pw_hdlc/rpc_channel.h"], |
Alexei Frolov | e39af8d | 2020-12-30 14:55:09 -0800 | [diff] [blame] | 53 | includes = ["public"], |
| 54 | deps = [ |
Alexei Frolov | d3e5cb7 | 2021-01-08 13:08:45 -0800 | [diff] [blame] | 55 | ":pw_hdlc", |
Alexei Frolov | e39af8d | 2020-12-30 14:55:09 -0800 | [diff] [blame] | 56 | "//pw_rpc:server", |
| 57 | ], |
| 58 | ) |
| 59 | |
| 60 | pw_cc_library( |
Wyatt Hepler | 51ee98e | 2020-09-18 09:09:50 -0700 | [diff] [blame] | 61 | name = "pw_rpc", |
| 62 | srcs = ["rpc_packets.cc"], |
Alexei Frolov | d3e5cb7 | 2021-01-08 13:08:45 -0800 | [diff] [blame] | 63 | hdrs = ["public/pw_hdlc/rpc_packets.h"], |
Wyatt Hepler | 51ee98e | 2020-09-18 09:09:50 -0700 | [diff] [blame] | 64 | includes = ["public"], |
| 65 | deps = [ |
Alexei Frolov | d3e5cb7 | 2021-01-08 13:08:45 -0800 | [diff] [blame] | 66 | ":pw_hdlc", |
Wyatt Hepler | 51ee98e | 2020-09-18 09:09:50 -0700 | [diff] [blame] | 67 | "//pw_rpc:server", |
| 68 | ], |
| 69 | ) |
| 70 | |
Alexei Frolov | 5039a81 | 2021-01-20 15:14:06 -0800 | [diff] [blame] | 71 | pw_cc_library( |
| 72 | name = "packet_parser", |
| 73 | srcs = ["wire_packet_parser.cc"], |
| 74 | hdrs = ["public/pw_hdlc/wire_packet_parser.h"], |
| 75 | includes = ["public"], |
| 76 | deps = [ |
| 77 | ":pw_hdlc", |
| 78 | "//pw_assert", |
| 79 | "//pw_bytes", |
| 80 | "//pw_checksum", |
| 81 | "//pw_router:packet_parser", |
| 82 | ], |
| 83 | ) |
| 84 | |
shaneajg | e6d3a61 | 2020-07-23 18:40:28 -0400 | [diff] [blame] | 85 | cc_test( |
| 86 | name = "encoder_test", |
| 87 | srcs = ["encoder_test.cc"], |
| 88 | deps = [ |
Alexei Frolov | d3e5cb7 | 2021-01-08 13:08:45 -0800 | [diff] [blame] | 89 | ":pw_hdlc", |
shaneajg | e6d3a61 | 2020-07-23 18:40:28 -0400 | [diff] [blame] | 90 | "//pw_stream", |
| 91 | "//pw_unit_test", |
| 92 | ], |
| 93 | ) |
shaneajg | 063d0e0 | 2020-08-03 11:57:41 -0400 | [diff] [blame] | 94 | |
| 95 | cc_test( |
| 96 | name = "decoder_test", |
| 97 | srcs = ["decoder_test.cc"], |
| 98 | deps = [ |
Alexei Frolov | d3e5cb7 | 2021-01-08 13:08:45 -0800 | [diff] [blame] | 99 | ":pw_hdlc", |
Wyatt Hepler | cdb0f4e | 2020-09-14 08:49:17 -0700 | [diff] [blame] | 100 | "//pw_result", |
shaneajg | 063d0e0 | 2020-08-03 11:57:41 -0400 | [diff] [blame] | 101 | "//pw_stream", |
| 102 | "//pw_unit_test", |
shaneajg | 063d0e0 | 2020-08-03 11:57:41 -0400 | [diff] [blame] | 103 | ], |
| 104 | ) |
shaneajg | 0c52773 | 2020-08-07 11:51:25 -0400 | [diff] [blame] | 105 | |
| 106 | cc_test( |
Alexei Frolov | 5039a81 | 2021-01-20 15:14:06 -0800 | [diff] [blame] | 107 | name = "wire_packet_parser_test", |
| 108 | srcs = ["wire_packet_parser_test.cc"], |
| 109 | deps = [ |
| 110 | ":packet_parser", |
| 111 | "//pw_bytes", |
| 112 | ], |
| 113 | ) |
| 114 | |
| 115 | cc_test( |
Wyatt Hepler | d427aa3 | 2020-09-18 09:09:34 -0700 | [diff] [blame] | 116 | name = "rpc_channel_test", |
| 117 | srcs = ["rpc_channel_test.cc"], |
shaneajg | 0c52773 | 2020-08-07 11:51:25 -0400 | [diff] [blame] | 118 | deps = [ |
Alexei Frolov | d3e5cb7 | 2021-01-08 13:08:45 -0800 | [diff] [blame] | 119 | ":pw_hdlc", |
shaneajg | 0c52773 | 2020-08-07 11:51:25 -0400 | [diff] [blame] | 120 | "//pw_stream", |
| 121 | "//pw_unit_test", |
| 122 | ], |
| 123 | ) |