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_stream_uart_mcuxpresso", 26 srcs = ["stream.cc"], 27 hdrs = ["public/pw_stream_uart_mcuxpresso/stream.h"], 28 includes = ["public"], 29 target_compatible_with = [ 30 "//pw_build/constraints/board:mimxrt595_evk", 31 ], 32 deps = [ 33 "//pw_clock_tree", 34 "//pw_preprocessor", 35 "//pw_stream", 36 "@pigweed//targets:mcuxpresso_sdk", 37 ], 38) 39 40cc_library( 41 name = "pw_stream_uart_dma_mcuxpresso", 42 srcs = ["dma_stream.cc"], 43 hdrs = ["public/pw_stream_uart_mcuxpresso/dma_stream.h"], 44 includes = ["public"], 45 target_compatible_with = [ 46 "//pw_build/constraints/board:mimxrt595_evk", 47 ], 48 deps = [ 49 "//pw_clock_tree", 50 "//pw_preprocessor", 51 "//pw_stream", 52 "//pw_sync:interrupt_spin_lock", 53 "//pw_sync:thread_notification", 54 "@pigweed//targets:mcuxpresso_sdk", 55 ], 56) 57 58cc_library( 59 name = "interrupt_safe_writer", 60 srcs = ["interrupt_safe_writer.cc"], 61 hdrs = ["public/pw_stream_uart_mcuxpresso/interrupt_safe_writer.h"], 62 includes = ["public"], 63 target_compatible_with = [ 64 "//pw_build/constraints/board:mimxrt595_evk", 65 ], 66 deps = [ 67 "//pw_clock_tree", 68 "//pw_status", 69 "//pw_stream", 70 "@pigweed//targets:mcuxpresso_sdk", 71 ], 72) 73 74pw_cc_test( 75 name = "stream_test", 76 srcs = ["stream_test.cc"], 77 target_compatible_with = [ 78 "//pw_build/constraints/board:mimxrt595_evk", 79 ], 80 deps = [":pw_stream_uart_mcuxpresso"], 81) 82 83pw_cc_test( 84 name = "stream_example", 85 srcs = ["stream_example.cc"], 86 target_compatible_with = [ 87 "//pw_build/constraints/board:mimxrt595_evk", 88 ], 89 deps = [":pw_stream_uart_mcuxpresso"], 90) 91 92pw_cc_test( 93 name = "dma_stream_example", 94 srcs = ["dma_stream_example.cc"], 95 target_compatible_with = [ 96 "//pw_build/constraints/board:mimxrt595_evk", 97 ], 98 deps = [":pw_stream_uart_dma_mcuxpresso"], 99) 100 101pw_cc_test( 102 name = "interrupt_safe_writer_example", 103 srcs = ["interrupt_safe_writer_example.cc"], 104 target_compatible_with = [ 105 "//pw_build/constraints/board:mimxrt595_evk", 106 ], 107 deps = [":pw_stream_uart_interrupt_safe_writer_mcuxpresso"], 108) 109