1# Copyright 2021 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/module_config.gni") 18import("$dir_pw_build/target_types.gni") 19import("$dir_pw_docgen/docs.gni") 20import("$dir_pw_third_party/stm32cube/stm32cube.gni") 21import("$dir_pw_unit_test/test.gni") 22 23declare_args() { 24 # The build target that overrides the default configuration options for this 25 # module. This should point to a source set that provides defines through a 26 # public config (which may -include a file or add defines directly). 27 pw_sys_io_stm32cube_CONFIG = pw_build_DEFAULT_MODULE_CONFIG 28} 29 30config("public_includes") { 31 include_dirs = [ "public" ] 32} 33 34pw_source_set("config") { 35 public_deps = [ pw_sys_io_stm32cube_CONFIG ] 36 public = [ "pw_sys_io_stm32cube_private/config.h" ] 37 visibility = [ ":*" ] 38} 39 40pw_source_set("pw_sys_io_stm32cube") { 41 public_configs = [ ":public_includes" ] 42 public_deps = [ 43 "$dir_pw_preprocessor", 44 "$dir_pw_status", 45 ] 46 if (dir_pw_third_party_stm32cube != "") { 47 public_deps += [ "$dir_pw_third_party/stm32cube" ] 48 } 49 public = [ "public/pw_sys_io_stm32cube/init.h" ] 50 sources = [ "sys_io.cc" ] 51 deps = [ 52 ":config", 53 "$dir_pw_sys_io:default_putget_bytes", 54 "$dir_pw_sys_io:facade", 55 ] 56} 57 58pw_doc_group("docs") { 59 sources = [ "docs.rst" ] 60} 61 62pw_test_group("tests") { 63} 64