mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-07-30 06:37:55 +00:00
Use syscfg settings for sysinit stage numbers
This allows the app or target to rearrange package initialization order via syscfg overrides. Note: This requires an updated version of newt (https://github.com/apache/mynewt-newt/pull/230). Older versions of newt fail to parse the updated `pkg.yml` files.
This commit is contained in:
committed by
ccollins476ad
parent
15b1e4345c
commit
55c500325c
@@ -35,4 +35,4 @@ pkg.deps:
|
||||
- nimble
|
||||
|
||||
pkg.init:
|
||||
ble_ll_init: 250
|
||||
ble_ll_init: 'MYNEWT_VAL(BLE_LL_SYSINIT_STAGE)'
|
||||
|
||||
@@ -298,6 +298,11 @@ syscfg.defs:
|
||||
line number where assertion occured.
|
||||
value: 0
|
||||
|
||||
BLE_LL_SYSINIT_STAGE:
|
||||
description: >
|
||||
Sysinit stage for the NimBLE controller.
|
||||
value: 250
|
||||
|
||||
syscfg.vals.BLE_LL_CFG_FEAT_LL_EXT_ADV:
|
||||
BLE_LL_CFG_FEAT_LE_CSA2: 1
|
||||
BLE_HW_WHITELIST_ENABLE: 0
|
||||
|
||||
@@ -45,5 +45,5 @@ pkg.req_apis:
|
||||
- stats
|
||||
|
||||
pkg.init:
|
||||
bt_mesh_register_gatt: 500
|
||||
ble_mesh_shell_init: 1000
|
||||
bt_mesh_register_gatt: 'MYNEWT_VAL(BLE_MESH_SYSINIT_STAGE)'
|
||||
ble_mesh_shell_init: 'MYNEWT_VAL(BLE_MESH_SYSINIT_STAGE_2)'
|
||||
|
||||
@@ -514,6 +514,16 @@ syscfg.defs:
|
||||
This value defines BLE Mesh device/node name.
|
||||
value: '"nimble-mesh-node"'
|
||||
|
||||
BLE_MESH_SYSINIT_STAGE:
|
||||
description: >
|
||||
Primary sysinit stage for BLE mesh functionality.
|
||||
value: 500
|
||||
|
||||
BLE_MESH_SYSINIT_STAGE_2:
|
||||
description: >
|
||||
Secondary sysinit stage for BLE mesh functionality.
|
||||
value: 1000
|
||||
|
||||
syscfg.vals.BLE_MESH_SHELL:
|
||||
BLE_MESH_CFG_CLI: 1
|
||||
BLE_MESH_HEALTH_CLI: 1
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ pkg.req_apis:
|
||||
- stats
|
||||
|
||||
pkg.init:
|
||||
ble_hs_init: 200
|
||||
ble_hs_init: 'MYNEWT_VAL(BLE_HS_SYSINIT_STAGE)'
|
||||
|
||||
pkg.down.BLE_HS_STOP_ON_SHUTDOWN:
|
||||
ble_hs_shutdown: 200
|
||||
|
||||
@@ -31,4 +31,4 @@ pkg.deps:
|
||||
- nimble/host
|
||||
|
||||
pkg.init:
|
||||
ble_svc_ans_init: 303
|
||||
ble_svc_ans_init: 'MYNEWT_VAL(BLE_SVC_ANS_SYSINIT_STAGE)'
|
||||
|
||||
@@ -23,3 +23,8 @@ syscfg.defs:
|
||||
BLE_SVC_ANS_UNR_ALERT_CAT:
|
||||
description: "Initial supported unread alert category bitmask."
|
||||
value: 0
|
||||
|
||||
BLE_SVC_ANS_SYSINIT_STAGE:
|
||||
description: >
|
||||
Sysinit stage for the alert notification service.
|
||||
value: 303
|
||||
|
||||
@@ -31,4 +31,4 @@ pkg.deps:
|
||||
- nimble/host
|
||||
|
||||
pkg.init:
|
||||
ble_svc_bas_init: 303
|
||||
ble_svc_bas_init: 'MYNEWT_VAL(BLE_SVC_BAS_SYSINIT_STAGE)'
|
||||
|
||||
@@ -28,3 +28,7 @@ syscfg.defs:
|
||||
description: >
|
||||
Set to 1 to support notification or 0 to disable it.
|
||||
value: 1
|
||||
BLE_SVC_BAS_SYSINIT_STAGE:
|
||||
description: >
|
||||
Sysinit stage for the battery level service.
|
||||
value: 303
|
||||
|
||||
@@ -34,4 +34,4 @@ pkg.req_apis:
|
||||
- console
|
||||
|
||||
pkg.init:
|
||||
bleuart_init: 500
|
||||
bleuart_init: 'MYNEWT_VAL(BLEUART_SYSINIT_STAGE)'
|
||||
|
||||
@@ -22,3 +22,7 @@ syscfg.defs:
|
||||
The size of the largest line that can be received over the UART
|
||||
service.
|
||||
value: 120
|
||||
BLEUART_SYSINIT_STAGE:
|
||||
description: >
|
||||
Sysinit stage for the BLE UART service.
|
||||
value: 500
|
||||
|
||||
@@ -31,4 +31,4 @@ pkg.deps:
|
||||
- nimble/host
|
||||
|
||||
pkg.init:
|
||||
ble_svc_dis_init: 303
|
||||
ble_svc_dis_init: 'MYNEWT_VAL(BLE_SVC_DIS_SYSINIT_STAGE)'
|
||||
|
||||
@@ -92,3 +92,7 @@ syscfg.defs:
|
||||
Defines a default value for "Manufacturer name" if not set with
|
||||
'ble_svc_dis_manufacturer_name_set'.
|
||||
value: NULL
|
||||
BLE_SVC_DIS_SYSINIT_STAGE:
|
||||
description: >
|
||||
Sysinit stage for the device information BLE service.
|
||||
value: 303
|
||||
|
||||
@@ -31,4 +31,4 @@ pkg.deps:
|
||||
- nimble/host
|
||||
|
||||
pkg.init:
|
||||
ble_svc_gap_init: 301
|
||||
ble_svc_gap_init: 'MYNEWT_VAL(BLE_SVC_GAP_SYSINIT_STAGE)'
|
||||
|
||||
@@ -76,3 +76,8 @@ syscfg.defs:
|
||||
by Core specification 5.0, Vol 3, Part C, section 12.
|
||||
Set to '-1' to disable.
|
||||
value: -1
|
||||
|
||||
BLE_SVC_GAP_SYSINIT_STAGE:
|
||||
description: >
|
||||
Sysinit stage for the GAP BLE service.
|
||||
value: 301
|
||||
|
||||
@@ -31,4 +31,4 @@ pkg.deps:
|
||||
- nimble/host
|
||||
|
||||
pkg.init:
|
||||
ble_svc_gatt_init: 302
|
||||
ble_svc_gatt_init: 'MYNEWT_VAL(BLE_SVC_GATT_SYSINIT_STAGE)'
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
syscfg.defs:
|
||||
BLE_SVC_GATT_SYSINIT_STAGE:
|
||||
description: >
|
||||
Sysinit stage for the GATT BLE service
|
||||
value: 302
|
||||
@@ -31,4 +31,4 @@ pkg.deps:
|
||||
- nimble/host
|
||||
|
||||
pkg.init:
|
||||
ble_svc_ias_init: 303
|
||||
ble_svc_ias_init: 'MYNEWT_VAL(BLE_SVC_IAS_SYSINIT_STAGE)'
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# 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.
|
||||
#
|
||||
|
||||
syscfg.defs:
|
||||
BLE_SVC_IAS_SYSINIT_STAGE:
|
||||
description: >
|
||||
Sysinit stage for the immediate alert BLE service.
|
||||
value: 303
|
||||
@@ -31,4 +31,4 @@ pkg.deps:
|
||||
- nimble/host
|
||||
|
||||
pkg.init:
|
||||
ble_svc_lls_init: 303
|
||||
ble_svc_lls_init: 'MYNEWT_VAL(BLE_SVC_LLS_SYSINIT_STAGE)'
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# 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.
|
||||
|
||||
syscfg.defs:
|
||||
BLE_SVC_LLS_SYSINIT_STAGE:
|
||||
description: >
|
||||
Sysinit stage for the link loss BLE service.
|
||||
value: 303
|
||||
@@ -31,4 +31,4 @@ pkg.deps:
|
||||
- nimble/host
|
||||
|
||||
pkg.init:
|
||||
ble_svc_tps_init: 303
|
||||
ble_svc_tps_init: 'MYNEWT_VAL(BLE_SVC_TPS_SYSINIT_STAGE)'
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# 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.
|
||||
|
||||
syscfg.defs:
|
||||
BLE_SVC_TPS_SYSINIT_STAGE:
|
||||
description: >
|
||||
Sysinit stage for the transmit power BLE service.
|
||||
value: 303
|
||||
|
||||
@@ -35,4 +35,4 @@ pkg.deps.BLE_STORE_CONFIG_PERSIST:
|
||||
- "@apache-mynewt-core/sys/config"
|
||||
|
||||
pkg.init:
|
||||
ble_store_config_init: 500
|
||||
ble_store_config_init: 'MYNEWT_VAL(BLE_STORE_SYSINIT_STAGE)'
|
||||
|
||||
@@ -21,3 +21,7 @@ syscfg.defs:
|
||||
description: >
|
||||
Whether to save data to sys/config, or just keep it in RAM.
|
||||
value: 1
|
||||
BLE_STORE_SYSINIT_STAGE:
|
||||
description: >
|
||||
Sysinit stage for BLE host store.
|
||||
value: 500
|
||||
|
||||
@@ -34,4 +34,4 @@ pkg.deps:
|
||||
- nimble/host
|
||||
|
||||
pkg.init:
|
||||
ble_store_ram_init: 500
|
||||
ble_store_ram_init: 'MYNEWT_VAL(BLE_STORE_RAM_SYSINIT_STAGE)'
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# 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.
|
||||
|
||||
syscfg.defs:
|
||||
BLE_STORE_RAM_SYSINIT_STAGE:
|
||||
description: >
|
||||
Sysinit stage for the RAM BLE store.
|
||||
value: 500
|
||||
|
||||
@@ -428,6 +428,10 @@ syscfg.defs:
|
||||
entails aborting all GAP procedures and terminating open
|
||||
connections.
|
||||
value: 1
|
||||
BLE_HS_SYSINIT_STAGE:
|
||||
description: >
|
||||
Sysinit stage for the NimBLE host.
|
||||
value: 200
|
||||
|
||||
syscfg.vals.BLE_MESH:
|
||||
BLE_SM_SC: 1
|
||||
|
||||
@@ -33,4 +33,4 @@ pkg.apis:
|
||||
- ble_transport
|
||||
|
||||
pkg.init:
|
||||
ble_hci_emspi_init: 100
|
||||
ble_hci_emspi_init: 'MYNEWT_VAL(BLE_HCI_EMSPI_SYSINIT_STAGE)'
|
||||
|
||||
@@ -90,5 +90,10 @@ syscfg.defs:
|
||||
description: 'The size of the emspi task (units: 4-byte words).'
|
||||
value: 256
|
||||
|
||||
BLE_HCI_EMSPI_SYSINIT_STAGE:
|
||||
description: >
|
||||
Sysinit stage for the EMSPI BLE transport.
|
||||
value: 100
|
||||
|
||||
syscfg.vals.BLE_EXT_ADV:
|
||||
BLE_HCI_EVT_BUF_SIZE: 257
|
||||
|
||||
@@ -33,4 +33,4 @@ pkg.apis:
|
||||
- ble_transport
|
||||
|
||||
pkg.init:
|
||||
ble_hci_ram_init: 100
|
||||
ble_hci_ram_init: 'MYNEWT_VAL(BLE_TRANS_RAM_SYSINIT_STAGE)'
|
||||
|
||||
@@ -39,5 +39,10 @@ syscfg.defs:
|
||||
packets. It does not include the HCI data header (of 4 bytes).
|
||||
value: 255
|
||||
|
||||
BLE_TRANS_RAM_SYSINIT_STAGE:
|
||||
description: >
|
||||
Sysinit stage for the RAM BLE transport.
|
||||
value: 100
|
||||
|
||||
syscfg.vals.BLE_EXT_ADV:
|
||||
BLE_HCI_EVT_BUF_SIZE: 257
|
||||
|
||||
@@ -35,4 +35,4 @@ pkg.apis:
|
||||
- ble_transport
|
||||
|
||||
pkg.init:
|
||||
ble_hci_sock_init: 500
|
||||
ble_hci_sock_init: 'MYNEWT_VAL(BLE_SOCK_CLI_SYSINIT_STAGE)'
|
||||
|
||||
@@ -70,5 +70,10 @@ syscfg.defs:
|
||||
description: 'Size of the HCI socket stack (units=words).'
|
||||
value: 80
|
||||
|
||||
BLE_SOCK_CLI_SYSINIT_STAGE:
|
||||
description: >
|
||||
Sysinit stage for the socket BLE transport.
|
||||
value: 500
|
||||
|
||||
syscfg.vals.BLE_EXT_ADV:
|
||||
BLE_HCI_EVT_BUF_SIZE: 257
|
||||
|
||||
@@ -35,4 +35,4 @@ pkg.apis:
|
||||
- ble_transport
|
||||
|
||||
pkg.init:
|
||||
ble_hci_uart_init: 500
|
||||
ble_hci_uart_init: 'MYNEWT_VAL(BLE_TRANS_UART_SYSINIT_STAGE)'
|
||||
|
||||
@@ -63,6 +63,10 @@ syscfg.defs:
|
||||
BLE_HCI_UART_FLOW_CTRL:
|
||||
description: 'Flow control used for HCI uart interface'
|
||||
value: HAL_UART_FLOW_CTL_RTS_CTS
|
||||
BLE_TRANS_UART_SYSINIT_STAGE:
|
||||
description: >
|
||||
Sysinit stage for the UART BLE transport.
|
||||
value: 500
|
||||
|
||||
syscfg.vals.BLE_EXT_ADV:
|
||||
BLE_HCI_EVT_BUF_SIZE: 257
|
||||
|
||||
Reference in New Issue
Block a user