• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("@rules_cc//cc:cc_library.bzl", "cc_library")
16load("@rules_python//sphinxdocs:sphinx_docs_library.bzl", "sphinx_docs_library")
17load("//pw_build:compatibility.bzl", "incompatible_with_mcu")
18load("//pw_unit_test:pw_cc_test.bzl", "pw_cc_test")
19
20package(
21    default_visibility = ["//visibility:public"],
22)
23
24licenses(["notice"])
25
26cc_library(
27    name = "pw_hex_dump",
28    srcs = [
29        "hex_dump.cc",
30    ],
31    hdrs = [
32        "public/pw_hex_dump/hex_dump.h",
33    ],
34    strip_include_prefix = "public",
35    deps = [
36        "//pw_bytes",
37        "//pw_span",
38        "//pw_status",
39        "//pw_string:builder",
40        "//pw_string:to_string",
41    ],
42)
43
44pw_cc_test(
45    name = "hex_dump_test",
46    srcs = [
47        "hex_dump_test.cc",
48    ],
49    deps = [
50        ":pw_hex_dump",
51        "//pw_log",
52        "//pw_span",
53    ],
54)
55
56cc_library(
57    name = "log_bytes",
58    srcs = [],
59    hdrs = [
60        "public/pw_hex_dump/log_bytes.h",
61    ],
62    strip_include_prefix = "public",
63    deps = [
64        ":pw_hex_dump",
65        "//pw_bytes",
66        "//pw_log",
67    ],
68)
69
70pw_cc_test(
71    name = "log_bytes_test",
72    srcs = [
73        "log_bytes_test.cc",
74    ],
75    deps = [
76        ":log_bytes",
77        "//pw_log",
78        "//pw_span",
79    ],
80)
81
82filegroup(
83    name = "doxygen",
84    srcs = [
85        "public/pw_hex_dump/hex_dump.h",
86        "public/pw_hex_dump/log_bytes.h",
87    ],
88)
89
90sphinx_docs_library(
91    name = "docs",
92    srcs = [
93        "api.rst",
94        "docs.rst",
95    ],
96    prefix = "pw_hex_dump/",
97    target_compatible_with = incompatible_with_mcu(),
98)
99