mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-10 03:57:55 +00:00
nimble: Add meta-package for HCI transports
This patch makes net/nimble/transport a separate meta-package to allow select HCI transport via syscfg instead of explicitly adding dependency to particular transport package. The advantage of this approach is that the same application can be used on multiple targets, regardless of controller being used on target BSP. It is also fully backwards compatible since it is still possible to do it "the old way", i.e. add explicit dependency to particular transport package instead of meta-package. By default, combination of RAM transport and NimBLE controller is used which is default configuration for most existing apps. Each availble transport package has its own syscfg value: - BLE_HCI_TRANSPORT_EMSPI for net/nimble/transport/emspi - BLE_HCI_TRANSPORT_RAM for net/nimble/transport/ram - BLE_HCI_TRANSPORT_SOCKET for net/nimble/transport/socket - BLE_HCI_TRANSPORT_UART for net/nimble/transport/uart In addition there's dedicated value to use built-in NimBLE controller, which is most common usage and thus default setting: - BLE_HCI_TRANSPORT_NIMBLE_BUILTIN This is virtually the same as enabling RAM transport and adding package with NimBLE controller ( net/nimble/controller) manually, but since package is pulled by syscfg value it can be easily overriden in target settings. X-Original-Commit: e1f2888ab3d999a8a908bc1b5b843c17e13ea9ad
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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
|
||||
#
|
||||
# http://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.
|
||||
#
|
||||
|
||||
pkg.name: net/nimble/transport
|
||||
pkg.description: Meta-package for NimBLE HCI transport
|
||||
pkg.author: "Apache Mynewt <[email protected]>"
|
||||
pkg.homepage: "http://mynewt.apache.org/"
|
||||
pkg.keywords:
|
||||
- ble
|
||||
- bluetooth
|
||||
|
||||
pkg.deps.BLE_HCI_TRANSPORT_NIMBLE_BUILTIN:
|
||||
- net/nimble/transport/ram
|
||||
- net/nimble/controller
|
||||
|
||||
pkg.deps.BLE_HCI_TRANSPORT_EMSPI:
|
||||
- net/nimble/transport/emspi
|
||||
|
||||
pkg.deps.BLE_HCI_TRANSPORT_RAM:
|
||||
- net/nimble/transport/ram
|
||||
|
||||
pkg.deps.BLE_HCI_TRANSPORT_SOCKET:
|
||||
- net/nimble/transport/socket
|
||||
|
||||
pkg.deps.BLE_HCI_TRANSPORT_UART:
|
||||
- net/nimble/transport/uart
|
||||
@@ -0,0 +1,39 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you 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
|
||||
#
|
||||
# http://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.
|
||||
#
|
||||
|
||||
# Package: net/nimble/transport
|
||||
|
||||
syscfg.defs:
|
||||
BLE_HCI_TRANSPORT_NIMBLE_BUILTIN:
|
||||
description: >
|
||||
Enables HCI transport for built-in NimBLE controller.
|
||||
This is virtually the same as enabling RAM HCI transport and
|
||||
adding dependency to NimBLE controller package explicitly.
|
||||
value: 1
|
||||
BLE_HCI_TRANSPORT_EMSPI:
|
||||
description: Enables EM SPI HCI transport package
|
||||
value: 0
|
||||
BLE_HCI_TRANSPORT_RAM:
|
||||
description: Enables RAM HCI transport package
|
||||
value: 0
|
||||
BLE_HCI_TRANSPORT_SOCKET:
|
||||
description: Enables socket HCI transport package
|
||||
value: 0
|
||||
BLE_HCI_TRANSPORT_UART:
|
||||
description: Enables UART HCI transport package
|
||||
value: 0
|
||||
Reference in New Issue
Block a user