You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/11/21 23:06:21 UTC

[GitHub] ccollins476ad closed pull request #232: Use syscfg settings for sysinit stage numbers

ccollins476ad closed pull request #232: Use syscfg settings for sysinit stage numbers
URL: https://github.com/apache/mynewt-nimble/pull/232
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/nimble/controller/pkg.yml b/nimble/controller/pkg.yml
index d4efe806..96c63679 100644
--- a/nimble/controller/pkg.yml
+++ b/nimble/controller/pkg.yml
@@ -35,4 +35,4 @@ pkg.deps:
     - nimble
 
 pkg.init:
-    ble_ll_init: 250
+    ble_ll_init: 'MYNEWT_VAL(BLE_LL_SYSINIT_STAGE)'
diff --git a/nimble/controller/syscfg.yml b/nimble/controller/syscfg.yml
index e04281a0..e1c0aca2 100644
--- a/nimble/controller/syscfg.yml
+++ b/nimble/controller/syscfg.yml
@@ -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
diff --git a/nimble/host/mesh/pkg.yml b/nimble/host/mesh/pkg.yml
index 4163fe8d..44cc0c73 100644
--- a/nimble/host/mesh/pkg.yml
+++ b/nimble/host/mesh/pkg.yml
@@ -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_SHELL)'
diff --git a/nimble/host/mesh/syscfg.yml b/nimble/host/mesh/syscfg.yml
index 1ce24c0b..7d5a36a7 100644
--- a/nimble/host/mesh/syscfg.yml
+++ b/nimble/host/mesh/syscfg.yml
@@ -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_SHELL:
+        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
diff --git a/nimble/host/pkg.yml b/nimble/host/pkg.yml
index 7c8c021b..a063a0b6 100644
--- a/nimble/host/pkg.yml
+++ b/nimble/host/pkg.yml
@@ -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
diff --git a/nimble/host/services/ans/pkg.yml b/nimble/host/services/ans/pkg.yml
index 0744b292..691e566e 100644
--- a/nimble/host/services/ans/pkg.yml
+++ b/nimble/host/services/ans/pkg.yml
@@ -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)'
diff --git a/nimble/host/services/ans/syscfg.yml b/nimble/host/services/ans/syscfg.yml
index a77f23df..74de8d96 100644
--- a/nimble/host/services/ans/syscfg.yml
+++ b/nimble/host/services/ans/syscfg.yml
@@ -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
diff --git a/nimble/host/services/bas/pkg.yml b/nimble/host/services/bas/pkg.yml
index ab854e7b..afdc6942 100644
--- a/nimble/host/services/bas/pkg.yml
+++ b/nimble/host/services/bas/pkg.yml
@@ -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)'
diff --git a/nimble/host/services/bas/syscfg.yml b/nimble/host/services/bas/syscfg.yml
index c4ea7c2f..279930f1 100644
--- a/nimble/host/services/bas/syscfg.yml
+++ b/nimble/host/services/bas/syscfg.yml
@@ -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
diff --git a/nimble/host/services/bleuart/pkg.yml b/nimble/host/services/bleuart/pkg.yml
index 56fbffbb..36fe2bc7 100644
--- a/nimble/host/services/bleuart/pkg.yml
+++ b/nimble/host/services/bleuart/pkg.yml
@@ -34,4 +34,4 @@ pkg.req_apis:
     - console
 
 pkg.init:
