• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2022 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(default_visibility = ["//visibility:public"])
21
22licenses(["notice"])
23
24cc_library(
25    name = "pw_i2c_mcuxpresso",
26    srcs = ["initiator.cc"],
27    hdrs = ["public/pw_i2c_mcuxpresso/initiator.h"],
28    strip_include_prefix = "public",
29    deps = [
30        "//pw_chrono:system_clock",
31        "//pw_i2c:address",
32        "//pw_i2c:initiator",
33        "//pw_status",
34        "//pw_sync:interrupt_spin_lock",
35        "//pw_sync:lock_annotations",
36        "//pw_sync:mutex",
37        "//pw_sync:timed_thread_notification",
38        "//targets:mcuxpresso_sdk",
39    ],
40)
41
42pw_cc_test(
43    name = "initiator_test",
44    srcs = ["initiator_test.cc"],
45    deps = [":pw_i2c_mcuxpresso"],
46)
47
48cc_library(
49    name = "i3c_ccc",
50    hdrs = [
51        "public/pw_i2c_mcuxpresso/i3c_ccc.h",
52    ],
53    strip_include_prefix = "public",
54)
55
56cc_library(
57    name = "i3c_initiator",
58    srcs = ["i3c_initiator.cc"],
59    hdrs = [
60        "public/pw_i2c_mcuxpresso/i3c_initiator.h",
61    ],
62    strip_include_prefix = "public",
63    deps = [
64        ":i3c_ccc",
65        "//pw_bytes",
66        "//pw_chrono:system_clock",
67        "//pw_containers:vector",
68        "//pw_i2c:address",
69        "//pw_i2c:initiator",
70        "//pw_log",
71        "//pw_status",
72        "//pw_sync:mutex",
73        "//targets:mcuxpresso_sdk",
74        "//third_party/fuchsia:stdcompat",
75    ],
76)
77
78sphinx_docs_library(
79    name = "docs",
80    srcs = [
81        "docs.rst",
82    ],
83    prefix = "pw_i2c_mcuxpresso/",
84    target_compatible_with = incompatible_with_mcu(),
85)
86