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( 16 "//pw_build:pigweed.bzl", 17 "pw_cc_test", 18) 19 20package(default_visibility = ["//visibility:public"]) 21 22licenses(["notice"]) 23 24cc_library( 25 name = "pw_spi_mcuxpresso", 26 srcs = [ 27 "flexio_spi.cc", 28 "spi.cc", 29 ], 30 hdrs = [ 31 "public/pw_spi_mcuxpresso/flexio_spi.h", 32 "public/pw_spi_mcuxpresso/spi.h", 33 ], 34 includes = ["public"], 35 target_compatible_with = [ 36 "//pw_build/constraints/board:mimxrt595_evk", 37 ], 38 deps = [ 39 "//pw_digital_io", 40 "//pw_log", 41 "//pw_preprocessor", 42 "//pw_spi:chip_selector", 43 "//pw_spi:initiator", 44 "//pw_sync:binary_semaphore", 45 "//pw_sync:mutex", 46 "@pigweed//targets:mcuxpresso_sdk", 47 ], 48) 49 50cc_library( 51 name = "responder", 52 srcs = ["responder.cc"], 53 hdrs = [ 54 "public/pw_spi_mcuxpresso/responder.h", 55 ], 56 includes = ["public"], 57 target_compatible_with = [ 58 "//pw_build/constraints/chipset:imxrt500", 59 ], 60 deps = [ 61 "//pw_dma_mcuxpresso", 62 "//pw_function", 63 "//pw_log", 64 "//pw_spi:initiator", 65 "//pw_spi:responder", 66 "//pw_status", 67 "//targets:mcuxpresso_sdk", 68 "//third_party/fuchsia:stdcompat", 69 ], 70) 71 72pw_cc_test( 73 name = "spi_test", 74 srcs = ["spi_test.cc"], 75 target_compatible_with = [ 76 "//pw_build/constraints/board:mimxrt595_evk", 77 ], 78 deps = [":pw_digital_io_mcuxpresso"], 79) 80 81pw_cc_test( 82 name = "flexio_spi_test", 83 srcs = ["flexio_spi_test.cc"], 84 target_compatible_with = [ 85 "//pw_build/constraints/board:mimxrt595_evk", 86 ], 87 deps = [":pw_digital_io_mcuxpresso"], 88) 89