blob: cf1ecc3f593d9ab979fbac2bea9b6a677a60b2a1 [file] [log] [blame]
Rob Mohr57211c22019-11-18 15:26:35 -08001# 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 Mohr57211c22019-11-18 15:26:35 -080015load(
16 "//pw_build:pigweed.bzl",
Nathaniel Broughc2d57812021-04-18 22:52:00 +080017 "pw_cc_facade",
Rob Mohr57211c22019-11-18 15:26:35 -080018 "pw_cc_library",
19)
20
Rob Mohrc2787502019-11-19 09:50:42 -080021package(default_visibility = ["//visibility:public"])
22
23licenses(["notice"])
24
Nathaniel Broughc2d57812021-04-18 22:52:00 +080025pw_cc_facade(
Armando Montaneza79cb6a2019-11-20 12:18:27 -080026 name = "facade",
Armando Montanezf7a5a742020-03-02 14:58:59 -080027 hdrs = ["public/pw_sys_io/sys_io.h"],
Wyatt Hepler61def0a2020-01-06 10:30:14 -080028 includes = ["public"],
Rob Mohr57211c22019-11-18 15:26:35 -080029 deps = [
30 "//pw_span",
31 "//pw_status",
32 ],
33)
Armando Montaneza79cb6a2019-11-20 12:18:27 -080034
35pw_cc_library(
36 name = "default_putget_bytes",
Armando Montanezf7a5a742020-03-02 14:58:59 -080037 srcs = ["sys_io.cc"],
Armando Montaneza79cb6a2019-11-20 12:18:27 -080038 deps = [
39 ":facade",
40 "//pw_span",
41 "//pw_status",
42 ],
43)
44
45pw_cc_library(
Armando Montanezf7a5a742020-03-02 14:58:59 -080046 name = "pw_sys_io",
47 hdrs = ["public/pw_sys_io/sys_io.h"],
Armando Montaneza79cb6a2019-11-20 12:18:27 -080048 deps = [
49 ":facade",
Armando Montaneza79cb6a2019-11-20 12:18:27 -080050 "//pw_span",
51 "//pw_status",
Nathaniel Broughc2d57812021-04-18 22:52:00 +080052 "@pigweed_config//:pw_sys_io_backend",
Armando Montaneza79cb6a2019-11-20 12:18:27 -080053 ],
54)
Nathaniel Broughc2d57812021-04-18 22:52:00 +080055
56pw_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)