Rob Mohr | 57211c2 | 2019-11-18 15:26:35 -0800 | [diff] [blame] | 1 | # Copyright 2019 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 | |
Rob Mohr | 57211c2 | 2019-11-18 15:26:35 -0800 | [diff] [blame] | 15 | load( |
| 16 | "//pw_build:pigweed.bzl", |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 17 | "pw_cc_facade", |
Rob Mohr | 57211c2 | 2019-11-18 15:26:35 -0800 | [diff] [blame] | 18 | "pw_cc_library", |
| 19 | ) |
| 20 | |
Rob Mohr | c278750 | 2019-11-19 09:50:42 -0800 | [diff] [blame] | 21 | package(default_visibility = ["//visibility:public"]) |
| 22 | |
| 23 | licenses(["notice"]) |
| 24 | |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 25 | pw_cc_facade( |
Armando Montanez | a79cb6a | 2019-11-20 12:18:27 -0800 | [diff] [blame] | 26 | name = "facade", |
Armando Montanez | f7a5a74 | 2020-03-02 14:58:59 -0800 | [diff] [blame] | 27 | hdrs = ["public/pw_sys_io/sys_io.h"], |
Wyatt Hepler | 61def0a | 2020-01-06 10:30:14 -0800 | [diff] [blame] | 28 | includes = ["public"], |
Rob Mohr | 57211c2 | 2019-11-18 15:26:35 -0800 | [diff] [blame] | 29 | deps = [ |
| 30 | "//pw_span", |
| 31 | "//pw_status", |
| 32 | ], |
| 33 | ) |
Armando Montanez | a79cb6a | 2019-11-20 12:18:27 -0800 | [diff] [blame] | 34 | |
| 35 | pw_cc_library( |
| 36 | name = "default_putget_bytes", |
Armando Montanez | f7a5a74 | 2020-03-02 14:58:59 -0800 | [diff] [blame] | 37 | srcs = ["sys_io.cc"], |
Armando Montanez | a79cb6a | 2019-11-20 12:18:27 -0800 | [diff] [blame] | 38 | deps = [ |
| 39 | ":facade", |
| 40 | "//pw_span", |
| 41 | "//pw_status", |
| 42 | ], |
| 43 | ) |
| 44 | |
| 45 | pw_cc_library( |
Armando Montanez | f7a5a74 | 2020-03-02 14:58:59 -0800 | [diff] [blame] | 46 | name = "pw_sys_io", |
| 47 | hdrs = ["public/pw_sys_io/sys_io.h"], |
Armando Montanez | a79cb6a | 2019-11-20 12:18:27 -0800 | [diff] [blame] | 48 | deps = [ |
| 49 | ":facade", |
Armando Montanez | a79cb6a | 2019-11-20 12:18:27 -0800 | [diff] [blame] | 50 | "//pw_span", |
| 51 | "//pw_status", |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 52 | "@pigweed_config//:pw_sys_io_backend", |
Armando Montanez | a79cb6a | 2019-11-20 12:18:27 -0800 | [diff] [blame] | 53 | ], |
| 54 | ) |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 55 | |
| 56 | pw_cc_library( |
| 57 | name = "backend_multiplexer", |
| 58 | visibility = ["@pigweed_config//:__pkg__"], |
| 59 | deps = select({ |
| 60 | "//pw_build/constraints/chipset:stm32f429": ["@pigweed//pw_sys_io_baremetal_stm32f429"], |
| 61 | "//pw_build/constraints/chipset:lm3s6965evb": ["@pigweed//pw_sys_io_baremetal_lm3s6965evb"], |
| 62 | "//conditions:default": ["@pigweed//pw_sys_io_stdio"], |
| 63 | }), |
| 64 | ) |