• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2021 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_library",
18    "pw_cc_test",
19)
20
21package(default_visibility = ["//visibility:public"])
22
23licenses(["notice"])
24
25pw_cc_library(
26    name = "pw_bytes",
27    srcs = [
28        "byte_builder.cc",
29    ],
30    hdrs = [
31        "public/pw_bytes/array.h",
32        "public/pw_bytes/byte_builder.h",
33        "public/pw_bytes/endian.h",
34        "public/pw_bytes/span.h",
35        "public/pw_bytes/units.h",
36    ],
37    includes = ["public"],
38    deps = [
39        ":bit",
40        "//pw_containers:iterator",
41        "//pw_polyfill",
42        "//pw_preprocessor",
43        "//pw_span",
44        "//pw_status",
45    ],
46)
47
48pw_cc_library(
49    name = "bit",
50    hdrs = ["public/pw_bytes/bit.h"],
51    includes = ["public"],
52)
53
54pw_cc_test(
55    name = "array_test",
56    srcs = ["array_test.cc"],
57    deps = [
58        ":pw_bytes",
59        "//pw_unit_test",
60    ],
61)
62
63pw_cc_test(
64    name = "bit_test",
65    srcs = ["bit_test.cc"],
66    deps = [
67        ":bit",
68        "//pw_unit_test",
69    ],
70)
71
72pw_cc_test(
73    name = "byte_builder_test",
74    srcs = ["byte_builder_test.cc"],
75    deps = [
76        ":pw_bytes",
77        "//pw_unit_test",
78    ],
79)
80
81pw_cc_test(
82    name = "endian_test",
83    srcs = ["endian_test.cc"],
84    deps = [
85        ":pw_bytes",
86        "//pw_unit_test",
87    ],
88)
89
90pw_cc_test(
91    name = "units_test",
92    srcs = ["units_test.cc"],
93    deps = [
94        ":pw_bytes",
95    ],
96)
97