Skip to content

Commit 7fc827e

Browse files
Philip Burkhardtwes3
Philip Burkhardt
authored and
wes3
committed
Use syscfg settign for sysinit stage numbers
This allows the target to rearrange package initialization order via syscfg override
1 parent 1ff26fd commit 7fc827e

File tree

6 files changed

+37
-3
lines changed

6 files changed

+37
-3
lines changed

hw/bus/pkg.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ pkg.keywords:
2525
pkg.deps:
2626

2727
pkg.init:
28-
bus_pkg_init: 100
28+
bus_pkg_init: 'MYNEWT_VAL(BUS_SYSINIT_STAGE)'

hw/bus/syscfg.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,8 @@ syscfg.defs:
7373
magic value which is then checked on each operation to ensure
7474
proper objects are passed to APIs.
7575
value: 0
76+
77+
BUS_SYSINIT_STAGE:
78+
description: >
79+
System initialization stage for bus package
80+
value: 100

hw/mcu/dialog/da1469x/pkg.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ pkg.deps.SDADC:
6161
- "@apache-mynewt-core/hw/drivers/adc/sdadc_da1469x"
6262

6363
pkg.init:
64-
da1469x_lpclk_init: 1
64+
da1469x_lpclk_init: 'MYNEWT_VAL(DA1469X_LPCLK_SYSINIT_STAGE)'

hw/mcu/dialog/da1469x/syscfg.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,11 @@ syscfg.defs:
459459
'Disable watchdog on init'
460460
value: 1
461461

462+
DA1469X_LPCLK_SYSINIT_STAGE:
463+
description: >
464+
'Initalization stage for DA1469X'
465+
value: 1
466+
462467
syscfg.vals:
463468
OS_TICKS_PER_SEC: 128
464469

mgmt/smp/smp_os/pkg.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ pkg.req_apis:
3939
- smp
4040

4141
pkg.init:
42-
smp_os_pkg_init: 501
42+
smp_os_pkg_init: 'MYNEWT_VAL(SMP_OS_SYSINIT_STAGE)'

mgmt/smp/smp_os/syscfg.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
syscfg.defs:
21+
SMP_OS_SYSINIT_STAGE:
22+
description: >
23+
'System initialization stage for SMP OS package'
24+
value: 501

0 commit comments

Comments
 (0)