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_ring_buffer", 28 srcs = [ 29 "prefixed_entry_ring_buffer.cc", 30 ], 31 hdrs = [ 32 "public/pw_ring_buffer/prefixed_entry_ring_buffer.h", 33 ], 34 implementation_deps = [ 35 "//pw_assert:assert", 36 "//pw_assert:check", 37 ], 38 strip_include_prefix = "public", 39 deps = [ 40 "//pw_containers:intrusive_list", 41 "//pw_result", 42 "//pw_span", 43 "//pw_status", 44 "//pw_varint", 45 ], 46) 47 48pw_cc_test( 49 name = "prefixed_entry_ring_buffer_test", 50 srcs = ["prefixed_entry_ring_buffer_test.cc"], 51 deps = [ 52 ":pw_ring_buffer", 53 "//pw_assert:check", 54 "//pw_containers:vector", 55 "//pw_varint", 56 ], 57) 58 59sphinx_docs_library( 60 name = "docs", 61 srcs = [ 62 "docs.rst", 63 ], 64 prefix = "pw_ring_buffer/", 65 target_compatible_with = incompatible_with_mcu(), 66) 67