Skip to content

Commit

Permalink
pw_bluetooth_sapphire: Copybara import of FIDL code
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 7be7343b906dad28fd475dbe26d3d02571545b68
Change-Id: Ic25c0f2799e943889812f7b8ab6eae98be2a148f
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/230711
Lint: Lint 🤖 <[email protected]>
Reviewed-by: Ben Lawson <[email protected]>
Reviewed-by: Ted Pudlik <[email protected]>
Presubmit-Verified: CQ Bot Account <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
Pigweed-Auto-Submit: Ben Lawson <[email protected]>
  • Loading branch information
jasongraffius authored and CQ Bot Account committed Sep 9, 2024
1 parent 1247e8d commit 8a65546
Show file tree
Hide file tree
Showing 76 changed files with 33,358 additions and 9 deletions.
16 changes: 8 additions & 8 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,16 @@ test --test_output=errors
# linux-amd64. This is the only platform that the Fuchsia SDK supports.
common --enable_platform_specific_config
# Incompatible host platforms.
common:macos --deleted_packages=//pw_bluetooth_sapphire/fuchsia/...,//pw_async_fuchsia/...
common:windows --deleted_packages=//pw_bluetooth_sapphire/fuchsia/...,//pw_async_fuchsia/...
common:macos --deleted_packages=//pw_bluetooth_sapphire/fuchsia/...
common:windows --deleted_packages=//pw_bluetooth_sapphire/fuchsia/...
# Target build configurations for which @fuchsia_sdk is irrelevant and thus
# targets should be pruned to avoid fetching @fuchsia_sdk.
common:rp2350 --deleted_packages=//pw_bluetooth_sapphire/fuchsia/...,//pw_async_fuchsia/...
common:rp2040 --deleted_packages=//pw_bluetooth_sapphire/fuchsia/...,//pw_async_fuchsia/...
common:stm32f429i_baremetal --deleted_packages=//pw_bluetooth_sapphire/fuchsia/...,//pw_async_fuchsia/...
common:stm32f429i_freertos --deleted_packages=//pw_bluetooth_sapphire/fuchsia/...,//pw_async_fuchsia/...
common:lm3s6965evb --deleted_packages=//pw_bluetooth_sapphire/fuchsia/...,//pw_async_fuchsia/...
common:microbit --deleted_packages=//pw_bluetooth_sapphire/fuchsia/...,//pw_async_fuchsia/...
common:rp2350 --deleted_packages=//pw_bluetooth_sapphire/fuchsia/...
common:rp2040 --deleted_packages=//pw_bluetooth_sapphire/fuchsia/...
common:stm32f429i_baremetal --deleted_packages=//pw_bluetooth_sapphire/fuchsia/...
common:stm32f429i_freertos --deleted_packages=//pw_bluetooth_sapphire/fuchsia/...
common:lm3s6965evb --deleted_packages=//pw_bluetooth_sapphire/fuchsia/...
common:microbit --deleted_packages=//pw_bluetooth_sapphire/fuchsia/...

# Import `--config=fuchsia` scoped pigweed backends.
import %workspace%/pw_bluetooth_sapphire/fuchsia/backends.bazelrc
Expand Down
1 change: 1 addition & 0 deletions pw_async_fuchsia/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ cc_library(
"public",
"public_overrides",
],
target_compatible_with = ["@platforms//os:fuchsia"],
deps = [
":util",
"//pw_async:task_facade",
Expand Down
3 changes: 3 additions & 0 deletions pw_bluetooth_sapphire/fuchsia/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ qemu_tests = [
"//pw_bluetooth_sapphire/fuchsia/bt_host:unittest_pkg",
"//pw_bluetooth_sapphire/fuchsia/host/att:test_pkg",
"//pw_bluetooth_sapphire/fuchsia/host/common:test_pkg",
"//pw_bluetooth_sapphire/fuchsia/host/controllers:test_pkg",
"//pw_bluetooth_sapphire/fuchsia/host/fidl:test_pkg",
"//pw_bluetooth_sapphire/fuchsia/host/gap:test_pkg",
"//pw_bluetooth_sapphire/fuchsia/host/gatt:test_pkg",
"//pw_bluetooth_sapphire/fuchsia/host/hci:test_pkg",
Expand All @@ -39,6 +41,7 @@ qemu_tests = [
"//pw_bluetooth_sapphire/fuchsia/host/sco:test_pkg",
"//pw_bluetooth_sapphire/fuchsia/host/sdp:test_pkg",
"//pw_bluetooth_sapphire/fuchsia/host/sm:test_pkg",
"//pw_bluetooth_sapphire/fuchsia/host/socket:test_pkg",
"//pw_bluetooth_sapphire/fuchsia/host/testing:test_pkg",
"//pw_bluetooth_sapphire/fuchsia/host/transport:test_pkg",
"//pw_bluetooth_sapphire/fuchsia/lib/fidl:test_pkg",
Expand Down
99 changes: 99 additions & 0 deletions pw_bluetooth_sapphire/fuchsia/host/controllers/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Copyright 2024 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.

load(
"@fuchsia_sdk//fuchsia:defs.bzl",
"fuchsia_cc_test",
"fuchsia_unittest_package",
)

package(default_visibility = ["//visibility:public"])

cc_library(
name = "public",
hdrs = [
"public/pw_bluetooth_sapphire/fuchsia/host/controllers/fidl_controller.h",
"public/pw_bluetooth_sapphire/fuchsia/host/controllers/helpers.h",
],
includes = [
"public",
],
tags = ["manual"],
)

cc_library(
name = "controllers",
deps = [
":fidl_controller",
],
)

cc_library(
name = "helpers",
srcs = [
"helpers.cc",
],
deps = [
":public",
"@fuchsia_sdk//pkg/zx",
"@pigweed//pw_bluetooth",
],
)

cc_library(
name = "fidl_controller",
srcs = [
"fidl_controller.cc",
],
deps = [
":helpers",
":public",
"//pw_bluetooth_sapphire/host/common",
"//pw_bluetooth_sapphire/host/iso",
"//pw_bluetooth_sapphire/host/transport",
"@fuchsia_sdk//fidl/fuchsia.hardware.bluetooth:fuchsia.hardware.bluetooth_cpp",
"@fuchsia_sdk//pkg/async-cpp",
"@fuchsia_sdk//pkg/zx",
"@pigweed//pw_bluetooth",
],
)

fuchsia_cc_test(
name = "controllers_test",
testonly = True,
srcs = [
"fidl_controller_test.cc",
],
death_unittest = True,
visibility = ["//visibility:public"],
deps = [
":controllers",
"//pw_bluetooth_sapphire/fuchsia/host/fidl:fake_vendor_server",
"//pw_bluetooth_sapphire/host/testing",
"//pw_bluetooth_sapphire/host/testing:gtest_main",
"//pw_bluetooth_sapphire/host/testing:loop_fixture",
"//pw_bluetooth_sapphire/host/testing:test_helpers",
],
)

fuchsia_unittest_package(
name = "test_pkg",
package_name = "controllers_tests",
testonly = True,
fuchsia_api_level = "23",
unit_tests = [
":controllers_test",
],
visibility = ["//visibility:public"],
)
Loading

0 comments on commit 8a65546

Please sign in to comment.