-    bleuart_init: 500
+    bleuart_init: 'MYNEWT_VAL(BLEUART_SYSINIT_STAGE)'
diff --git a/nimble/host/services/bleuart/syscfg.yml b/nimble/host/services/bleuart/syscfg.yml
index 3b93f559..b0ed73e5 100644
--- a/nimble/host/services/bleuart/syscfg.yml
+++ b/nimble/host/services/bleuart/syscfg.yml
@@ -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
diff --git a/nimble/host/services/dis/pkg.yml b/nimble/host/services/dis/pkg.yml
index 3eaffda3..b914ca90 100644
--- a/nimble/host/services/dis/pkg.yml
+++ b/nimble/host/services/dis/pkg.yml
@@ -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)'
diff --git a/nimble/host/services/dis/syscfg.yml b/nimble/host/services/dis/syscfg.yml
index 8de9e159..0f45b286 100644
--- a/nimble/host/services/dis/syscfg.yml
+++ b/nimble/host/services/dis/syscfg.yml
@@ -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
diff --git a/nimble/host/services/gap/pkg.yml b/nimble/host/services/gap/pkg.yml
index e828cd3b..a2ef756e 100644
--- a/nimble/host/services/gap/pkg.yml
+++ b/nimble/host/services/gap/pkg.yml
@@ -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)'
diff --git a/nimble/host/services/gap/syscfg.yml b/nimble/host/services/gap/syscfg.yml
index 52639d3d..ad6aa7ef 100644
--- a/nimble/host/services/gap/syscfg.yml
+++ b/nimble/host/services/gap/syscfg.yml
@@ -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
diff --git a/nimble/host/services/gatt/pkg.yml b/nimble/host/services/gatt/pkg.yml
index caf40ad5..e3704bc1 100644
--- a/nimble/host/services/gatt/pkg.yml
+++ b/nimble/host/services/gatt/pkg.yml
@@ -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)'
diff --git a/nimble/host/services/gatt/syscfg.yml b/nimble/host/services/gatt/syscfg.yml
new file mode 100644
index 00000000..6ba1b333
--- /dev/null
+++ b/nimble/host/services/gatt/syscfg.yml
@@ -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
diff --git a/nimble/host/services/ias/pkg.yml b/nimble/host/services/ias/pkg.yml
index 3827d748..3b0ca074 100644
--- a/nimble/host/services/ias/pkg.yml
+++ b/nimble/host/services/ias/pkg.yml
@@ -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)'
diff --git a/nimble/host/services/ias/syscfg.yml b/nimble/host/services/ias/syscfg.yml
new file mode 100644
index 00000000..2cbed3ab
--- /dev/null
+++ b/nimble/host/services/ias/syscfg.yml
@@ -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
diff --git a/nimble/host/services/lls/pkg.yml b/nimble/host/services/lls/pkg.yml
index 119c87ad..6160f020 100644
--- a/nimble/host/services/lls/pkg.yml
+++ b/nimble/host/services/lls/pkg.yml
@@ -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)'
diff --git a/nimble/host/services/lls/syscfg.yml b/nimble/host/services/lls/syscfg.yml
new file mode 100644
index 00000000..312b08a2
--- /dev/null
+++ b/nimble/host/services/lls/syscfg.yml
@@ -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
diff --git a/nimble/host/services/tps/pkg.yml b/nimble/host/services/tps/pkg.yml
index 68146646..3d4c5e98 100644
--- a/nimble/host/services/tps/pkg.yml
+++ b/nimble/host/services/tps/pkg.yml
@@ -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)'
diff --git a/nimble/host/services/tps/syscfg.yml b/nimble/host/services/tps/syscfg.yml
new file mode 100644
index 00000000..0391e8b1
--- /dev/null
+++ b/nimble/host/services/tps/syscfg.yml
@@ -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
+
diff --git a/nimble/host/store/config/pkg.yml b/nimble/host/store/config/pkg.yml
index b91c3dc1..db80d1df 100644
--- a/nimble/host/store/config/pkg.yml
+++ b/nimble/host/store/config/pkg.yml
@@ -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)'
diff --git a/nimble/host/store/config/syscfg.yml b/nimble/host/store/config/syscfg.yml
index 797bfa79..ff0689c6 100644
--- a/nimble/host/store/config/syscfg.yml
+++ b/nimble/host/store/config/syscfg.yml
@@ -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
diff --git a/nimble/host/store/ram/pkg.yml b/nimble/host/store/ram/pkg.yml
index a060f694..68765fdd 100644
--- a/nimble/host/store/ram/pkg.yml
+++ b/nimble/host/store/ram/pkg.yml
@@ -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)'
diff --git a/nimble/host/store/ram/syscfg.yml b/nimble/host/store/ram/syscfg.yml
new file mode 100644
index 00000000..442211dd
--- /dev/null
+++ b/nimble/host/store/ram/syscfg.yml
@@ -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
+
diff --git a/nimble/host/syscfg.yml b/nimble/host/syscfg.yml
index d16d93fb..a6f2576d 100644
--- a/nimble/host/syscfg.yml
+++ b/nimble/host/syscfg.yml
@@ -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
diff --git a/nimble/transport/emspi/pkg.yml b/nimble/transport/emspi/pkg.yml
index f554a8d7..5df5a5bb 100644
--- a/nimble/transport/emspi/pkg.yml
+++ b/nimble/transport/emspi/pkg.yml
@@ -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)'
diff --git a/nimble/transport/emspi/syscfg.yml b/nimble/transport/emspi/syscfg.yml
index 2ef09692..4751271b 100644
--- a/nimble/transport/emspi/syscfg.yml
+++ b/nimble/transport/emspi/syscfg.yml
@@ -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
diff --git a/nimble/transport/ram/pkg.yml b/nimble/transport/ram/pkg.yml
index 78a51452..bb8397bf 100644
--- a/nimble/transport/ram/pkg.yml
+++ b/nimble/transport/ram/pkg.yml
@@ -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)'
diff --git a/nimble/transport/ram/syscfg.yml b/nimble/transport/ram/syscfg.yml
index 998abad1..3b822fcc 100644
--- a/nimble/transport/ram/syscfg.yml
+++ b/nimble/transport/ram/syscfg.yml
@@ -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
diff --git a/nimble/transport/socket/pkg.yml b/nimble/transport/socket/pkg.yml
index e4ddf6f8..fb4144d3 100644
--- a/nimble/transport/socket/pkg.yml
+++ b/nimble/transport/socket/pkg.yml
@@ -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)'
diff --git a/nimble/transport/socket/syscfg.yml b/nimble/transport/socket/syscfg.yml
index 4c4b5a4c..2050f646 100644
--- a/nimble/transport/socket/syscfg.yml
+++ b/nimble/transport/socket/syscfg.yml
@@ -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
diff --git a/nimble/transport/uart/pkg.yml b/nimble/transport/uart/pkg.yml
index c561eeb0..95681373 100644
--- a/nimble/transport/uart/pkg.yml
+++ b/nimble/transport/uart/pkg.yml
@@ -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)'
diff --git a/nimble/transport/uart/syscfg.yml b/nimble/transport/uart/syscfg.yml
index 14986802..43486a8b 100644
--- a/nimble/transport/uart/syscfg.yml
+++ b/nimble/transport/uart/syscfg.yml
@@ -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


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services