1# Copyright 2023 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("//pw_unit_test:pw_cc_test.bzl", "pw_cc_test") 16 17package(default_visibility = ["//visibility:public"]) 18 19licenses(["notice"]) 20 21cc_library( 22 name = "spi", 23 srcs = [ 24 "spi.cc", 25 ], 26 hdrs = [ 27 "public/pw_spi_mcuxpresso/spi.h", 28 ], 29 strip_include_prefix = "public", 30 target_compatible_with = [ 31 "//pw_build/constraints/board:mimxrt595_evk", 32 ], 33 deps = [ 34 "//pw_assert", 35 "//pw_chrono:system_clock", 36 "//pw_log", 37 "//pw_spi:chip_selector", 38 "//pw_spi:initiator", 39 "//pw_status", 40 "//pw_sync:binary_semaphore", 41 "//pw_sync:lock_annotations", 42 "//pw_sync:mutex", 43 "//targets:mcuxpresso_sdk", 44 ], 45) 46 47cc_library( 48 name = "flexio_spi", 49 srcs = [ 50 "flexio_spi.cc", 51 ], 52 hdrs = [ 53 "public/pw_spi_mcuxpresso/flexio_spi.h", 54 ], 55 strip_include_prefix = "public", 56 target_compatible_with = [ 57 "//pw_build/constraints/board:mimxrt595_evk", 58 ], 59 deps = [ 60 "//pw_digital_io", 61 "//pw_log", 62 "//pw_spi:chip_selector", 63 "//pw_spi:initiator", 64 "//pw_status", 65 "//pw_sync:binary_semaphore", 66 "//pw_sync:lock_annotations", 67 "//pw_sync:mutex", 68 "//targets:mcuxpresso_sdk", 69 ], 70) 71 72cc_library( 73 name = "responder", 74 srcs = ["responder.cc"], 75 hdrs = [ 76 "public/pw_spi_mcuxpresso/responder.h", 77 ], 78 strip_include_prefix = "public", 79 target_compatible_with = [ 80 "//pw_build/constraints/chipset:imxrt500", 81 ], 82 deps = [ 83 "//pw_dma_mcuxpresso", 84 "//pw_function", 85 "//pw_log", 86 "//pw_spi:initiator", 87 "//pw_spi:responder", 88 "//pw_status", 89 "//targets:mcuxpresso_sdk", 90 "//third_party/fuchsia:stdcompat", 91 ], 92) 93 94pw_cc_test( 95 name = "spi_test", 96 srcs = ["spi_test.cc"], 97 target_compatible_with = [ 98 "//pw_build/constraints/board:mimxrt595_evk", 99 ], 100 deps = [ 101 ":spi", 102 "//pw_spi:device", 103 ], 104) 105 106pw_cc_test( 107 name = "flexio_spi_test", 108 srcs = ["flexio_spi_test.cc"], 109 target_compatible_with = [ 110 "//pw_build/constraints/board:mimxrt595_evk", 111 ], 112 deps = [":flexio_spi"], 113) 114