• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15import("//build_overrides/pigweed.gni")
16
17import("$dir_pw_build/target_types.gni")
18import("$dir_pw_docgen/docs.gni")
19import("$dir_pw_third_party/mcuxpresso/mcuxpresso.gni")
20import("$dir_pw_toolchain/generate_toolchain.gni")
21import("$dir_pw_unit_test/test.gni")
22
23config("default_config") {
24  include_dirs = [ "public" ]
25}
26
27if (pw_third_party_mcuxpresso_SDK != "") {
28  pw_source_set("pw_digital_io_mcuxpresso") {
29    public_configs = [ ":default_config" ]
30    public = [
31      "public/pw_digital_io_mcuxpresso/digital_io.h",
32      "public/pw_digital_io_mcuxpresso/interrupt_controller.h",
33      "public/pw_digital_io_mcuxpresso/interrupt_line.h",
34    ]
35    public_deps = [
36      "$dir_pw_digital_io",
37      "$dir_pw_result",
38      "$dir_pw_status",
39      "$dir_pw_sync:borrow",
40      "$pw_third_party_mcuxpresso_SDK",
41    ]
42    deps = [ "$dir_pw_assert" ]
43    sources = [
44      "digital_io.cc",
45      "interrupt_controller.cc",
46      "interrupt_line.cc",
47    ]
48  }
49}
50
51pw_test("mimxrt595_test") {
52  enable_if =
53      pw_third_party_mcuxpresso_SDK == "//targets/mimxrt595_evk_freertos:sdk" &&
54      (pw_toolchain_SCOPE.name == "mimxrt595_evk_freertos_debug" ||
55       pw_toolchain_SCOPE.name == "mimxrt595_evk_freertos_size_optimized" ||
56       pw_toolchain_SCOPE.name == "mimxrt595_evk_freertos_speed_optimized")
57  sources = [ "mimxrt595_test.cc" ]
58  deps = [
59    ":pw_digital_io_mcuxpresso",
60    "//targets/mimxrt595_evk_freertos:sdk",
61  ]
62}
63
64pw_test_group("tests") {
65  tests = [ ":mimxrt595_test" ]
66}
67
68pw_doc_group("docs") {
69  sources = [ "docs.rst" ]
70}
71