blob: bb414f5bab83fab471a497a9056e1ed0d3f03066 [file] [log] [blame] [edit]
package(default_visibility = ["//visibility:public"])
# Picotool requires this, so it should work on host as well as rp2.
cc_library(
name = "reset_interface_headers",
hdrs = ["include/pico/stdio_usb/reset_interface.h"],
includes = ["include"],
deps = ["//src/common/pico_usb_reset_interface"],
)
cc_library(
name = "tusb_config",
hdrs = ["include/tusb_config.h"],
includes = ["include"],
target_compatible_with = select({
"//bazel/constraint:rp2": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
)
cc_library(
name = "pico_stdio_usb_headers",
hdrs = ["include/pico/stdio_usb.h"],
includes = ["include"],
target_compatible_with = select({
"//bazel/constraint:rp2": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
visibility = [
":__pkg__",
"//src/rp2_common/tinyusb:__pkg__",
],
)
cc_library(
name = "pico_stdio_usb",
srcs = [
"reset_interface.c",
"stdio_usb.c",
"stdio_usb_descriptors.c",
],
target_compatible_with = [
"//bazel/constraint:stdio_usb",
] + select({
"//bazel/constraint:rp2": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
deps = [
":pico_stdio_usb_headers",
":reset_interface_headers",
"//src/common/pico_binary_info",
"//src/common/pico_sync",
"//src/rp2_common/hardware_irq",
"//src/rp2_common/hardware_watchdog",
"//src/rp2_common/pico_bootrom",
"//src/rp2_common/pico_stdio:pico_stdio_headers",
"//src/rp2_common/pico_unique_id",
"@tinyusb",
],
# Ensure `stdio_usb_descriptors.c` isn't affected by link order.
alwayslink = True,
)