blob: b6463574f3a3dfd51943bd7f7fd95b8b17460289 [file] [log] [blame]
Wyatt Hepler2ad60672020-01-21 08:00:16 -08001# 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(
16 "//pw_build:pigweed.bzl",
17 "pw_cc_library",
18 "pw_cc_test",
19)
20
21package(default_visibility = ["//visibility:public"])
22
23licenses(["notice"]) # Apache License 2.0
24
25pw_cc_library(
26 name = "pw_kvs",
27 srcs = [
28 "flash.cc",
29 "key_value_store.cc",
30 ],
31 hdrs = [
32 "public/pw_kvs/assert.h",
33 "public/pw_kvs/flash.h",
34 "public/pw_kvs/flash_memory.h",
35 "public/pw_kvs/in_memory_fake_flash.h",
36 "public/pw_kvs/key_value_store.h",
37 "public/pw_kvs/partition_table_entry.h",
38 ],
39 includes = ["public"],
40 deps = [
41 "//pw_checksum",
42 "//pw_log",
43 "//pw_status",
44 "//pw_string",
45 ],
46)
47
48pw_cc_test(
49 name = "key_value_store_test",
50 srcs = ["key_value_store_test.cc"],
51 deps = [
52 ":pw_kvs",
53 "//pw_checksum",
54 "//pw_log",
55 ],
56)
57
58pw_cc_test(
59 name = "key_value_store_sub_sector_test",
60 srcs = ["key_value_store_sub_sector_test.cc"],
61 deps = [
62 ":pw_kvs",
63 "//pw_checksum",
64 "//pw_log",
65 ],
66)