Compare commits
128 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4da3e5280 | ||
|
|
604b40118f | ||
|
|
7eb6869b24 | ||
|
|
5c08f183f2 | ||
|
|
a74b652d52 | ||
|
|
5db25d9882 | ||
|
|
525c112ac3 | ||
|
|
38bd485a59 | ||
|
|
18b08740e7 | ||
|
|
edd1612388 | ||
|
|
142be60c2a | ||
|
|
b0618e11fc | ||
|
|
05318b5349 | ||
|
|
a14b830775 | ||
|
|
644ebe5494 | ||
|
|
d80eaa357a | ||
|
|
f66b26e28d | ||
|
|
078269364a | ||
|
|
9039be480b | ||
|
|
f9cafd218f | ||
|
|
9c23f6a2c9 | ||
|
|
9118a7a8be | ||
|
|
1d67f68ee1 | ||
|
|
f3169352fd | ||
|
|
d98d138b4b | ||
|
|
ea7c9116e6 | ||
|
|
ce3e0c9a42 | ||
|
|
7df4bffa19 | ||
|
|
72f8d81d57 | ||
|
|
43274af272 | ||
|
|
0abe60b1c2 | ||
|
|
c9e1bf4509 | ||
|
|
7c69cbc153 | ||
|
|
748bee1180 | ||
|
|
d8171312a4 | ||
|
|
652f04f6ca | ||
|
|
d72602d95b | ||
|
|
b156e0fadc | ||
|
|
422546623d | ||
|
|
07680b27d5 | ||
|
|
96d62441c3 | ||
|
|
136fc6ff28 | ||
|
|
fde888685f | ||
|
|
6a7cfe1a5f | ||
|
|
c8baa85fee | ||
|
|
7fde6f8ac2 | ||
|
|
7a8a9b6c99 | ||
|
|
9a6cb39c96 | ||
|
|
d290393388 | ||
|
|
28956534cd | ||
|
|
ea9a59f287 | ||
|
|
374d2d031a | ||
|
|
98bd6534a3 | ||
|
|
9fe9ff18ee | ||
|
|
fe8405271a | ||
|
|
a153645d46 | ||
|
|
89c052e1e5 | ||
|
|
faf0e21a66 | ||
|
|
95c41f6889 | ||
|
|
82e255bf2a | ||
|
|
552a0e1524 | ||
|
|
17e4ed1fd7 | ||
|
|
0b91e56939 | ||
|
|
e1e9fa6670 | ||
|
|
fe8efca309 | ||
|
|
328df98c40 | ||
|
|
7e2e9d612d | ||
|
|
6242d56255 | ||
|
|
8bb53d7dc8 | ||
|
|
7ae9f2fadb | ||
|
|
78fc03b07b | ||
|
|
93e0cc85f7 | ||
|
|
5f4707abe3 | ||
|
|
758bfe43da | ||
|
|
cdb27db36c | ||
|
|
9ff7a43035 | ||
|
|
be9d5426d7 | ||
|
|
ebee866639 | ||
|
|
d4dc4a9714 | ||
|
|
faf03b0092 | ||
|
|
126896153b | ||
|
|
bcc700d732 | ||
|
|
075ca208a0 | ||
|
|
8d9ac1c5a5 | ||
|
|
85dd671855 | ||
|
|
04b994883b | ||
|
|
2e89d2c73b | ||
|
|
83c12581c4 | ||
|
|
84dd113165 | ||
|
|
827e397988 | ||
|
|
a9a563fa55 | ||
|
|
0efda1c06f | ||
|
|
e2fe23a7cc | ||
|
|
3f24e7ddf5 | ||
|
|
3aff490e33 | ||
|
|
9d31c46861 | ||
|
|
27201bb1ad | ||
|
|
9727a2143f | ||
|
|
84abb58886 | ||
|
|
7bdf17756c | ||
|
|
961ee2115f | ||
|
|
053dc75720 | ||
|
|
b7954c9991 | ||
|
|
3a39b7824e | ||
|
|
9247efaba8 | ||
|
|
2fbb10c394 | ||
|
|
2f9ae20c60 | ||
|
|
8188fd3b5e | ||
|
|
8bc60390d0 | ||
|
|
f5d4fb40b5 | ||
|
|
c90e0c1197 | ||
|
|
53d9e942cf | ||
|
|
dd435b011f | ||
|
|
6a851f1f48 | ||
|
|
68a6a3e5c3 | ||
|
|
dff331a40c | ||
|
|
96a7b32e85 | ||
|
|
6f11b2d7f2 | ||
|
|
5166ff9fb1 | ||
|
|
16e3655739 | ||
|
|
b757110019 | ||
|
|
61730131c7 | ||
|
|
5455bf4ba7 | ||
|
|
c65645cc39 | ||
|
|
cef9cbeb60 | ||
|
|
ac0477f17c | ||
|
|
cb4ed62d98 | ||
|
|
df0c972787 |
@@ -11,16 +11,16 @@ on:
|
||||
- "arch/posix/**"
|
||||
|
||||
jobs:
|
||||
bsim-build-cancel:
|
||||
bluetooth-test-prep:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@0.6.0
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
bsim-build:
|
||||
bluetooth-test-build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: bsim-build-cancel
|
||||
needs: bluetooth-test-prep
|
||||
container:
|
||||
image: zephyrprojectrtos/ci:v0.18.4
|
||||
options: '--entrypoint /bin/bash'
|
||||
@@ -46,11 +46,11 @@ jobs:
|
||||
- name: west setup
|
||||
run: |
|
||||
west init -l . || true
|
||||
west update
|
||||
west config --global update.narrow true
|
||||
west update 2>&1 1> west.update.log || west update 2>&1 1> west.update2.log
|
||||
|
||||
- name: Run Bluetooth Tests with BSIM
|
||||
run: |
|
||||
#source zephyr-env.sh
|
||||
export ZEPHYR_BASE=${PWD}
|
||||
WORK_DIR=${ZEPHYR_BASE}/bsim_bt_out tests/bluetooth/bsim_bt/compile.sh
|
||||
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_bt_test_results_file} \
|
||||
@@ -63,9 +63,9 @@ jobs:
|
||||
name: Bluetooth Test Results
|
||||
path: ./bsim_bt_out/bsim_results.xml
|
||||
|
||||
publish-test-results:
|
||||
name: "Publish Unit Tests Results"
|
||||
needs: bsim-build
|
||||
bluetooth-test-results:
|
||||
name: "Publish Bluetooth Test Results"
|
||||
needs: bluetooth-test-build
|
||||
runs-on: ubuntu-20.04
|
||||
# the build-and-test job might be skipped, we don't need to run this job then
|
||||
if: success() || failure()
|
||||
@@ -76,10 +76,10 @@ jobs:
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Publish Unit Test Results
|
||||
uses: EnricoMi/publish-unit-test-result-action@v1.12
|
||||
- name: Publish Bluetooth Test Results
|
||||
uses: EnricoMi/publish-unit-test-result-action@v1
|
||||
with:
|
||||
check_name: Bluetooth Test Results
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
files: "**/bsim_results.xml"
|
||||
comment_on_pr: false
|
||||
comment_mode: off
|
||||
107
.github/workflows/clang.yaml
vendored
@@ -3,7 +3,7 @@ name: Build with Clang/LLVM
|
||||
on: pull_request_target
|
||||
|
||||
jobs:
|
||||
clang-build-cancel:
|
||||
clang-build-prep:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cancel Previous Runs
|
||||
@@ -11,38 +11,51 @@ jobs:
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
clang-build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: clang-build-cancel
|
||||
runs-on: zephyr_runner
|
||||
needs: clang-build-prep
|
||||
container:
|
||||
image: zephyrprojectrtos/ci:v0.18.4
|
||||
options: '--entrypoint /bin/bash'
|
||||
volumes:
|
||||
- /home/runners/zephyrproject:/github/cache/zephyrproject
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
subset: [1, 2, 3, 4, 5]
|
||||
platform: ["native_posix"]
|
||||
env:
|
||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.1
|
||||
CLANG_ROOT_DIR: /usr/lib/llvm-12
|
||||
MATRIX_SIZE: 5
|
||||
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
||||
BASE_REF: ${{ github.base_ref }}
|
||||
outputs:
|
||||
report_needed: ${{ steps.twister.outputs.report_needed }}
|
||||
steps:
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@0.6.0
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
- name: Update PATH for west
|
||||
- name: Cleanup
|
||||
run: |
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: checkout
|
||||
# hotfix, until we have a better way to deal with existing data
|
||||
rm -rf zephyr zephyr-testing
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: west setup
|
||||
- name: Environment Setup
|
||||
run: |
|
||||
pip3 install GitPython
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
git config --global user.email "bot@zephyrproject.org"
|
||||
git config --global user.name "Zephyr Bot"
|
||||
git rebase origin/${BASE_REF}
|
||||
git log --pretty=oneline | head -n 10
|
||||
west init -l . || true
|
||||
west update
|
||||
west config --global update.narrow true
|
||||
# In some cases modules are left in a state where they can't be
|
||||
# updated (i.e. when we cancel a job and the builder is killed),
|
||||
# So first retry to update, if that does not work, remove all modules
|
||||
# and start over. (Workaround until we implement more robust module
|
||||
# west caching).
|
||||
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west2.log || ( rm -rf ../modules && west update --path-cache /github/cache/zephyrproject)
|
||||
|
||||
- name: Check Environment
|
||||
run: |
|
||||
@@ -51,40 +64,76 @@ jobs:
|
||||
gcc --version
|
||||
ls -la
|
||||
|
||||
- name: Run Tests with Twister
|
||||
- name: Prepare ccache timestamp/data
|
||||
id: ccache_cache_timestamp
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
||||
string(REPLACE "/" "_" repo ${{github.repository}})
|
||||
string(REPLACE "-" "_" repo2 ${repo})
|
||||
message("::set-output name=repo::${repo2}")
|
||||
- name: use cache
|
||||
id: cache-ccache
|
||||
uses: nashif/action-s3-cache@master
|
||||
with:
|
||||
key: ${{ steps.ccache_cache_timestamp.outputs.repo }}-${{ github.ref_name }}-clang-${{ matrix.platform }}-ccache
|
||||
path: /github/home/.ccache
|
||||
aws-s3-bucket: ccache.zephyrproject.org
|
||||
aws-access-key-id: ${{ secrets.CCACHE_S3_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.CCACHE_S3_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-east-2
|
||||
|
||||
- name: ccache stats initial
|
||||
run: |
|
||||
test -d github/home/.ccache && rm -rf /github/home/.ccache && mv github/home/.ccache /github/home/.ccache
|
||||
ccache -M 10G -s
|
||||
|
||||
- name: Run Tests with Twister
|
||||
id: twister
|
||||
run: |
|
||||
#source zephyr-env.sh
|
||||
export ZEPHYR_BASE=${PWD}
|
||||
export ZEPHYR_TOOLCHAIN_VARIANT=llvm
|
||||
./scripts/twister --inline-logs -M -N -v -p native_posix --subset ${{matrix.subset}}/${MATRIX_SIZE} --retry-failed 3
|
||||
|
||||
# check if we need to run a full twister or not based on files changed
|
||||
python3 ./scripts/ci/test_plan.py --platform ${{ matrix.platform }} -c origin/${BASE_REF}..
|
||||
|
||||
# We can limit scope to just what has changed
|
||||
if [ -s testplan.csv ]; then
|
||||
echo "::set-output name=report_needed::1";
|
||||
# Full twister but with options based on changes
|
||||
./scripts/twister --inline-logs -M -N -v --load-tests testplan.csv --retry-failed 2
|
||||
else
|
||||
# if nothing is run, skip reporting step
|
||||
echo "::set-output name=report_needed::0";
|
||||
fi
|
||||
|
||||
- name: ccache stats post
|
||||
run: |
|
||||
ccache -s
|
||||
|
||||
- name: Upload Unit Test Results
|
||||
if: always()
|
||||
if: always() && steps.twister.outputs.report_needed != 0
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Unit Test Results (Subset ${{ matrix.subset }})
|
||||
name: Unit Test Results (Subset ${{ matrix.platform }})
|
||||
path: twister-out/twister.xml
|
||||
|
||||
publish-test-results:
|
||||
clang-build-results:
|
||||
name: "Publish Unit Tests Results"
|
||||
needs: clang-build
|
||||
runs-on: ubuntu-20.04
|
||||
# the build-and-test job might be skipped, we don't need to run this job then
|
||||
if: success() || failure()
|
||||
|
||||
if: (success() || failure() ) && needs.clang-build.outputs.report_needed != 0
|
||||
steps:
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Display structure of downloaded files
|
||||
run: ls -R
|
||||
|
||||
- name: Publish Unit Test Results
|
||||
uses: EnricoMi/publish-unit-test-result-action@v1.12
|
||||
uses: EnricoMi/publish-unit-test-result-action@v1
|
||||
if: always()
|
||||
with:
|
||||
check_name: Unit Test Results
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
files: "**/twister.xml"
|
||||
comment_on_pr: false
|
||||
comment_mode: off
|
||||
|
||||
164
.github/workflows/codecov.yaml
vendored
Normal file
@@ -0,0 +1,164 @@
|
||||
name: Code Coverage with codecov
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '25 */3 * * 1-5'
|
||||
|
||||
jobs:
|
||||
codecov-prep:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'zephyrproject-rtos/zephyr'
|
||||
steps:
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@0.6.0
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
|
||||
codecov:
|
||||
runs-on: zephyr_runner
|
||||
needs: codecov-prep
|
||||
container:
|
||||
image: zephyrprojectrtos/ci:v0.18.4
|
||||
options: '--entrypoint /bin/bash'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: ["native_posix", "qemu_x86", "unit_testing"]
|
||||
env:
|
||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.1
|
||||
CLANG_ROOT_DIR: /usr/lib/llvm-12
|
||||
steps:
|
||||
- name: Update PATH for west
|
||||
run: |
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: west setup
|
||||
run: |
|
||||
west init -l . || true
|
||||
west update 1> west.update.log || west update 1> west.update-2.log
|
||||
|
||||
- name: Check Environment
|
||||
run: |
|
||||
cmake --version
|
||||
${CLANG_ROOT_DIR}/bin/clang --version
|
||||
gcc --version
|
||||
ls -la
|
||||
- name: Prepare ccache keys
|
||||
id: ccache_cache_prop
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
string(REPLACE "/" "_" repo ${{github.repository}})
|
||||
string(REPLACE "-" "_" repo2 ${repo})
|
||||
message("::set-output name=repo::${repo2}")
|
||||
|
||||
- name: use cache
|
||||
id: cache-ccache
|
||||
uses: nashif/action-s3-cache@master
|
||||
with:
|
||||
key: ${{ steps.ccache_cache_prop.outputs.repo }}-${{github.event_name}}-${{matrix.platform}}-codecov-ccache
|
||||
path: /github/home/.ccache
|
||||
aws-s3-bucket: ccache.zephyrproject.org
|
||||
aws-access-key-id: ${{ secrets.CCACHE_S3_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.CCACHE_S3_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-east-2
|
||||
|
||||
- name: ccache stats initial
|
||||
run: |
|
||||
test -d github/home/.ccache && mv github/home/.ccache /github/home/.ccache
|
||||
ccache -M 10G -s
|
||||
|
||||
- name: Run Tests with Twister (Push)
|
||||
continue-on-error: true
|
||||
run: |
|
||||
export ZEPHYR_BASE=${PWD}
|
||||
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
|
||||
mkdir -p coverage/reports
|
||||
./scripts/twister -N -v --filter runnable -p ${{ matrix.platform }} --coverage -T tests
|
||||
|
||||
- name: Generate Coverage Report
|
||||
run: |
|
||||
mv twister-out/coverage.info lcov.pre.info
|
||||
lcov -q --remove lcov.pre.info mylib.c --remove lcov.pre.info tests/\* \
|
||||
--remove lcov.pre.info samples/\* --remove lcov.pre.info ext/\* \
|
||||
--remove lcov.pre.info *generated* \
|
||||
-o coverage/reports/${{ matrix.platform }}.info --rc lcov_branch_coverage=1
|
||||
|
||||
- name: ccache stats post
|
||||
run: |
|
||||
ccache -s
|
||||
|
||||
- name: Upload Coverage Results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Coverage Data (Subset ${{ matrix.platform }})
|
||||
path: coverage/reports/${{ matrix.platform }}.info
|
||||
|
||||
codecov-results:
|
||||
name: "Publish Coverage Results"
|
||||
needs: codecov
|
||||
runs-on: ubuntu-latest
|
||||
# the codecov job might be skipped, we don't need to run this job then
|
||||
if: success() || failure()
|
||||
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: coverage/reports
|
||||
|
||||
- name: Move coverage files
|
||||
run: |
|
||||
mv ./coverage/reports/*/*.info ./coverage/reports
|
||||
ls -la ./coverage/reports
|
||||
|
||||
- name: Generate list of coverage files
|
||||
id: get-coverage-files
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
file(GLOB INPUT_FILES_LIST "coverage/reports/*.info")
|
||||
set(MERGELIST "")
|
||||
set(FILELIST "")
|
||||
foreach(ITEM ${INPUT_FILES_LIST})
|
||||
get_filename_component(f ${ITEM} NAME)
|
||||
if(FILELIST STREQUAL "")
|
||||
set(FILELIST "${f}")
|
||||
else()
|
||||
set(FILELIST "${FILELIST},${f}")
|
||||
endif()
|
||||
endforeach()
|
||||
foreach(ITEM ${INPUT_FILES_LIST})
|
||||
get_filename_component(f ${ITEM} NAME)
|
||||
if(MERGELIST STREQUAL "")
|
||||
set(MERGELIST "-a ${f}")
|
||||
else()
|
||||
set(MERGELIST "${MERGELIST} -a ${f}")
|
||||
endif()
|
||||
endforeach()
|
||||
message("::set-output name=mergefiles::${MERGELIST}")
|
||||
message("::set-output name=covfiles::${FILELIST}")
|
||||
|
||||
- name: Merge coverage files
|
||||
run: |
|
||||
sudo apt-get install -y lcov
|
||||
cd ./coverage/reports
|
||||
lcov ${{ steps.get-coverage-files.outputs.mergefiles }} -o merged.info --rc lcov_branch_coverage=1
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
if: always()
|
||||
uses: codecov/codecov-action@v2
|
||||
with:
|
||||
directory: ./coverage/reports
|
||||
env_vars: OS,PYTHON
|
||||
fail_ci_if_error: false
|
||||
verbose: true
|
||||
files: merged.info
|
||||
6
.github/workflows/compliance.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Compliance
|
||||
name: Compliance Checks
|
||||
|
||||
on: pull_request
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
run: |
|
||||
python3 ./scripts/get_maintainer.py path CMakeLists.txt
|
||||
|
||||
compliance_job:
|
||||
check_compliance:
|
||||
runs-on: ubuntu-latest
|
||||
name: Run compliance checks on patch series (PR)
|
||||
steps:
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
# debug
|
||||
git log --pretty=oneline | head -n 10
|
||||
west init -l . || true
|
||||
west update
|
||||
west update 2>&1 1> west.update.log || west update 2>&1 1> west.update2.log
|
||||
|
||||
- name: Run Compliance Tests
|
||||
continue-on-error: true
|
||||
|
||||
2
.github/workflows/conflict.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
||||
conflict:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: mschilde/auto-label-merge-conflicts@master
|
||||
- uses: mschilde/auto-label-merge-conflicts@v2
|
||||
with:
|
||||
CONFLICT_LABEL_NAME: "has conflicts"
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
3
.github/workflows/footprint-tracking.yml
vendored
@@ -52,7 +52,8 @@ jobs:
|
||||
- name: west setup
|
||||
run: |
|
||||
west init -l . || true
|
||||
west update
|
||||
west config --global update.narrow true
|
||||
west update 2>&1 1> west.update.log || west update 2>&1 1> west.update2.log
|
||||
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
|
||||
3
.github/workflows/footprint.yml
vendored
@@ -42,7 +42,8 @@ jobs:
|
||||
- name: west setup
|
||||
run: |
|
||||
west init -l . || true
|
||||
west update
|
||||
west config --global update.narrow true
|
||||
west update 2>&1 1> west.update.log || west update 2>&1 1> west.update.log
|
||||
|
||||
- name: Detect Changes in Footprint
|
||||
env:
|
||||
|
||||
248
.github/workflows/twister.yaml
vendored
Normal file
@@ -0,0 +1,248 @@
|
||||
name: Run tests with twister
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request_target:
|
||||
schedule:
|
||||
# Run at 00:00 on Saturday
|
||||
- cron: '20 0 * * 6'
|
||||
|
||||
jobs:
|
||||
twister-build-cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@0.6.0
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
|
||||
twister-build-prep:
|
||||
|
||||
runs-on: zephyr_runner
|
||||
needs: twister-build-cleanup
|
||||
container:
|
||||
image: zephyrprojectrtos/ci:v0.18.4
|
||||
options: '--entrypoint /bin/bash'
|
||||
volumes:
|
||||
- /home/runners/zephyrproject:/github/cache/zephyrproject
|
||||
outputs:
|
||||
subset: ${{ steps.output-services.outputs.subset }}
|
||||
size: ${{ steps.output-services.outputs.size }}
|
||||
env:
|
||||
MATRIX_SIZE: 10
|
||||
PUSH_MATRIX_SIZE: 15
|
||||
DAILY_MATRIX_SIZE: 80
|
||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.1
|
||||
CLANG_ROOT_DIR: /usr/lib/llvm-12
|
||||
TESTS_PER_BUILDER: 700
|
||||
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
||||
BASE_REF: ${{ github.base_ref }}
|
||||
steps:
|
||||
- name: Cleanup
|
||||
run: |
|
||||
# hotfix, until we have a better way to deal with existing data
|
||||
rm -rf zephyr zephyr-testing
|
||||
|
||||
- name: Checkout
|
||||
if: github.event_name == 'pull_request_target'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Environment Setup
|
||||
if: github.event_name == 'pull_request_target'
|
||||
run: |
|
||||
pip3 install GitPython
|
||||
git config --global user.email "bot@zephyrproject.org"
|
||||
git config --global user.name "Zephyr Bot"
|
||||
git rebase origin/${BASE_REF}
|
||||
git log --pretty=oneline | head -n 10
|
||||
west init -l . || true
|
||||
# no need for west update here
|
||||
|
||||
- name: Generate Test Plan with Twister
|
||||
if: github.event_name == 'pull_request_target'
|
||||
id: test-plan
|
||||
run: |
|
||||
export ZEPHYR_BASE=${PWD}
|
||||
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
|
||||
# temporary until we have all PRs rebased on top of this commit.
|
||||
git log -n 500 --oneline | grep -q "run twister using github action" || (
|
||||
echo "Your branch is not up to date, you need to rebase on top of latest HEAD of main branch"
|
||||
exit 1
|
||||
)
|
||||
python3 ./scripts/ci/test_plan.py -c origin/${BASE_REF}.. --pull-request -t $TESTS_PER_BUILDER
|
||||
if [ -s .testplan ]; then
|
||||
cat .testplan >> $GITHUB_ENV
|
||||
else
|
||||
echo "TWISTER_NODES=${MATRIX_SIZE}" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
|
||||
rm -f testplan.csv .testplan
|
||||
|
||||
- name: Determine matrix size
|
||||
id: output-services
|
||||
run: |
|
||||
if [ "${{github.event_name}}" = "pull_request_target" ]; then
|
||||
if [ -n "${TWISTER_NODES}" ]; then
|
||||
subset="[$(seq -s',' 1 ${TWISTER_NODES})]"
|
||||
else
|
||||
subset="[$(seq -s',' 1 ${MATRIX_SIZE})]"
|
||||
fi
|
||||
size=${TWISTER_NODES}
|
||||
elif [ "${{github.event_name}}" = "push" ]; then
|
||||
subset="[$(seq -s',' 1 ${PUSH_MATRIX_SIZE})]"
|
||||
size=${MATRIX_SIZE}
|
||||
elif [ "${{github.event_name}}" = "schedule" && "${{github.repository}}" = "zephyrproject-rtos/zephyr" ]; then
|
||||
subset="[$(seq -s',' 1 ${DAILY_MATRIX_SIZE})]"
|
||||
size=${DAILY_MATRIX_SIZE}
|
||||
else
|
||||
size=0
|
||||
fi
|
||||
echo "::set-output name=subset::${subset}";
|
||||
echo "::set-output name=size::${size}";
|
||||
|
||||
twister-build:
|
||||
runs-on: zephyr_runner
|
||||
needs: twister-build-prep
|
||||
if: needs.twister-build-prep.outputs.size != 0
|
||||
container:
|
||||
image: zephyrprojectrtos/ci:v0.18.4
|
||||
options: '--entrypoint /bin/bash'
|
||||
volumes:
|
||||
- /home/runners/zephyrproject:/github/cache/zephyrproject
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
subset: ${{fromJSON(needs.twister-build-prep.outputs.subset)}}
|
||||
env:
|
||||
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.13.1
|
||||
CLANG_ROOT_DIR: /usr/lib/llvm-12
|
||||
TWISTER_COMMON: ' --inline-logs -v -N -M --retry-failed 3 '
|
||||
DAILY_OPTIONS: ' -M --build-only --all '
|
||||
PR_OPTIONS: ' --clobber-output --integration '
|
||||
PUSH_OPTIONS: ' --clobber-output -M '
|
||||
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
||||
BASE_REF: ${{ github.base_ref }}
|
||||
steps:
|
||||
- name: Cleanup
|
||||
run: |
|
||||
# hotfix, until we have a better way to deal with existing data
|
||||
rm -rf zephyr zephyr-testing
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Environment Setup
|
||||
run: |
|
||||
pip3 install GitPython
|
||||
if [ "${{github.event_name}}" = "pull_request_target" ]; then
|
||||
git config --global user.email "bot@zephyrproject.org"
|
||||
git config --global user.name "Zephyr Builder"
|
||||
git rebase origin/${BASE_REF}
|
||||
git log --pretty=oneline | head -n 10
|
||||
fi
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
|
||||
west init -l . || true
|
||||
west config --global update.narrow true
|
||||
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules && west update --path-cache /github/cache/zephyrproject)
|
||||
west forall -c 'git reset --hard HEAD'
|
||||
|
||||
- name: Check Environment
|
||||
run: |
|
||||
cmake --version
|
||||
${CLANG_ROOT_DIR}/bin/clang --version
|
||||
gcc --version
|
||||
ls -la
|
||||
echo "github.ref: ${{ github.ref }}"
|
||||
echo "github.base_ref: ${{ github.base_ref }}"
|
||||
echo "github.ref_name: ${{ github.ref_name }}"
|
||||
|
||||
- name: Prepare ccache timestamp/data
|
||||
id: ccache_cache_timestamp
|
||||
shell: cmake -P {0}
|
||||
run: |
|
||||
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
||||
string(REPLACE "/" "_" repo ${{github.repository}})
|
||||
string(REPLACE "-" "_" repo2 ${repo})
|
||||
message("::set-output name=repo::${repo2}")
|
||||
|
||||
- name: use cache
|
||||
id: cache-ccache
|
||||
uses: nashif/action-s3-cache@master
|
||||
with:
|
||||
key: ${{ steps.ccache_cache_timestamp.outputs.repo }}-${{ github.ref_name }}-${{github.event_name}}-${{ matrix.subset }}-ccache
|
||||
path: /github/home/.ccache
|
||||
aws-s3-bucket: ccache.zephyrproject.org
|
||||
aws-access-key-id: ${{ secrets.CCACHE_S3_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.CCACHE_S3_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-east-2
|
||||
|
||||
- name: ccache stats initial
|
||||
run: |
|
||||
test -d github/home/.ccache && rm -rf /github/home/.ccache && mv github/home/.ccache /github/home/.ccache
|
||||
ccache -M 10G -s
|
||||
|
||||
- if: github.event_name == 'push'
|
||||
name: Run Tests with Twister (Push)
|
||||
run: |
|
||||
export ZEPHYR_BASE=${PWD}
|
||||
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
|
||||
./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} ${TWISTER_COMMON} ${PUSH_OPTIONS}
|
||||
|
||||
- if: github.event_name == 'pull_request_target'
|
||||
name: Run Tests with Twister (Pull Request)
|
||||
run: |
|
||||
rm -f testplan.csv
|
||||
export ZEPHYR_BASE=${PWD}
|
||||
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
|
||||
python3 ./scripts/ci/test_plan.py -c origin/${BASE_REF}.. --pull-request
|
||||
./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} --load-tests testplan.csv ${TWISTER_COMMON} ${PR_OPTIONS}
|
||||
|
||||
- if: github.event_name == 'schedule'
|
||||
name: Run Tests with Twister (Daily)
|
||||
run: |
|
||||
export ZEPHYR_BASE=${PWD}
|
||||
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
|
||||
./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} ${TWISTER_COMMON} ${DAILY_OPTIONS}
|
||||
|
||||
- name: ccache stats post
|
||||
run: |
|
||||
ccache -s
|
||||
|
||||
- name: Upload Unit Test Results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Unit Test Results (Subset ${{ matrix.subset }})
|
||||
if-no-files-found: ignore
|
||||
path: |
|
||||
twister-out/twister.xml
|
||||
testplan.csv
|
||||
|
||||
twister-test-results:
|
||||
name: "Publish Unit Tests Results"
|
||||
needs: twister-build
|
||||
runs-on: ubuntu-latest
|
||||
# the build-and-test job might be skipped, we don't need to run this job then
|
||||
if: success() || failure()
|
||||
|
||||
steps:
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Publish Unit Test Results
|
||||
uses: EnricoMi/publish-unit-test-result-action@v1
|
||||
with:
|
||||
check_name: Unit Test Results
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
files: "**/twister.xml"
|
||||
comment_mode: off
|
||||
@@ -168,21 +168,29 @@ if(CONFIG_CPLUSPLUS)
|
||||
# Kconfig choice ensures only one of these CONFIG_STD_CPP* is set.
|
||||
if(CONFIG_STD_CPP98)
|
||||
set(STD_CPP_DIALECT_FLAGS $<TARGET_PROPERTY:compiler-cpp,dialect_cpp98>)
|
||||
list(APPEND CMAKE_CXX_COMPILE_FEATURES ${compile_features_cpp98})
|
||||
elseif(CONFIG_STD_CPP11)
|
||||
set(STD_CPP_DIALECT_FLAGS $<TARGET_PROPERTY:compiler-cpp,dialect_cpp11>) # Default in kconfig
|
||||
list(APPEND CMAKE_CXX_COMPILE_FEATURES ${compile_features_cpp11})
|
||||
elseif(CONFIG_STD_CPP14)
|
||||
set(STD_CPP_DIALECT_FLAGS $<TARGET_PROPERTY:compiler-cpp,dialect_cpp14>)
|
||||
list(APPEND CMAKE_CXX_COMPILE_FEATURES ${compile_features_cpp14})
|
||||
elseif(CONFIG_STD_CPP17)
|
||||
set(STD_CPP_DIALECT_FLAGS $<TARGET_PROPERTY:compiler-cpp,dialect_cpp17>)
|
||||
list(APPEND CMAKE_CXX_COMPILE_FEATURES ${compile_features_cpp17})
|
||||
elseif(CONFIG_STD_CPP2A)
|
||||
set(STD_CPP_DIALECT_FLAGS $<TARGET_PROPERTY:compiler-cpp,dialect_cpp2a>)
|
||||
list(APPEND CMAKE_CXX_COMPILE_FEATURES ${compile_features_cpp20})
|
||||
elseif(CONFIG_STD_CPP20)
|
||||
set(STD_CPP_DIALECT_FLAGS $<TARGET_PROPERTY:compiler-cpp,dialect_cpp20>)
|
||||
list(APPEND CMAKE_CXX_COMPILE_FEATURES ${compile_features_cpp20})
|
||||
elseif(CONFIG_STD_CPP2B)
|
||||
set(STD_CPP_DIALECT_FLAGS $<TARGET_PROPERTY:compiler-cpp,dialect_cpp2b>)
|
||||
list(APPEND CMAKE_CXX_COMPILE_FEATURES ${compile_features_cpp20})
|
||||
else()
|
||||
assert(0 "Unreachable code. Expected C++ standard to have been chosen. See Kconfig.zephyr.")
|
||||
endif()
|
||||
set(CMAKE_CXX_COMPILE_FEATURES ${CMAKE_CXX_COMPILE_FEATURES} PARENT_SCOPE)
|
||||
|
||||
zephyr_compile_options($<$<COMPILE_LANGUAGE:CXX>:${STD_CPP_DIALECT_FLAGS}>)
|
||||
endif()
|
||||
@@ -979,6 +987,7 @@ set_ifndef(CSTD c99)
|
||||
zephyr_compile_options(
|
||||
$<$<COMPILE_LANGUAGE:C>:$<TARGET_PROPERTY:compiler,cstd>${CSTD}>
|
||||
)
|
||||
set(CMAKE_C_COMPILE_FEATURES ${compile_features_${CSTD}} PARENT_SCOPE)
|
||||
|
||||
# @Intent: Configure linker scripts, i.e. generate linker scripts with variables substituted
|
||||
toolchain_ld_configure_files()
|
||||
@@ -1035,7 +1044,7 @@ if(CONFIG_USERSPACE)
|
||||
OUTPUT ${APP_SMEM_UNALIGNED_LD} ${APP_SMEM_PINNED_UNALIGNED_LD}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
${ZEPHYR_BASE}/scripts/gen_app_partitions.py
|
||||
-d ${OBJ_FILE_DIR}
|
||||
-f ${CMAKE_BINARY_DIR}/compile_commands.json
|
||||
-o ${APP_SMEM_UNALIGNED_LD}
|
||||
$<$<BOOL:${APP_SMEM_PINNED_UNALIGNED_LD}>:--pinoutput=${APP_SMEM_PINNED_UNALIGNED_LD}>
|
||||
${APP_SMEM_PINNED_PARTITION_LIST_ARG}
|
||||
|
||||
@@ -8,9 +8,10 @@
|
||||
|
||||
<a href="https://bestpractices.coreinfrastructure.org/projects/74"><img
|
||||
src="https://bestpractices.coreinfrastructure.org/projects/74/badge"></a>
|
||||
<a href="https://buildkite.com/zephyr/zephyr">
|
||||
<a
|
||||
href="https://github.com/zephyrproject-rtos/zephyr/actions/workflows/twister.yaml?query=branch%3Amain">
|
||||
<img
|
||||
src="https://badge.buildkite.com/f5bd0dc88306cee17c9b38e78d11bb74a6291e3f40e7d13f31.svg?branch=main"></a>
|
||||
src="https://github.com/zephyrproject-rtos/zephyr/actions/workflows/twister.yaml/badge.svg?event=push"></a>
|
||||
|
||||
|
||||
The Zephyr Project is a scalable real-time operating system (RTOS) supporting
|
||||
@@ -62,8 +63,7 @@ Here's a quick summary of resources to help you find your way around:
|
||||
`Zephyr Development mailing list`_. The other `Zephyr mailing list
|
||||
subgroups`_ have their own archives and sign-up pages.
|
||||
* **Nightly CI Build Status**: https://lists.zephyrproject.org/g/builds
|
||||
The builds@lists.zephyrproject.org mailing list archives the CI
|
||||
(buildkite) nightly build results.
|
||||
The builds@lists.zephyrproject.org mailing list archives the CI nightly build results.
|
||||
* **Chat**: Real-time chat happens in Zephyr's Discord Server. Use
|
||||
this `Discord Invite`_ to register.
|
||||
* **Contributing**: see the `Contribution Guide`_
|
||||
|
||||
2
VERSION
@@ -1,5 +1,5 @@
|
||||
VERSION_MAJOR = 2
|
||||
VERSION_MINOR = 7
|
||||
PATCHLEVEL = 0
|
||||
PATCHLEVEL = 1
|
||||
VERSION_TWEAK = 0
|
||||
EXTRAVERSION =
|
||||
|
||||
@@ -136,6 +136,7 @@ config NUM_IRQS
|
||||
config RGF_NUM_BANKS
|
||||
int "Number of General Purpose Register Banks"
|
||||
depends on ARC_FIRQ
|
||||
depends on NUM_IRQ_PRIO_LEVELS > 1
|
||||
range 1 2
|
||||
default 2
|
||||
help
|
||||
@@ -145,10 +146,15 @@ config RGF_NUM_BANKS
|
||||
If fast interrupts are supported but there is only 1
|
||||
register bank, the fast interrupt handler must save
|
||||
and restore general purpose registers.
|
||||
NOTE: it's required to have more than one interrupt priority level
|
||||
to use second register bank - otherwise all interrupts will use
|
||||
same register bank. Such configuration isn't supported in software
|
||||
and it is not beneficial from the performance point of view.
|
||||
|
||||
config ARC_FIRQ
|
||||
bool "FIRQ enable"
|
||||
depends on ISA_ARCV2
|
||||
depends on NUM_IRQ_PRIO_LEVELS > 1
|
||||
default y
|
||||
help
|
||||
Fast interrupts are supported (FIRQ). If FIRQ enabled, for interrupts
|
||||
@@ -156,6 +162,10 @@ config ARC_FIRQ
|
||||
other regs will be saved according to the number of register bank;
|
||||
If FIRQ is disabled, the handle of interrupts with highest priority
|
||||
will be same with other interrupts.
|
||||
NOTE: we don't allow the configuration with FIRQ enabled and only one
|
||||
interrupt priority level (so all interrupts are FIRQ). Such
|
||||
configuration isn't supported in software and it is not beneficial
|
||||
from the performance point of view.
|
||||
|
||||
config ARC_FIRQ_STACK
|
||||
bool "Enable separate firq stack"
|
||||
|
||||
BIN
boards/arm/bl5340_dvk/doc/img/bl5340_dvk_top.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
@@ -43,8 +43,8 @@ This development kit has the following features:
|
||||
* :abbr:`USB (Universal Serial Bus)`
|
||||
* :abbr:`WDT (Watchdog Timer)`
|
||||
|
||||
.. figure:: img/bl5340_dvk_front.jpg
|
||||
:width: 800px
|
||||
.. figure:: img/bl5340_dvk_top.png
|
||||
:width: 340px
|
||||
:align: center
|
||||
:alt: BL5340 DVK
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# BT6X0 board configuration
|
||||
# BT610 board configuration
|
||||
|
||||
# Copyright (c) 2021 Laird Connectivity
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
@@ -7,4 +7,4 @@ config BOARD_ENABLE_DCDC
|
||||
bool "Enable DCDC mode"
|
||||
select SOC_DCDC_NRF52X
|
||||
default y
|
||||
depends on BOARD_BT6X0
|
||||
depends on BOARD_BT610
|
||||
@@ -1,8 +1,8 @@
|
||||
# BT6X0 board configuration
|
||||
# BT610 board configuration
|
||||
|
||||
# Copyright (c) 2021 Laird Connectivity
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_BT6X0
|
||||
bool "BT6X0"
|
||||
config BOARD_BT610
|
||||
bool "BT610"
|
||||
depends on SOC_NRF52840_QIAA
|
||||
@@ -3,10 +3,10 @@
|
||||
# Copyright (c) 2021 Laird Connectivity
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if BOARD_BT6X0
|
||||
if BOARD_BT610
|
||||
|
||||
config BOARD
|
||||
default "bt6x0"
|
||||
default "bt610"
|
||||
|
||||
config IEEE802154_NRF5
|
||||
default y
|
||||
@@ -21,4 +21,4 @@ DT_COMPAT_TI_TCA9538 := ti,tca9538
|
||||
config I2C
|
||||
default $(dt_compat_on_bus,$(DT_COMPAT_TI_TCA9538),i2c)
|
||||
|
||||
endif # BOARD_BT6X0
|
||||
endif # BOARD_BT610
|
||||
@@ -8,8 +8,8 @@
|
||||
#include <nordic/nrf52840_qiaa.dtsi>
|
||||
|
||||
/ {
|
||||
model = "Laird BT6x0 Sensor";
|
||||
compatible = "lairdconnect,bt6x0";
|
||||
model = "Laird BT610 Sensor";
|
||||
compatible = "lairdconnect,bt610";
|
||||
|
||||
chosen {
|
||||
zephyr,console = &uart0;
|
||||
@@ -1,5 +1,5 @@
|
||||
identifier: bt6x0
|
||||
name: BT6X0
|
||||
identifier: bt610
|
||||
name: BT610
|
||||
type: mcu
|
||||
arch: arm
|
||||
ram: 256
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
CONFIG_SOC_SERIES_NRF52X=y
|
||||
CONFIG_SOC_NRF52840_QIAA=y
|
||||
CONFIG_BOARD_BT6X0=y
|
||||
CONFIG_BOARD_BT610=y
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
@@ -1,12 +1,12 @@
|
||||
.. _bt6x0:
|
||||
.. _bt610:
|
||||
|
||||
Laird Connectivity Sentrius BT6x0 Sensor
|
||||
Laird Connectivity Sentrius BT610 Sensor
|
||||
########################################
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
The Sentrius™ BT6x0 Sensor is a battery powered, Bluetooth v5 Long Range
|
||||
The Sentrius™ BT610 Sensor is a battery powered, Bluetooth v5 Long Range
|
||||
integrated sensor platform that uses a Nordic Semiconductor nRF52840 ARM
|
||||
Cortex-M4F CPU.
|
||||
|
||||
@@ -28,19 +28,19 @@ The sensor has the following features:
|
||||
* :abbr:`UART (Universal Asynchronous Receiver-Transmitter)`
|
||||
* :abbr:`WDT (Watchdog Timer)`
|
||||
|
||||
.. figure:: img/bt6x0_front.jpg
|
||||
.. figure:: img/bt610_front.jpg
|
||||
:width: 500px
|
||||
:align: center
|
||||
:alt: Sentrius BT6x0 Sensor, front view
|
||||
:alt: Sentrius BT610 Sensor, front view
|
||||
|
||||
Sentrius BT6x0 Sensor, front view
|
||||
Sentrius BT610 Sensor, front view
|
||||
|
||||
.. figure:: img/bt6x0_back.jpg
|
||||
.. figure:: img/bt610_back.jpg
|
||||
:width: 500px
|
||||
:align: center
|
||||
:alt: Sentrius BT6x0 Sensor, rear view
|
||||
:alt: Sentrius BT610 Sensor, rear view
|
||||
|
||||
Sentrius BT6x0 Sensor, rear view
|
||||
Sentrius BT610 Sensor, rear view
|
||||
|
||||
More information about the board can be found at the
|
||||
`Sentrius BT610 website`_.
|
||||
@@ -51,7 +51,7 @@ Hardware
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
The BT6x0 Sensor supports the following
|
||||
The BT610 Sensor supports the following
|
||||
hardware features:
|
||||
|
||||
+-----------+------------+----------------------+
|
||||
@@ -89,12 +89,12 @@ hardware features:
|
||||
| WDT | on-chip | watchdog |
|
||||
+-----------+------------+----------------------+
|
||||
|
||||
.. figure:: img/bt6x0_board.jpg
|
||||
.. figure:: img/bt610_board.jpg
|
||||
:width: 500px
|
||||
:align: center
|
||||
:alt: Sentrius BT6x0 Sensor, board layout
|
||||
:alt: Sentrius BT610 Sensor, board layout
|
||||
|
||||
Sentrius BT6x0 Sensor, board layout
|
||||
Sentrius BT610 Sensor, board layout
|
||||
|
||||
Connections and IOs
|
||||
===================
|
||||
@@ -102,7 +102,7 @@ Connections and IOs
|
||||
LED
|
||||
---
|
||||
|
||||
Two LEDs are visible through the BT6x0 housing lid. Note that the LEDs can be
|
||||
Two LEDs are visible through the BT610 housing lid. Note that the LEDs can be
|
||||
driven either directly, or via PWM. PWM should be used when current consumption
|
||||
is required to be minimised.
|
||||
|
||||
@@ -115,7 +115,7 @@ is required to be minimised.
|
||||
Push button
|
||||
------------
|
||||
|
||||
The BT6x0 incorporates three mechanical push buttons. Note these are only
|
||||
The BT610 incorporates three mechanical push buttons. Note these are only
|
||||
accessible with the housing cover removed.
|
||||
|
||||
Two of the buttons are available for use via the board DTS file, as follows.
|
||||
@@ -129,7 +129,7 @@ microcontroller.
|
||||
Magnetoresistive sensor
|
||||
-----------------------
|
||||
|
||||
The BT6x0 incorporates a Honeywell SM351LT magnetoresistive sensor. Refer to
|
||||
The BT610 incorporates a Honeywell SM351LT magnetoresistive sensor. Refer to
|
||||
the `Honeywell SM351LT datasheet`_ for further details.
|
||||
|
||||
* MAG_1 = SW2 = P1.15 (SM3531LT_0)
|
||||
@@ -157,7 +157,7 @@ This can deliver up to 50mA peak and 20mA continuous current.
|
||||
Sensor connectivity
|
||||
-------------------
|
||||
|
||||
The BT6x0 incorporates three terminal blocks J5, J6 & J7 that allow
|
||||
The BT610 incorporates three terminal blocks J5, J6 & J7 that allow
|
||||
connectivity to its sensor inputs, as follows.
|
||||
|
||||
Terminal Block J5
|
||||
@@ -485,12 +485,12 @@ Required pins are as follows.
|
||||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
Applications for the ``bt6x0`` board configuration can be
|
||||
Applications for the ``bt610`` board configuration can be
|
||||
built and flashed in the usual way (see :ref:`build_an_application`
|
||||
and :ref:`application_run` for more details); however, the standard
|
||||
debugging targets are not currently available.
|
||||
|
||||
The BT6x0 features a 10 way header, J3, for connection of a
|
||||
The BT610 features a 10 way header, J3, for connection of a
|
||||
programmer/debugger, with pinout as follows.
|
||||
|
||||
+-----------+------------+----------------------+
|
||||
@@ -537,7 +537,7 @@ pinout as follows.
|
||||
+-----------+------------+----------------------+-----------+
|
||||
|
||||
Note that pin 3 requires a solder bridge to be closed to enable powering of the
|
||||
BT6x0 board via the UART connector.
|
||||
BT610 board via the UART connector.
|
||||
|
||||
Flashing
|
||||
========
|
||||
@@ -552,7 +552,7 @@ Here is an example for the :ref:`hello_world` application.
|
||||
|
||||
First, run your favorite terminal program to listen for output.
|
||||
|
||||
NOTE: On the BT6x0, the UART lines are at TTL levels and must be passed through
|
||||
NOTE: On the BT610, the UART lines are at TTL levels and must be passed through
|
||||
an appropriate line driver circuit for translation to RS232 levels. Refer to
|
||||
the `MAX3232 datasheet`_ for a suitable driver IC.
|
||||
|
||||
@@ -560,14 +560,14 @@ the `MAX3232 datasheet`_ for a suitable driver IC.
|
||||
|
||||
$ minicom -D <tty_device> -b 115200
|
||||
|
||||
Replace :code:`<tty_device>` with the port where the BT6x0 can be found. For
|
||||
Replace :code:`<tty_device>` with the port where the BT610 can be found. For
|
||||
example, under Linux, :code:`/dev/ttyUSB0`.
|
||||
|
||||
Then build and flash the application in the usual way.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: bt6x0
|
||||
:board: bt610
|
||||
:goals: build flash
|
||||
|
||||
Note that an external debugger is required to perform application flashing.
|
||||
@@ -575,14 +575,14 @@ Note that an external debugger is required to perform application flashing.
|
||||
Debugging
|
||||
=========
|
||||
|
||||
The ``bt6x0`` board does not have an on-board J-Link debug IC
|
||||
The ``bt610`` board does not have an on-board J-Link debug IC
|
||||
as some nRF5x development boards, however, instructions from the
|
||||
:ref:`nordic_segger` page also apply to this board, with the additional step
|
||||
of connecting an external debugger.
|
||||
|
||||
Testing Bluetooth on the BT6x0
|
||||
Testing Bluetooth on the BT610
|
||||
***********************************
|
||||
Many of the Bluetooth examples will work on the BT6x0.
|
||||
Many of the Bluetooth examples will work on the BT610.
|
||||
Try them out:
|
||||
|
||||
* :ref:`ble_peripheral`
|
||||
@@ -590,7 +590,7 @@ Try them out:
|
||||
* :ref:`bluetooth-ibeacon-sample`
|
||||
|
||||
|
||||
Testing the LEDs and buttons on the BT6x0
|
||||
Testing the LEDs and buttons on the BT610
|
||||
*****************************************
|
||||
|
||||
There are 2 samples that allow you to test that the buttons (switches) and LEDs
|
||||
@@ -601,7 +601,7 @@ on the board are working properly with Zephyr:
|
||||
|
||||
You can build and flash the examples to make sure Zephyr is running correctly
|
||||
on your board. The button, LED and sensor device definitions can be found in
|
||||
:zephyr_file:`boards/arm/bt6x0/bt6x0.dts`.
|
||||
:zephyr_file:`boards/arm/bt610/bt610.dts`.
|
||||
|
||||
|
||||
References
|
||||
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
@@ -40,7 +40,7 @@ The Waveshare Open103Z configuration supports the following hardware features:
|
||||
+-----------+------------+--------------------------------------+
|
||||
| I2C | on-chip | i2c |
|
||||
+-----------+------------+--------------------------------------+
|
||||
| CAN | on-chip | can |
|
||||
| CAN | on-chip | can (disabled by default) |
|
||||
+-----------+------------+--------------------------------------+
|
||||
| USB | on-chip | usb |
|
||||
+-----------+------------+--------------------------------------+
|
||||
|
||||
@@ -16,4 +16,3 @@ supported:
|
||||
- watchdog
|
||||
- adc
|
||||
- usb_device
|
||||
- can
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
# set(<old_board_name>_DEPRECATED <new_board_name>)
|
||||
|
||||
set(bl5340_dvk_cpuappns_DEPRECATED bl5340_dvk_cpuapp_ns)
|
||||
set(bt6x0_DEPRECATED bt610)
|
||||
set(mps2_an521_nonsecure_DEPRECATED mps2_an521_ns)
|
||||
set(musca_b1_nonsecure_DEPRECATED musca_b1_ns)
|
||||
set(musca_s1_nonsecure_DEPRECATED musca_s1_ns)
|
||||
|
||||
@@ -546,6 +546,14 @@ set(SOC_SERIES ${CONFIG_SOC_SERIES})
|
||||
set(SOC_TOOLCHAIN_NAME ${CONFIG_SOC_TOOLCHAIN_NAME})
|
||||
set(SOC_FAMILY ${CONFIG_SOC_FAMILY})
|
||||
|
||||
# For the gen_app_partitions.py to work correctly, we must ensure that
|
||||
# all targets exports their compile commands to fetch object files.
|
||||
# We enable it unconditionally, as this is also useful for several IDEs
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE CACHE BOOL
|
||||
"Export CMake compile commands. Used by gen_app_partitions.py script"
|
||||
FORCE
|
||||
)
|
||||
|
||||
if("${SOC_SERIES}" STREQUAL "")
|
||||
set(SOC_PATH ${SOC_NAME})
|
||||
else()
|
||||
|
||||
26
cmake/compiler/compiler_features.cmake
Normal file
@@ -0,0 +1,26 @@
|
||||
set(c23id c2x gnu2x)
|
||||
set(c17id c17 c18 gnu17 gnu18 "iso9899:2017" "iso9899:2018")
|
||||
set(c11id c11 gnu11 "iso9899:2011")
|
||||
set(c99id c99 gnu99 "iso9899:1999")
|
||||
set(c90id c89 c90 gnu89 gnu90 "iso9899:1990" "iso9899:199409")
|
||||
|
||||
set(compile_features_list)
|
||||
|
||||
# For each id value above a compile_features_${idval} with a list of supported
|
||||
# `c_std_XX` values are created for easy lookup.
|
||||
# For example, the settings
|
||||
# - `compile_feature_c99` will contain `c_std_90;c_std_99`
|
||||
# - `compile_feature_iso9899:2011` will contain `c_std_90;c_std_99;c_std_11`
|
||||
# that can then be used to set CMAKE_C_COMPILE_FEATURES accordingly.
|
||||
foreach(standard 90 99 11 17 23)
|
||||
list(APPEND compile_features_list c_std_${standard})
|
||||
foreach(id ${c${standard}id})
|
||||
set(compile_features_${id} ${compile_features_list})
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
set(compile_features_cpp98 cxx_std_98)
|
||||
set(compile_features_cpp11 cxx_std_11 ${compile_features_cpp98})
|
||||
set(compile_features_cpp14 cxx_std_14 ${compile_features_cpp11})
|
||||
set(compile_features_cpp17 cxx_std_17 ${compile_features_cpp14})
|
||||
set(compile_features_cpp20 cxx_std_20 ${compile_features_cpp17})
|
||||
@@ -24,6 +24,11 @@ set(TOOLCHAIN_SIGNATURE ${CMAKE_C_COMPILER_MD5_SUM})
|
||||
string(MD5 COMPILER_SIGNATURE ${CMAKE_C_COMPILER}_${CMAKE_C_COMPILER_ID}_${CMAKE_C_COMPILER_VERSION})
|
||||
set(TOOLCHAIN_SIGNATURE ${TOOLCHAIN_SIGNATURE}_${COMPILER_SIGNATURE})
|
||||
|
||||
# Load the compile features file which will provide compile features lists for
|
||||
# various C / CXX language dialects that can then be exported based on current
|
||||
# Zephyr Kconfig settings or the CSTD global property.
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/compiler/compiler_features.cmake)
|
||||
|
||||
# Loading of templates are strictly not needed as they does not set any
|
||||
# properties.
|
||||
# They purely provides an overview as well as a starting point for supporting
|
||||
|
||||
@@ -179,8 +179,8 @@ on https://github.com and have Git tools available on your development system.
|
||||
(Linux, macOS, and Windows) but some of the tools used in the sections below
|
||||
are only available on Linux and macOS. On Windows, instead of running these
|
||||
tools yourself, you will need to rely on the Continuous Integration (CI)
|
||||
service ``buildkite``, which runs automatically on GitHub when you submit
|
||||
your Pull Request (PR). You can see any failure results in the Buildkite
|
||||
service using Github Actions, which runs automatically on GitHub when you submit
|
||||
your Pull Request (PR). You can see any failure results in the workflow
|
||||
details link near the end of the PR conversation list. See
|
||||
`Continuous Integration`_ for more information
|
||||
|
||||
@@ -696,11 +696,10 @@ every Pull Request (PR) in order to verify several aspects of the PR:
|
||||
* Twister builds for multiple architectures and boards
|
||||
* Documentation build to verify any doc changes
|
||||
|
||||
CI is run both on the ``buildkite`` cloud service and Github Actions and it uses
|
||||
the same tools described in the `Contribution Tools`_ section.
|
||||
The CI results must be green indicating "All checks have passed" before
|
||||
the Pull Request can be merged. CI is run when the PR is created, and
|
||||
again every time the PR is modified with a commit.
|
||||
CI is run on Github Actions and it uses the same tools described in the
|
||||
`Contribution Tools`_ section. The CI results must be green indicating "All
|
||||
checks have passed" before the Pull Request can be merged. CI is run when the
|
||||
PR is created, and again every time the PR is modified with a commit.
|
||||
|
||||
The current status of the CI run can always be found at the bottom of the
|
||||
GitHub PR page, below the review status. Depending on the success or failure
|
||||
@@ -710,17 +709,16 @@ of the run you will see:
|
||||
* "All checks have failed"
|
||||
|
||||
In case of failure you can click on the "Details" link presented below the
|
||||
failure message in order to navigate to ``buildkite`` or ``Github Actions``
|
||||
and inspect the results.
|
||||
Once you click on the link you will be taken to the ``buildkite`` summary
|
||||
failure message in order to navigate to ``Github Actions`` and inspect the
|
||||
results.
|
||||
Once you click on the link you will be taken to the ``Github actions`` summary
|
||||
results page where a table with all the different builds will be shown. To see
|
||||
what build or test failed click on the row that contains the failed (i.e.
|
||||
non-green) build and then click on the "Tests" tab to see the console output
|
||||
messages indicating the failure.
|
||||
non-green) build.
|
||||
|
||||
The `builds@lists.zephyrproject.org mailing list
|
||||
<https://lists.zephyrproject.org/g/builds>`_
|
||||
archives the CI (buildkite) nightly build results.
|
||||
<https://lists.zephyrproject.org/g/builds>`_ archives any nightly build results
|
||||
produced by CI.
|
||||
|
||||
Contributions to External Modules
|
||||
**********************************
|
||||
|
||||
@@ -2,6 +2,61 @@
|
||||
|
||||
.. _zephyr_2.7:
|
||||
|
||||
.. _zephyr_2.7.1:
|
||||
|
||||
Zephyr 2.7.1
|
||||
####################
|
||||
|
||||
This is an LTS maintenance release with fixes.
|
||||
|
||||
Security Vulnerability Related
|
||||
******************************
|
||||
|
||||
The following security vulnerabilities (CVEs) were addressed in this
|
||||
release:
|
||||
|
||||
* (N/A)
|
||||
|
||||
More detailed information can be found in:
|
||||
https://docs.zephyrproject.org/latest/security/vulnerabilities.html
|
||||
|
||||
Issues Fixed
|
||||
************
|
||||
|
||||
These GitHub issues were addressed since the previous 2.7.0 tagged
|
||||
release:
|
||||
|
||||
.. comment List derived from GitHub Issue query: ...
|
||||
* :github:`issuenumber` - issue title
|
||||
|
||||
* :github:`36558` - Use of CMAKE_<lang>_COMPILER_FORCED on host-builds flag breaks third-party libraries
|
||||
* :github:`36852` - acrn_ehl_crb: the test of tests/subsys/cpp/libcxx/ failed
|
||||
* :github:`38181` - tests/drivers/uart/uart_basic_api/drivers.uart.cdc_acm fails to build
|
||||
* :github:`38612` - Fault with assertions enabled prevents detailed output because of ISR() assertion check in shell function
|
||||
* :github:`38972` - logging: Cleaning references to tracing in logging
|
||||
* :github:`38999` - Bluetooth: Controller: Fix HCI command parameter check failures
|
||||
* :github:`39022` - tests/drivers/uart/uart_basic_api/drivers.uart.cdc_acm fails to build
|
||||
* :github:`39297` - Lorawan regression in v2.7rc4 for US915 and AU915 regions
|
||||
* :github:`39361` - BL5340 image is broken on documentation page
|
||||
* :github:`39409` - runners: canopen: program download fails with slow flash access and/or congested CAN nets
|
||||
* :github:`39523` - task watchdog crash/asset on NRF52840 - need to reorder task_wdt_feed() in task_wdt_add()
|
||||
* :github:`39541` - can: mcux_flexcan: wrong timing calculation
|
||||
* :github:`39575` - k_mutex_lock and k_sem_take with K_FOREVER return -EAGAIN value
|
||||
* :github:`39594` - Possible bug or undocumented behaviour of spi_write
|
||||
* :github:`39609` - spi: slave: division by zero in timeout calculation
|
||||
* :github:`39687` - sensor: qdec_nrfx: PM callback has incorrect signature
|
||||
* :github:`39704` - Using OpenThread makes the system unresponsive after 49.7 days
|
||||
* :github:`39817` - drivers: pwm: nxp: (potentially) Incorrect return value on API function
|
||||
* :github:`39851` - [Coverity CID: 240242] Dereference after null check in tests/bluetooth/tester/src/l2cap.c
|
||||
* :github:`39882` - Bluetooth Host qualification on 2.7 branch
|
||||
* :github:`40133` - mimxrt1060-evk flash shell command causes shell deadlock
|
||||
* :github:`40244` - hci_spi sample cannot be built for nrf51dk_nrf51422 and 96b_carbon_nrf51
|
||||
* :github:`40290` - CAN_STM32: Build error with CONFIG_CAN_AUTO_BUS_OFF_RECOVERY=n
|
||||
* :github:`40844` - gen_app_partitions scans object files unrelated to current image
|
||||
* :github:`41237` - drivers: ieee802154_dw1000: use dedicated workqueue
|
||||
|
||||
.. _zephyr_2.7.0:
|
||||
|
||||
Zephyr 2.7.0
|
||||
############
|
||||
|
||||
|
||||
@@ -462,9 +462,9 @@ int mcux_flexcan_recover(const struct device *dev, k_timeout_t timeout)
|
||||
start_time = k_uptime_ticks();
|
||||
config->base->CTRL1 &= ~CAN_CTRL1_BOFFREC_MASK;
|
||||
|
||||
if (timeout != K_NO_WAIT) {
|
||||
if (!K_TIMEOUT_EQ(timeout, K_NO_WAIT)) {
|
||||
while (mcux_flexcan_get_state(dev, NULL) == CAN_BUS_OFF) {
|
||||
if (timeout != K_FOREVER &&
|
||||
if (!K_TIMEOUT_EQ(timeout, K_FOREVER) &&
|
||||
k_uptime_ticks() - start_time >= timeout.ticks) {
|
||||
ret = CAN_TIMEOUT;
|
||||
}
|
||||
@@ -747,19 +747,28 @@ static const struct can_driver_api mcux_flexcan_driver_api = {
|
||||
#endif
|
||||
.register_state_change_isr = mcux_flexcan_register_state_change_isr,
|
||||
.get_core_clock = mcux_flexcan_get_core_clock,
|
||||
/*
|
||||
* FlexCAN timing limits are specified in the "FLEXCANx_CTRL1 field
|
||||
* descriptions" table in the SoC reference manual.
|
||||
*
|
||||
* Note that the values here are the "physical" timing limits, whereas
|
||||
* the register field limits are physical values minus 1 (which is
|
||||
* handled by the flexcan_config_t field assignments elsewhere in this
|
||||
* driver).
|
||||
*/
|
||||
.timing_min = {
|
||||
.sjw = 0x1,
|
||||
.sjw = 0x01,
|
||||
.prop_seg = 0x01,
|
||||
.phase_seg1 = 0x01,
|
||||
.phase_seg2 = 0x01,
|
||||
.phase_seg2 = 0x02,
|
||||
.prescaler = 0x01
|
||||
},
|
||||
.timing_max = {
|
||||
.sjw = 0x03,
|
||||
.prop_seg = 0x07,
|
||||
.phase_seg1 = 0x07,
|
||||
.phase_seg2 = 0x07,
|
||||
.prescaler = 0xFF
|
||||
.sjw = 0x04,
|
||||
.prop_seg = 0x08,
|
||||
.phase_seg1 = 0x08,
|
||||
.phase_seg2 = 0x08,
|
||||
.prescaler = 0x100
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -586,7 +586,7 @@ int can_stm32_recover(const struct device *dev, k_timeout_t timeout)
|
||||
start_time = k_uptime_ticks();
|
||||
|
||||
while (can->ESR & CAN_ESR_BOFF) {
|
||||
if (timeout != K_FOREVER &&
|
||||
if (!K_TIMEOUT_EQ(timeout, K_FOREVER) &&
|
||||
k_uptime_ticks() - start_time >= timeout.ticks) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ static inline int stm32_clock_control_off(const struct device *dev,
|
||||
defined(CONFIG_SOC_SERIES_STM32WLX) || \
|
||||
defined(CONFIG_SOC_SERIES_STM32G4X)
|
||||
case STM32_CLOCK_BUS_AHB3:
|
||||
LL_AHB3_GRP1_EnableClock(pclken->enr);
|
||||
LL_AHB3_GRP1_DisableClock(pclken->enr);
|
||||
break;
|
||||
#endif /* CONFIG_SOC_SERIES_STM32_* */
|
||||
case STM32_CLOCK_BUS_APB1:
|
||||
|
||||
@@ -254,20 +254,6 @@ static void set_up_clk_msis(void)
|
||||
|
||||
LL_RCC_MSIS_SetRange(STM32_MSIS_RANGE << RCC_ICSCR1_MSISRANGE_Pos);
|
||||
|
||||
if (STM32_MSIS_RANGE < 4) {
|
||||
/* MSI clock trimming for ranges 0 to 3 */
|
||||
LL_RCC_MSI_SetCalibTrimming(0, LL_RCC_MSI_OSCILLATOR_0);
|
||||
} else if (STM32_MSIS_RANGE < 8) {
|
||||
/* MSI clock trimming for ranges 4 to 7 */
|
||||
LL_RCC_MSI_SetCalibTrimming(0, LL_RCC_MSI_OSCILLATOR_1);
|
||||
} else if (STM32_MSIS_RANGE < 12) {
|
||||
/* MSI clock trimming for ranges 8 to 11 */
|
||||
LL_RCC_MSI_SetCalibTrimming(0, LL_RCC_MSI_OSCILLATOR_2);
|
||||
} else {
|
||||
/* MSI clock trimming for ranges 12 to 15 */
|
||||
LL_RCC_MSI_SetCalibTrimming(0, LL_RCC_MSI_OSCILLATOR_3);
|
||||
}
|
||||
|
||||
#if STM32_MSIS_PLL_MODE
|
||||
|
||||
#if !STM32_LSE_CLOCK
|
||||
@@ -491,8 +477,6 @@ void config_src_sysclk_msis(LL_UTILS_ClkInitTypeDef s_ClkInitStruct)
|
||||
uint32_t old_hclk_freq;
|
||||
uint32_t new_hclk_freq;
|
||||
|
||||
set_up_clk_msis();
|
||||
|
||||
old_hclk_freq = HAL_RCC_GetHCLKFreq();
|
||||
|
||||
/* Calculate new SystemCoreClock variable with MSI freq */
|
||||
@@ -511,7 +495,17 @@ void config_src_sysclk_msis(LL_UTILS_ClkInitTypeDef s_ClkInitStruct)
|
||||
LL_SetFlashLatency(new_hclk_freq);
|
||||
}
|
||||
|
||||
if (new_hclk_freq > MHZ(24)) {
|
||||
/* when freq > 24MHz it is necessary to set voltage scaling
|
||||
* to range3
|
||||
*/
|
||||
LL_PWR_SetRegulVoltageScaling(LL_PWR_REGU_VOLTAGE_SCALE3);
|
||||
while (LL_PWR_IsActiveFlag_VOS() == 0) {
|
||||
}
|
||||
}
|
||||
|
||||
/* Set MSIS as SYSCLCK source */
|
||||
set_up_clk_msis();
|
||||
LL_RCC_SetSysClkSource(LL_RCC_SYS_CLKSOURCE_MSIS);
|
||||
LL_RCC_SetAHBPrescaler(s_ClkInitStruct.AHBCLKDivider);
|
||||
while (LL_RCC_GetSysClkSource() != LL_RCC_SYS_CLKSOURCE_STATUS_MSIS) {
|
||||
|
||||
@@ -23,6 +23,17 @@
|
||||
static uint8_t nor_write_buf[SPI_NOR_PAGE_SIZE];
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NOTE: If CONFIG_FLASH_MCUX_FLEXSPI_XIP is selected, Any external functions
|
||||
* called while interacting with the flexspi MUST be relocated to SRAM or ITCM
|
||||
* at runtime, so that the chip does not access the flexspi to read program
|
||||
* instructions while it is being written to
|
||||
*/
|
||||
#if defined(CONFIG_FLASH_MCUX_FLEXSPI_XIP) && (CONFIG_FLASH_LOG_LEVEL > 0)
|
||||
#warning "Enabling flash driver logging and XIP mode simultaneously can cause \
|
||||
read-while-write hazards. This configuration is not recommended."
|
||||
#endif
|
||||
|
||||
LOG_MODULE_REGISTER(flash_flexspi_nor, CONFIG_FLASH_LOG_LEVEL);
|
||||
|
||||
enum {
|
||||
|
||||
@@ -23,6 +23,17 @@
|
||||
static uint8_t nor_write_buf[SPI_NOR_PAGE_SIZE];
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NOTE: If CONFIG_FLASH_MCUX_FLEXSPI_XIP is selected, Any external functions
|
||||
* called while interacting with the flexspi MUST be relocated to SRAM or ITCM
|
||||
* at runtime, so that the chip does not access the flexspi to read program
|
||||
* instructions while it is being written to
|
||||
*/
|
||||
#if defined(CONFIG_FLASH_MCUX_FLEXSPI_XIP) && (CONFIG_FLASH_LOG_LEVEL > 0)
|
||||
#warning "Enabling flash driver logging and XIP mode simultaneously can cause \
|
||||
read-while-write hazards. This configuration is not recommended."
|
||||
#endif
|
||||
|
||||
LOG_MODULE_REGISTER(flash_flexspi_nor, CONFIG_FLASH_LOG_LEVEL);
|
||||
|
||||
enum {
|
||||
|
||||
@@ -632,7 +632,7 @@ static void dwt_gpio_callback(const struct device *dev,
|
||||
struct dwt_context *ctx = CONTAINER_OF(cb, struct dwt_context, gpio_cb);
|
||||
|
||||
LOG_DBG("IRQ callback triggered %p", ctx);
|
||||
k_work_submit(&ctx->irq_cb_work);
|
||||
k_work_submit_to_queue(&dwt_work_queue, &ctx->irq_cb_work);
|
||||
}
|
||||
|
||||
static enum ieee802154_hw_caps dwt_get_capabilities(const struct device *dev)
|
||||
|
||||
@@ -973,14 +973,17 @@ void nrf_802154_transmitted_raw(uint8_t *frame,
|
||||
nrf5_data.tx_frame_is_secured = metadata->frame_props.is_secured;
|
||||
nrf5_data.tx_frame_mac_hdr_rdy = metadata->frame_props.dynamic_data_is_set;
|
||||
nrf5_data.ack_frame.psdu = metadata->data.transmitted.p_ack;
|
||||
nrf5_data.ack_frame.rssi = metadata->data.transmitted.power;
|
||||
nrf5_data.ack_frame.lqi = metadata->data.transmitted.lqi;
|
||||
|
||||
#if !defined(CONFIG_NRF_802154_SER_HOST) && defined(CONFIG_NET_PKT_TIMESTAMP)
|
||||
nrf5_data.ack_frame.time =
|
||||
nrf_802154_first_symbol_timestamp_get(
|
||||
metadata->data.transmitted.time, nrf5_data.ack_frame.psdu[0]);
|
||||
if (nrf5_data.ack_frame.psdu) {
|
||||
nrf5_data.ack_frame.rssi = metadata->data.transmitted.power;
|
||||
nrf5_data.ack_frame.lqi = metadata->data.transmitted.lqi;
|
||||
|
||||
#if !IS_ENABLED(CONFIG_NRF_802154_SER_HOST) && IS_ENABLED(CONFIG_NET_PKT_TIMESTAMP)
|
||||
nrf5_data.ack_frame.time =
|
||||
nrf_802154_first_symbol_timestamp_get(
|
||||
metadata->data.transmitted.time, nrf5_data.ack_frame.psdu[0]);
|
||||
#endif
|
||||
}
|
||||
|
||||
k_sem_give(&nrf5_data.tx_wait);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ LOG_MODULE_REGISTER(pca9633);
|
||||
/* PCA9633 control register */
|
||||
#define PCA9633_MODE1 0x00
|
||||
#define PCA9633_MODE2 0x01
|
||||
#define PCA9633_PWM_BASE 0x02
|
||||
#define PCA9633_PWM_BASE 0x02 /* Reg 0x02-0x05 for brightness control LED01-04 */
|
||||
#define PCA9633_GRPPWM 0x06
|
||||
#define PCA9633_GRPFREQ 0x07
|
||||
#define PCA9633_LEDOUT 0x08
|
||||
@@ -43,8 +43,11 @@ LOG_MODULE_REGISTER(pca9633);
|
||||
|
||||
#define PCA9633_MASK 0x03
|
||||
|
||||
struct pca9633_config {
|
||||
struct i2c_dt_spec i2c;
|
||||
};
|
||||
|
||||
struct pca9633_data {
|
||||
const struct device *i2c;
|
||||
struct led_data dev_data;
|
||||
};
|
||||
|
||||
@@ -52,6 +55,7 @@ static int pca9633_led_blink(const struct device *dev, uint32_t led,
|
||||
uint32_t delay_on, uint32_t delay_off)
|
||||
{
|
||||
struct pca9633_data *data = dev->data;
|
||||
const struct pca9633_config *config = dev->config;
|
||||
struct led_data *dev_data = &data->dev_data;
|
||||
uint8_t gdc, gfrq;
|
||||
uint32_t period;
|
||||
@@ -69,7 +73,7 @@ static int pca9633_led_blink(const struct device *dev, uint32_t led,
|
||||
* GDC = ((time_on * 256) / period)
|
||||
*/
|
||||
gdc = delay_on * 256U / period;
|
||||
if (i2c_reg_write_byte(data->i2c, DT_INST_REG_ADDR(0),
|
||||
if (i2c_reg_write_byte_dt(&config->i2c,
|
||||
PCA9633_GRPPWM,
|
||||
gdc)) {
|
||||
LOG_ERR("LED reg write failed");
|
||||
@@ -83,7 +87,7 @@ static int pca9633_led_blink(const struct device *dev, uint32_t led,
|
||||
* GFRQ = ((period * 24 / 1000) - 1)
|
||||
*/
|
||||
gfrq = (period * 24U / 1000) - 1;
|
||||
if (i2c_reg_write_byte(data->i2c, DT_INST_REG_ADDR(0),
|
||||
if (i2c_reg_write_byte_dt(&config->i2c,
|
||||
PCA9633_GRPFREQ,
|
||||
gfrq)) {
|
||||
LOG_ERR("LED reg write failed");
|
||||
@@ -91,7 +95,7 @@ static int pca9633_led_blink(const struct device *dev, uint32_t led,
|
||||
}
|
||||
|
||||
/* Enable blinking mode */
|
||||
if (i2c_reg_update_byte(data->i2c, DT_INST_REG_ADDR(0),
|
||||
if (i2c_reg_update_byte_dt(&config->i2c,
|
||||
PCA9633_MODE2,
|
||||
PCA9633_MODE2_DMBLNK,
|
||||
PCA9633_MODE2_DMBLNK)) {
|
||||
@@ -100,7 +104,7 @@ static int pca9633_led_blink(const struct device *dev, uint32_t led,
|
||||
}
|
||||
|
||||
/* Select the GRPPWM source to drive the LED outpout */
|
||||
if (i2c_reg_update_byte(data->i2c, DT_INST_REG_ADDR(0),
|
||||
if (i2c_reg_update_byte_dt(&config->i2c,
|
||||
PCA9633_LEDOUT,
|
||||
PCA9633_MASK << (led << 1),
|
||||
PCA9633_LED_GRP_PWM << (led << 1))) {
|
||||
@@ -114,6 +118,7 @@ static int pca9633_led_blink(const struct device *dev, uint32_t led,
|
||||
static int pca9633_led_set_brightness(const struct device *dev, uint32_t led,
|
||||
uint8_t value)
|
||||
{
|
||||
const struct pca9633_config *config = dev->config;
|
||||
struct pca9633_data *data = dev->data;
|
||||
struct led_data *dev_data = &data->dev_data;
|
||||
uint8_t val;
|
||||
@@ -125,7 +130,7 @@ static int pca9633_led_set_brightness(const struct device *dev, uint32_t led,
|
||||
|
||||
/* Set the LED brightness value */
|
||||
val = (value * 255U) / dev_data->max_brightness;
|
||||
if (i2c_reg_write_byte(data->i2c, DT_INST_REG_ADDR(0),
|
||||
if (i2c_reg_write_byte_dt(&config->i2c,
|
||||
PCA9633_PWM_BASE + led,
|
||||
val)) {
|
||||
LOG_ERR("LED reg write failed");
|
||||
@@ -133,7 +138,7 @@ static int pca9633_led_set_brightness(const struct device *dev, uint32_t led,
|
||||
}
|
||||
|
||||
/* Set the LED driver to be controlled through its PWMx register. */
|
||||
if (i2c_reg_update_byte(data->i2c, DT_INST_REG_ADDR(0),
|
||||
if (i2c_reg_update_byte_dt(&config->i2c,
|
||||
PCA9633_LEDOUT,
|
||||
PCA9633_MASK << (led << 1),
|
||||
PCA9633_LED_PWM << (led << 1))) {
|
||||
@@ -146,10 +151,10 @@ static int pca9633_led_set_brightness(const struct device *dev, uint32_t led,
|
||||
|
||||
static inline int pca9633_led_on(const struct device *dev, uint32_t led)
|
||||
{
|
||||
struct pca9633_data *data = dev->data;
|
||||
const struct pca9633_config *config = dev->config;
|
||||
|
||||
/* Set LED state to ON */
|
||||
if (i2c_reg_update_byte(data->i2c, DT_INST_REG_ADDR(0),
|
||||
if (i2c_reg_update_byte_dt(&config->i2c,
|
||||
PCA9633_LEDOUT,
|
||||
PCA9633_MASK << (led << 1),
|
||||
PCA9633_LED_ON << (led << 1))) {
|
||||
@@ -162,10 +167,10 @@ static inline int pca9633_led_on(const struct device *dev, uint32_t led)
|
||||
|
||||
static inline int pca9633_led_off(const struct device *dev, uint32_t led)
|
||||
{
|
||||
struct pca9633_data *data = dev->data;
|
||||
const struct pca9633_config *config = dev->config;
|
||||
|
||||
/* Set LED state to OFF */
|
||||
if (i2c_reg_update_byte(data->i2c, DT_INST_REG_ADDR(0),
|
||||
if (i2c_reg_update_byte_dt(&config->i2c,
|
||||
PCA9633_LEDOUT,
|
||||
PCA9633_MASK << (led << 1),
|
||||
PCA9633_LED_OFF)) {
|
||||
@@ -178,17 +183,17 @@ static inline int pca9633_led_off(const struct device *dev, uint32_t led)
|
||||
|
||||
static int pca9633_led_init(const struct device *dev)
|
||||
{
|
||||
const struct pca9633_config *config = dev->config;
|
||||
struct pca9633_data *data = dev->data;
|
||||
struct led_data *dev_data = &data->dev_data;
|
||||
|
||||
data->i2c = device_get_binding(DT_INST_BUS_LABEL(0));
|
||||
if (data->i2c == NULL) {
|
||||
LOG_DBG("Failed to get I2C device");
|
||||
return -EINVAL;
|
||||
if (!device_is_ready(config->i2c.bus)) {
|
||||
LOG_ERR("I2C bus is not ready");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Take the LED driver out from Sleep mode. */
|
||||
if (i2c_reg_update_byte(data->i2c, DT_INST_REG_ADDR(0),
|
||||
if (i2c_reg_update_byte_dt(&config->i2c,
|
||||
PCA9633_MODE1,
|
||||
PCA9633_MODE1_SLEEP,
|
||||
~PCA9633_MODE1_SLEEP)) {
|
||||
@@ -204,8 +209,6 @@ static int pca9633_led_init(const struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct pca9633_data pca9633_led_data;
|
||||
|
||||
static const struct led_driver_api pca9633_led_api = {
|
||||
.blink = pca9633_led_blink,
|
||||
.set_brightness = pca9633_led_set_brightness,
|
||||
@@ -213,7 +216,16 @@ static const struct led_driver_api pca9633_led_api = {
|
||||
.off = pca9633_led_off,
|
||||
};
|
||||
|
||||
DEVICE_DT_INST_DEFINE(0, &pca9633_led_init, NULL,
|
||||
&pca9633_led_data,
|
||||
NULL, POST_KERNEL, CONFIG_LED_INIT_PRIORITY,
|
||||
&pca9633_led_api);
|
||||
#define PCA9633_DEVICE(id) \
|
||||
static const struct pca9633_config pca9633_##id##_cfg = { \
|
||||
.i2c = I2C_DT_SPEC_INST_GET(id) \
|
||||
}; \
|
||||
static struct pca9633_data pca9633_##id##_data; \
|
||||
\
|
||||
DEVICE_DT_INST_DEFINE(id, &pca9633_led_init, NULL, \
|
||||
&pca9633_##id##_data, \
|
||||
&pca9633_##id##_cfg, POST_KERNEL, \
|
||||
CONFIG_LED_INIT_PRIORITY, \
|
||||
&pca9633_led_api);
|
||||
|
||||
DT_INST_FOREACH_STATUS_OKAY(PCA9633_DEVICE)
|
||||
|
||||
@@ -11,6 +11,18 @@
|
||||
|
||||
#include "memc_mcux_flexspi.h"
|
||||
|
||||
|
||||
/*
|
||||
* NOTE: If CONFIG_FLASH_MCUX_FLEXSPI_XIP is selected, Any external functions
|
||||
* called while interacting with the flexspi MUST be relocated to SRAM or ITCM
|
||||
* at runtime, so that the chip does not access the flexspi to read program
|
||||
* instructions while it is being written to
|
||||
*/
|
||||
#if defined(CONFIG_FLASH_MCUX_FLEXSPI_XIP) && (CONFIG_MEMC_LOG_LEVEL > 0)
|
||||
#warning "Enabling memc driver logging and XIP mode simultaneously can cause \
|
||||
read-while-write hazards. This configuration is not recommended."
|
||||
#endif
|
||||
|
||||
LOG_MODULE_REGISTER(memc_flexspi, CONFIG_MEMC_LOG_LEVEL);
|
||||
|
||||
struct memc_flexspi_config {
|
||||
|
||||
@@ -11,7 +11,19 @@
|
||||
|
||||
#include "memc_mcux_flexspi.h"
|
||||
|
||||
LOG_MODULE_DECLARE(memc_flexspi, CONFIG_MEMC_LOG_LEVEL);
|
||||
|
||||
/*
|
||||
* NOTE: If CONFIG_FLASH_MCUX_FLEXSPI_XIP is selected, Any external functions
|
||||
* called while interacting with the flexspi MUST be relocated to SRAM or ITCM
|
||||
* at runtime, so that the chip does not access the flexspi to read program
|
||||
* instructions while it is being written to
|
||||
*/
|
||||
#if defined(CONFIG_FLASH_MCUX_FLEXSPI_XIP) && (CONFIG_MEMC_LOG_LEVEL > 0)
|
||||
#warning "Enabling memc driver logging and XIP mode simultaneously can cause \
|
||||
read-while-write hazards. This configuration is not recommended."
|
||||
#endif
|
||||
|
||||
LOG_MODULE_REGISTER(memc_flexspi, CONFIG_MEMC_LOG_LEVEL);
|
||||
|
||||
enum {
|
||||
READ_DATA,
|
||||
|
||||
@@ -313,6 +313,8 @@ static const struct mdm_control_pinconfig pinconfig[] = {
|
||||
#else
|
||||
#define MODEM_HL7800_ADDRESS_FAMILY "IPV6"
|
||||
#endif
|
||||
#define MDM_HL7800_SOCKET_AF_IPV4 0
|
||||
#define MDM_HL7800_SOCKET_AF_IPV6 1
|
||||
|
||||
#define SET_RAT_M1_CMD_LEGACY "AT+KSRAT=0"
|
||||
#define SET_RAT_NB1_CMD_LEGACY "AT+KSRAT=1"
|
||||
@@ -5116,26 +5118,23 @@ static int configure_TCP_socket(struct hl7800_socket *sock)
|
||||
int ret;
|
||||
char cmd_cfg[sizeof("AT+KTCPCFG=#,#,\"" IPV6_ADDR_FORMAT "\",#####")];
|
||||
int dst_port = -1;
|
||||
int af;
|
||||
|
||||
#if defined(CONFIG_NET_IPV6)
|
||||
if (sock->dst.sa_family == AF_INET6) {
|
||||
af = MDM_HL7800_SOCKET_AF_IPV6;
|
||||
dst_port = net_sin6(&sock->dst)->sin6_port;
|
||||
} else
|
||||
#endif
|
||||
#if defined(CONFIG_NET_IPV4)
|
||||
if (sock->dst.sa_family == AF_INET) {
|
||||
} else if (sock->dst.sa_family == AF_INET) {
|
||||
af = MDM_HL7800_SOCKET_AF_IPV4;
|
||||
dst_port = net_sin(&sock->dst)->sin_port;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* socket # needs assigning */
|
||||
sock->socket_id = MDM_MAX_SOCKETS + 1;
|
||||
|
||||
snprintk(cmd_cfg, sizeof(cmd_cfg), "AT+KTCPCFG=%d,%d,\"%s\",%u", 1, 0,
|
||||
hl7800_sprint_ip_addr(&sock->dst), dst_port);
|
||||
snprintk(cmd_cfg, sizeof(cmd_cfg), "AT+KTCPCFG=%d,%d,\"%s\",%u,,,,%d", 1, 0,
|
||||
hl7800_sprint_ip_addr(&sock->dst), dst_port, af);
|
||||
ret = send_at_cmd(sock, cmd_cfg, MDM_CMD_SEND_TIMEOUT, 0, false);
|
||||
if (ret < 0) {
|
||||
LOG_ERR("AT+KTCPCFG ret:%d", ret);
|
||||
@@ -5158,12 +5157,22 @@ done:
|
||||
static int configure_UDP_socket(struct hl7800_socket *sock)
|
||||
{
|
||||
int ret = 0;
|
||||
char cmd[sizeof("AT+KUDPCFG=1,0,,,,,0")];
|
||||
int af;
|
||||
|
||||
/* socket # needs assigning */
|
||||
sock->socket_id = MDM_MAX_SOCKETS + 1;
|
||||
|
||||
ret = send_at_cmd(sock, "AT+KUDPCFG=1,0", MDM_CMD_SEND_TIMEOUT, 0,
|
||||
false);
|
||||
if (sock->family == AF_INET) {
|
||||
af = MDM_HL7800_SOCKET_AF_IPV4;
|
||||
} else if (sock->family == AF_INET6) {
|
||||
af = MDM_HL7800_SOCKET_AF_IPV6;
|
||||
} else {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
snprintk(cmd, sizeof(cmd), "AT+KUDPCFG=1,0,,,,,%d", af);
|
||||
ret = send_at_cmd(sock, cmd, MDM_CMD_SEND_TIMEOUT, 0, false);
|
||||
if (ret < 0) {
|
||||
LOG_ERR("AT+KUDPCFG ret:%d", ret);
|
||||
goto done;
|
||||
|
||||
@@ -228,8 +228,8 @@ static int mcux_ftm_pin_enable_capture(const struct device *dev, uint32_t pwm)
|
||||
}
|
||||
|
||||
if (FTM_GetEnabledInterrupts(config->base) & BIT(PAIR_2ND_CH(pair))) {
|
||||
LOG_WRN("Capture already active on channel pair %d", pair);
|
||||
return 0;
|
||||
LOG_ERR("Capture already active on channel pair %d", pair);
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
FTM_ClearStatusFlags(config->base, BIT(PAIR_1ST_CH(pair)) |
|
||||
|
||||
@@ -207,9 +207,11 @@ static int qdec_nrfx_init(const struct device *dev)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_DEVICE
|
||||
static int qdec_nrfx_pm_control(struct qdec_nrfx_data *data,
|
||||
static int qdec_nrfx_pm_control(const struct device *dev,
|
||||
enum pm_device_action action)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
switch (action) {
|
||||
case PM_DEVICE_ACTION_RESUME:
|
||||
qdec_nrfx_gpio_ctrl(true);
|
||||
|
||||
@@ -31,6 +31,12 @@ config SERIAL_SUPPORT_INTERRUPT
|
||||
This is an option to be enabled by individual serial driver
|
||||
to signal that the driver and hardware supports interrupts.
|
||||
|
||||
config SERIAL_INIT_PRIORITY
|
||||
int "Serial init priority"
|
||||
default KERNEL_INIT_PRIORITY_DEVICE
|
||||
help
|
||||
Serial driver device initialization priority.
|
||||
|
||||
config UART_USE_RUNTIME_CONFIGURE
|
||||
bool "Enable runtime configuration for UART controllers"
|
||||
default y
|
||||
|
||||
@@ -354,7 +354,7 @@ static struct leuart_gecko_data leuart_gecko_0_data;
|
||||
DEVICE_DT_INST_DEFINE(0, &leuart_gecko_init,
|
||||
NULL, &leuart_gecko_0_data,
|
||||
&leuart_gecko_0_config, PRE_KERNEL_1,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
CONFIG_SERIAL_INIT_PRIORITY,
|
||||
&leuart_gecko_driver_api);
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
@@ -407,7 +407,7 @@ static struct leuart_gecko_data leuart_gecko_1_data;
|
||||
DEVICE_DT_INST_DEFINE(1, &leuart_gecko_init,
|
||||
NULL, &leuart_gecko_1_data,
|
||||
&leuart_gecko_1_config, PRE_KERNEL_1,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
CONFIG_SERIAL_INIT_PRIORITY,
|
||||
&leuart_gecko_driver_api);
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
|
||||
@@ -61,7 +61,7 @@ static int serial_vnd_init(const struct device *dev)
|
||||
#define VND_SERIAL_INIT(n) \
|
||||
DEVICE_DT_INST_DEFINE(n, &serial_vnd_init, NULL, \
|
||||
NULL, NULL, POST_KERNEL, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&serial_vnd_api);
|
||||
|
||||
DT_INST_FOREACH_STATUS_OKAY(VND_SERIAL_INIT)
|
||||
|
||||
@@ -61,5 +61,5 @@ static const struct uart_device_config uart_altera_jtag_dev_cfg_0 = {
|
||||
|
||||
DEVICE_DT_INST_DEFINE(0, uart_altera_jtag_init, NULL,
|
||||
NULL, &uart_altera_jtag_dev_cfg_0,
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY,
|
||||
&uart_altera_jtag_driver_api);
|
||||
|
||||
@@ -538,7 +538,7 @@ static const struct uart_driver_api apbuart_driver_api = {
|
||||
&apbuart##index##_data, \
|
||||
&apbuart##index##_config, \
|
||||
PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&apbuart_driver_api);
|
||||
|
||||
DT_INST_FOREACH_STATUS_OKAY(APBUART_INIT)
|
||||
|
||||
@@ -558,7 +558,7 @@ static const struct uart_driver_api uart_b91_driver_api = {
|
||||
&uart_b91_data_##n, \
|
||||
&uart_b91_cfg_##n, \
|
||||
PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
(void *)&uart_b91_driver_api); \
|
||||
\
|
||||
static void uart_b91_irq_connect_##n(void) \
|
||||
|
||||
@@ -539,7 +539,7 @@ static const struct uart_driver_api uart_cc13xx_cc26xx_driver_api = {
|
||||
uart_cc13xx_cc26xx_init_##n, \
|
||||
uart_cc13xx_cc26xx_pm_control, \
|
||||
&uart_cc13xx_cc26xx_data_##n, &uart_cc13xx_cc26xx_config_##n,\
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_cc13xx_cc26xx_driver_api)
|
||||
|
||||
#ifdef CONFIG_PM_DEVICE
|
||||
|
||||
@@ -331,7 +331,7 @@ static struct uart_cc32xx_dev_data_t uart_cc32xx_dev_data_##idx = { \
|
||||
DEVICE_DT_INST_DEFINE(idx, uart_cc32xx_init, \
|
||||
NULL, &uart_cc32xx_dev_data_##idx, \
|
||||
&uart_cc32xx_dev_cfg_##idx, \
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
(void *)&uart_cc32xx_driver_api); \
|
||||
|
||||
DT_INST_FOREACH_STATUS_OKAY(UART_32XX_DEVICE);
|
||||
|
||||
@@ -508,7 +508,7 @@ DEVICE_DT_INST_DEFINE(0,
|
||||
NULL,
|
||||
&uart_cmsdk_apb_dev_data_0,
|
||||
&uart_cmsdk_apb_dev_cfg_0, PRE_KERNEL_1,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
CONFIG_SERIAL_INIT_PRIORITY,
|
||||
&uart_cmsdk_apb_driver_api);
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
@@ -573,7 +573,7 @@ DEVICE_DT_INST_DEFINE(1,
|
||||
NULL,
|
||||
&uart_cmsdk_apb_dev_data_1,
|
||||
&uart_cmsdk_apb_dev_cfg_1, PRE_KERNEL_1,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
CONFIG_SERIAL_INIT_PRIORITY,
|
||||
&uart_cmsdk_apb_driver_api);
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
@@ -638,7 +638,7 @@ DEVICE_DT_INST_DEFINE(2,
|
||||
NULL,
|
||||
&uart_cmsdk_apb_dev_data_2,
|
||||
&uart_cmsdk_apb_dev_cfg_2, PRE_KERNEL_1,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
CONFIG_SERIAL_INIT_PRIORITY,
|
||||
&uart_cmsdk_apb_driver_api);
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
@@ -703,7 +703,7 @@ DEVICE_DT_INST_DEFINE(3,
|
||||
NULL,
|
||||
&uart_cmsdk_apb_dev_data_3,
|
||||
&uart_cmsdk_apb_dev_cfg_3, PRE_KERNEL_1,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
CONFIG_SERIAL_INIT_PRIORITY,
|
||||
&uart_cmsdk_apb_driver_api);
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
@@ -768,7 +768,7 @@ DEVICE_DT_INST_DEFINE(4,
|
||||
NULL,
|
||||
&uart_cmsdk_apb_dev_data_4,
|
||||
&uart_cmsdk_apb_dev_cfg_4, PRE_KERNEL_1,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
CONFIG_SERIAL_INIT_PRIORITY,
|
||||
&uart_cmsdk_apb_driver_api);
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
|
||||
@@ -519,7 +519,7 @@ DEVICE_DT_DEFINE(DT_NODELABEL(uart##idx), \
|
||||
&uart_esp32_data_##idx, \
|
||||
&uart_esp32_cfg_port_##idx, \
|
||||
PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_esp32_api);
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart0), okay)
|
||||
|
||||
@@ -549,7 +549,7 @@ static const struct uart_driver_api uart_gecko_driver_api = {
|
||||
DEVICE_DT_INST_DEFINE(idx, &uart_gecko_init, \
|
||||
NULL, &uart_gecko_data_##idx, \
|
||||
&uart_gecko_cfg_##idx, PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_gecko_driver_api); \
|
||||
\
|
||||
\
|
||||
@@ -607,7 +607,7 @@ DT_INST_FOREACH_STATUS_OKAY(GECKO_UART_INIT)
|
||||
DEVICE_DT_INST_DEFINE(idx, &uart_gecko_init, NULL, \
|
||||
&usart_gecko_data_##idx, \
|
||||
&usart_gecko_cfg_##idx, PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_gecko_driver_api); \
|
||||
\
|
||||
GECKO_USART_IRQ_HANDLER(idx)
|
||||
|
||||
@@ -319,7 +319,7 @@ static const struct uart_driver_api uart_imx_driver_api = {
|
||||
DEVICE_DT_INST_DEFINE(n, &uart_imx_init, NULL, \
|
||||
&imx_uart_##n##_data, &imx_uart_##n##_config, \
|
||||
PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_imx_driver_api); \
|
||||
\
|
||||
UART_IMX_CONFIG_FUNC(n) \
|
||||
|
||||
@@ -321,7 +321,7 @@ DEVICE_DT_INST_DEFINE(0,
|
||||
uart_liteuart_init,
|
||||
NULL,
|
||||
&uart_liteuart_data_0, &uart_liteuart_dev_cfg_0,
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY,
|
||||
(void *)&uart_liteuart_driver_api);
|
||||
|
||||
static int uart_liteuart_init(const struct device *dev)
|
||||
|
||||
@@ -446,7 +446,7 @@ DEVICE_DT_DEFINE(DT_NODELABEL(uart0),
|
||||
&lpc11u6x_uart0_init,
|
||||
NULL,
|
||||
&uart0_data, &uart0_config,
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_OBJECTS,
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY,
|
||||
&uart0_api);
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
@@ -904,7 +904,7 @@ static struct lpc11u6x_uartx_data uart_data_##idx; \
|
||||
DEVICE_DT_DEFINE(DT_NODELABEL(uart##idx), \
|
||||
&lpc11u6x_uartx_init, NULL, \
|
||||
&uart_data_##idx, &uart_cfg_##idx, \
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_OBJECTS, \
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uartx_api)
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay)
|
||||
|
||||
@@ -894,7 +894,7 @@ static const struct uart_driver_api uart_xec_driver_api = {
|
||||
&uart_xec_dev_data_##n, \
|
||||
&uart_xec_dev_cfg_##n, \
|
||||
PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_xec_driver_api); \
|
||||
UART_XEC_IRQ_FUNC_DEFINE(n)
|
||||
|
||||
|
||||
@@ -414,7 +414,7 @@ static const struct uart_mcux_config uart_mcux_##n##_config = { \
|
||||
&uart_mcux_##n##_data, \
|
||||
&uart_mcux_##n##_config, \
|
||||
PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_mcux_driver_api); \
|
||||
\
|
||||
UART_MCUX_CONFIG_FUNC(n) \
|
||||
|
||||
@@ -348,7 +348,7 @@ static const struct mcux_flexcomm_config mcux_flexcomm_##n##_config = { \
|
||||
&mcux_flexcomm_##n##_data, \
|
||||
&mcux_flexcomm_##n##_config, \
|
||||
PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&mcux_flexcomm_driver_api); \
|
||||
\
|
||||
UART_MCUX_FLEXCOMM_CONFIG_FUNC(n) \
|
||||
|
||||
@@ -317,7 +317,7 @@ static const struct mcux_iuart_config mcux_iuart_##n##_config = { \
|
||||
&mcux_iuart_##n##_data, \
|
||||
&mcux_iuart_##n##_config, \
|
||||
PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&mcux_iuart_driver_api); \
|
||||
\
|
||||
IUART_MCUX_CONFIG_FUNC(n) \
|
||||
|
||||
@@ -321,7 +321,7 @@ static const struct mcux_lpsci_config mcux_lpsci_##n##_config = { \
|
||||
&mcux_lpsci_##n##_data, \
|
||||
&mcux_lpsci_##n##_config, \
|
||||
PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&mcux_lpsci_driver_api); \
|
||||
\
|
||||
MCUX_LPSCI_CONFIG_FUNC(n) \
|
||||
|
||||
@@ -448,7 +448,7 @@ static const struct mcux_lpuart_config mcux_lpuart_##n##_config = { \
|
||||
&mcux_lpuart_##n##_data, \
|
||||
&mcux_lpuart_##n##_config, \
|
||||
PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&mcux_lpuart_driver_api); \
|
||||
\
|
||||
LPUART_MCUX_CONFIG_FUNC(n) \
|
||||
|
||||
@@ -409,7 +409,7 @@ static const struct uart_miv_device_config uart_miv_dev_cfg_0 = {
|
||||
|
||||
DEVICE_DT_INST_DEFINE(0, uart_miv_init, NULL,
|
||||
&uart_miv_data_0, &uart_miv_dev_cfg_0,
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY,
|
||||
(void *)&uart_miv_driver_api);
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
|
||||
@@ -362,5 +362,5 @@ DEVICE_DT_INST_DEFINE(0,
|
||||
uart_msp432p4xx_init, NULL,
|
||||
&uart_msp432p4xx_dev_data_0,
|
||||
&uart_msp432p4xx_dev_cfg_0,
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY,
|
||||
(void *)&uart_msp432p4xx_driver_api);
|
||||
|
||||
@@ -367,14 +367,14 @@ static int np_uart_tty_poll_in(const struct device *dev,
|
||||
DEVICE_DT_INST_DEFINE(0,
|
||||
&np_uart_0_init, NULL,
|
||||
(void *)&native_uart_status_0, NULL,
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY,
|
||||
&np_uart_driver_api_0);
|
||||
|
||||
#if defined(CONFIG_UART_NATIVE_POSIX_PORT_1_ENABLE)
|
||||
DEVICE_DT_INST_DEFINE(1,
|
||||
&np_uart_1_init, NULL,
|
||||
(void *)&native_uart_status_1, NULL,
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY,
|
||||
&np_uart_driver_api_1);
|
||||
#endif /* CONFIG_UART_NATIVE_POSIX_PORT_1_ENABLE */
|
||||
|
||||
|
||||
@@ -506,7 +506,7 @@ static inline int uart_npcx_pm_control(const struct device *dev,
|
||||
&uart_npcx_init, \
|
||||
uart_npcx_pm_control, \
|
||||
&uart_npcx_data_##inst, &uart_npcx_cfg_##inst, \
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_npcx_driver_api); \
|
||||
\
|
||||
NPCX_UART_IRQ_CONFIG_FUNC(inst)
|
||||
|
||||
@@ -1188,5 +1188,5 @@ DEVICE_DT_INST_DEFINE(0,
|
||||
NULL,
|
||||
/* Initialize UART device before UART console. */
|
||||
PRE_KERNEL_1,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
CONFIG_SERIAL_INIT_PRIORITY,
|
||||
&uart_nrfx_uart_driver_api);
|
||||
|
||||
@@ -1997,7 +1997,7 @@ static int uarte_nrfx_pm_control(const struct device *dev,
|
||||
&uarte_##idx##_data, \
|
||||
&uarte_##idx##z_config, \
|
||||
PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_nrfx_uarte_driver_api)
|
||||
|
||||
#define UARTE_CONFIG(idx) \
|
||||
|
||||
@@ -1062,7 +1062,7 @@ static const struct uart_driver_api uart_ns16550_driver_api = {
|
||||
#define DEV_DATA_FLOW_CTRL0 UART_CFG_FLOW_CTRL_NONE
|
||||
#define DEV_DATA_FLOW_CTRL1 UART_CFG_FLOW_CTRL_RTS_CTS
|
||||
#define DEV_DATA_FLOW_CTRL(n) \
|
||||
_CONCAT(DEV_DATA_FLOW_CTRL, DT_INST_NODE_HAS_PROP(n, hw_flow_control))
|
||||
_CONCAT(DEV_DATA_FLOW_CTRL, DT_INST_PROP_OR(n, hw_flow_control, 0))
|
||||
|
||||
#define DEV_DATA_DLF0(n)
|
||||
#define DEV_DATA_DLF1(n) \
|
||||
@@ -1090,7 +1090,7 @@ static const struct uart_driver_api uart_ns16550_driver_api = {
|
||||
}; \
|
||||
DEVICE_DT_INST_DEFINE(n, &uart_ns16550_init, NULL, \
|
||||
&uart_ns16550_dev_data_##n, &uart_ns16550_dev_cfg_##n, \
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_ns16550_driver_api); \
|
||||
UART_NS16550_IRQ_FUNC_DEFINE(n)
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ DEVICE_DT_INST_DEFINE(index, \
|
||||
NULL, \
|
||||
&uart_numicro_data_##index, \
|
||||
&uart_numicro_cfg_##index, \
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_numicro_driver_api);
|
||||
|
||||
DT_INST_FOREACH_STATUS_OKAY(NUMICRO_INIT)
|
||||
|
||||
@@ -443,7 +443,7 @@ DEVICE_DT_INST_DEFINE(0,
|
||||
NULL,
|
||||
&pl011_data_port_0,
|
||||
&pl011_cfg_port_0, PRE_KERNEL_1,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
CONFIG_SERIAL_INIT_PRIORITY,
|
||||
&pl011_driver_api);
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
@@ -506,7 +506,7 @@ DEVICE_DT_INST_DEFINE(1,
|
||||
NULL,
|
||||
&pl011_data_port_1,
|
||||
&pl011_cfg_port_1, PRE_KERNEL_1,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
CONFIG_SERIAL_INIT_PRIORITY,
|
||||
&pl011_driver_api);
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
@@ -571,7 +571,7 @@ DEVICE_DT_INST_DEFINE(0,
|
||||
NULL,
|
||||
&pl011_data_sbsa,
|
||||
&pl011_cfg_sbsa, PRE_KERNEL_1,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
CONFIG_SERIAL_INIT_PRIORITY,
|
||||
&pl011_driver_api);
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
|
||||
@@ -361,7 +361,7 @@ static const struct uart_driver_api uart_psoc6_driver_api = {
|
||||
DEVICE_DT_INST_DEFINE(n, &uart_psoc6_init, NULL, \
|
||||
CY_PSOC6_UART_DECL_DATA_PTR(n), \
|
||||
&cy_psoc6_uart##n##_config, PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_psoc6_driver_api);
|
||||
|
||||
DT_INST_FOREACH_STATUS_OKAY(CY_PSOC6_UART_INIT)
|
||||
|
||||
@@ -583,7 +583,7 @@ static const struct uart_driver_api uart_rcar_driver_api = {
|
||||
NULL, \
|
||||
&uart_rcar_data_##n, \
|
||||
&uart_rcar_cfg_##n, \
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_rcar_driver_api); \
|
||||
\
|
||||
UART_RCAR_CONFIG_FUNC(n) \
|
||||
|
||||
@@ -53,7 +53,7 @@ DEVICE_DT_DEFINE(DT_NODELABEL(uart##idx), \
|
||||
NULL, \
|
||||
NULL, \
|
||||
PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_rom_esp32c3_api); \
|
||||
|
||||
DT_INST_FOREACH_STATUS_OKAY(ESP32C3_ROM_UART_INIT)
|
||||
|
||||
@@ -51,7 +51,7 @@ DEVICE_DT_DEFINE(DT_NODELABEL(uart##idx), \
|
||||
NULL, \
|
||||
NULL, \
|
||||
PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_rom_esp32s2_api); \
|
||||
|
||||
DT_INST_FOREACH_STATUS_OKAY(ESP32S2_ROM_UART_INIT)
|
||||
|
||||
@@ -217,7 +217,7 @@ static const struct uart_driver_api uart_rtt_driver_api = {
|
||||
\
|
||||
DEVICE_DT_DEFINE(UART_RTT(idx), uart_rtt_init, NULL, \
|
||||
&uart_rtt##idx##_data, config, \
|
||||
PRE_KERNEL_2, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
PRE_KERNEL_2, CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_rtt_driver_api)
|
||||
|
||||
#ifdef CONFIG_UART_RTT_0
|
||||
|
||||
@@ -334,7 +334,7 @@ static const struct uart_driver_api rv32m1_lpuart_driver_api = {
|
||||
&rv32m1_lpuart_##n##_data, \
|
||||
&rv32m1_lpuart_##n##_cfg, \
|
||||
PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&rv32m1_lpuart_driver_api); \
|
||||
\
|
||||
RV32M1_LPUART_CONFIG_FUNC(n) \
|
||||
|
||||
@@ -364,7 +364,7 @@ static const struct uart_driver_api uart_sam_driver_api = {
|
||||
DEVICE_DT_INST_DEFINE(n, &uart_sam_init, \
|
||||
NULL, &uart##n##_sam_data, \
|
||||
&uart##n##_sam_config, PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_sam_driver_api); \
|
||||
\
|
||||
UART_SAM_CONFIG_FUNC(n) \
|
||||
|
||||
@@ -1256,7 +1256,7 @@ UART_SAM0_CONFIG_DEFN(n); \
|
||||
DEVICE_DT_INST_DEFINE(n, uart_sam0_init, NULL, \
|
||||
&uart_sam0_data_##n, \
|
||||
&uart_sam0_config_##n, PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_sam0_driver_api); \
|
||||
UART_SAM0_IRQ_HANDLER(n)
|
||||
|
||||
|
||||
@@ -396,7 +396,7 @@ DEVICE_DT_INST_DEFINE(0,
|
||||
uart_sifive_init,
|
||||
NULL,
|
||||
&uart_sifive_data_0, &uart_sifive_dev_cfg_0,
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY,
|
||||
(void *)&uart_sifive_driver_api);
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
@@ -435,7 +435,7 @@ DEVICE_DT_INST_DEFINE(1,
|
||||
uart_sifive_init,
|
||||
NULL,
|
||||
&uart_sifive_data_1, &uart_sifive_dev_cfg_1,
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY,
|
||||
(void *)&uart_sifive_driver_api);
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
|
||||
@@ -652,7 +652,7 @@ DEVICE_DT_INST_DEFINE(0,
|
||||
&uart_stellaris_init,
|
||||
NULL,
|
||||
&uart_stellaris_dev_data_0, &uart_stellaris_dev_cfg_0,
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY,
|
||||
&uart_stellaris_driver_api);
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
@@ -691,7 +691,7 @@ DEVICE_DT_INST_DEFINE(1,
|
||||
&uart_stellaris_init,
|
||||
NULL,
|
||||
&uart_stellaris_dev_data_1, &uart_stellaris_dev_cfg_1,
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY,
|
||||
&uart_stellaris_driver_api);
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
@@ -730,7 +730,7 @@ DEVICE_DT_INST_DEFINE(2,
|
||||
&uart_stellaris_init,
|
||||
NULL,
|
||||
&uart_stellaris_dev_data_2, &uart_stellaris_dev_cfg_2,
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY,
|
||||
&uart_stellaris_driver_api);
|
||||
|
||||
#ifdef CONFIG_UART_INTERRUPT_DRIVEN
|
||||
|
||||
@@ -594,11 +594,13 @@ static void uart_stm32_irq_tx_enable(const struct device *dev)
|
||||
{
|
||||
USART_TypeDef *UartInstance = UART_STRUCT(dev);
|
||||
|
||||
LL_USART_EnableIT_TC(UartInstance);
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
struct uart_stm32_data *data = DEV_DATA(dev);
|
||||
|
||||
data->tx_poll_stream_on = false;
|
||||
uart_stm32_pm_constraint_set(dev);
|
||||
#endif
|
||||
LL_USART_EnableIT_TC(UartInstance);
|
||||
}
|
||||
|
||||
static void uart_stm32_irq_tx_disable(const struct device *dev)
|
||||
@@ -886,7 +888,7 @@ static void uart_stm32_isr(const struct device *dev)
|
||||
uart_stm32_dma_rx_flush(dev);
|
||||
}
|
||||
} else if (LL_USART_IsEnabledIT_TC(UartInstance) &&
|
||||
LL_USART_IsActiveFlag_TC(UartInstance)) {
|
||||
LL_USART_IsActiveFlag_TC(UartInstance)) {
|
||||
|
||||
LL_USART_DisableIT_TC(UartInstance);
|
||||
LL_USART_ClearFlag_TC(UartInstance);
|
||||
@@ -896,6 +898,15 @@ static void uart_stm32_isr(const struct device *dev)
|
||||
#ifdef CONFIG_PM
|
||||
uart_stm32_pm_constraint_release(dev);
|
||||
#endif
|
||||
} else if (LL_USART_IsEnabledIT_RXNE(UartInstance) &&
|
||||
LL_USART_IsActiveFlag_RXNE(UartInstance)) {
|
||||
#ifdef USART_SR_RXNE
|
||||
/* clear the RXNE flag, because Rx data was not read */
|
||||
LL_USART_ClearFlag_RXNE(UartInstance);
|
||||
#else
|
||||
/* clear the RXNE by flushing the fifo, because Rx data was not read */
|
||||
LL_USART_RequestRxDataFlush(UartInstance);
|
||||
#endif /* USART_SR_RXNE */
|
||||
}
|
||||
|
||||
/* Clear errors */
|
||||
@@ -977,6 +988,9 @@ static int uart_stm32_async_rx_disable(const struct device *dev)
|
||||
data->rx_next_buffer = NULL;
|
||||
data->rx_next_buffer_len = 0;
|
||||
|
||||
/* When async rx is disabled, enable interruptable instance of uart to function normally*/
|
||||
LL_USART_EnableIT_RXNE(UartInstance);
|
||||
|
||||
LOG_DBG("rx: disabled");
|
||||
|
||||
async_user_callback(data, &disabled_event);
|
||||
@@ -1605,7 +1619,7 @@ DEVICE_DT_INST_DEFINE(index, \
|
||||
&uart_stm32_init, \
|
||||
NULL, \
|
||||
&uart_stm32_data_##index, &uart_stm32_cfg_##index, \
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_stm32_driver_api); \
|
||||
\
|
||||
STM32_UART_IRQ_HANDLER(index)
|
||||
|
||||
@@ -1214,7 +1214,7 @@ DEVICE_DT_INST_DEFINE(port, \
|
||||
NULL, \
|
||||
&uart_xlnx_ps_dev_data_##port, \
|
||||
&uart_xlnx_ps_dev_cfg_##port, \
|
||||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
PRE_KERNEL_1, CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_xlnx_ps_driver_api)
|
||||
|
||||
#define UART_XLNX_INSTANTIATE(inst) \
|
||||
|
||||
@@ -379,7 +379,7 @@ static const struct xlnx_uartlite_config xlnx_uartlite_##n##_config = { \
|
||||
&xlnx_uartlite_##n##_data, \
|
||||
&xlnx_uartlite_##n##_config, \
|
||||
PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&xlnx_uartlite_driver_api); \
|
||||
\
|
||||
XLNX_UARTLITE_CONFIG_FUNC(n) \
|
||||
|
||||
@@ -77,7 +77,7 @@ static const struct uart_device_config xmc4xxx_config_##index = { \
|
||||
NULL, \
|
||||
&xmc4xxx_data_##index, \
|
||||
&xmc4xxx_config_##index, PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&uart_xmc4xxx_driver_api);
|
||||
|
||||
DT_INST_FOREACH_STATUS_OKAY(XMC4XXX_INIT)
|
||||
|
||||
@@ -366,7 +366,7 @@ static const struct uart_driver_api usart_sam_driver_api = {
|
||||
&usart_sam_init, NULL, \
|
||||
&usart##n##_sam_data, \
|
||||
&usart##n##_sam_config, PRE_KERNEL_1, \
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
||||
CONFIG_SERIAL_INIT_PRIORITY, \
|
||||
&usart_sam_driver_api); \
|
||||
\
|
||||
USART_SAM_CONFIG_FUNC(n) \
|
||||
|
||||
@@ -112,22 +112,34 @@ static inline void spi_context_release(struct spi_context *ctx, int status)
|
||||
static inline int spi_context_wait_for_completion(struct spi_context *ctx)
|
||||
{
|
||||
int status = 0;
|
||||
uint32_t timeout_ms;
|
||||
k_timeout_t timeout;
|
||||
|
||||
timeout_ms = MAX(ctx->tx_len, ctx->rx_len) * 8 * 1000 /
|
||||
ctx->config->frequency;
|
||||
timeout_ms += CONFIG_SPI_COMPLETION_TIMEOUT_TOLERANCE;
|
||||
/* Do not use any timeout in the slave mode, as in this case it is not
|
||||
* known when the transfer will actually start and what the frequency
|
||||
* will be.
|
||||
*/
|
||||
if (IS_ENABLED(CONFIG_SPI_SLAVE) && spi_context_is_slave(ctx)) {
|
||||
timeout = K_FOREVER;
|
||||
} else {
|
||||
uint32_t timeout_ms;
|
||||
|
||||
timeout_ms = MAX(ctx->tx_len, ctx->rx_len) * 8 * 1000 /
|
||||
ctx->config->frequency;
|
||||
timeout_ms += CONFIG_SPI_COMPLETION_TIMEOUT_TOLERANCE;
|
||||
|
||||
timeout = K_MSEC(timeout_ms);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPI_ASYNC
|
||||
if (!ctx->asynchronous) {
|
||||
if (k_sem_take(&ctx->sync, K_MSEC(timeout_ms))) {
|
||||
if (k_sem_take(&ctx->sync, timeout)) {
|
||||
LOG_ERR("Timeout waiting for transfer complete");
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
status = ctx->sync_status;
|
||||
}
|
||||
#else
|
||||
if (k_sem_take(&ctx->sync, K_MSEC(timeout_ms))) {
|
||||
if (k_sem_take(&ctx->sync, timeout)) {
|
||||
LOG_ERR("Timeout waiting for transfer complete");
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
@@ -236,6 +248,25 @@ static inline void spi_context_unlock_unconditionally(struct spi_context *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void *spi_context_get_next_buf(const struct spi_buf **current,
|
||||
size_t *count,
|
||||
size_t *buf_len,
|
||||
uint8_t dfs)
|
||||
{
|
||||
/* This loop skips zero-length buffers in the set, if any. */
|
||||
while (*count) {
|
||||
if (((*current)->len / dfs) != 0) {
|
||||
*buf_len = (*current)->len / dfs;
|
||||
return (*current)->buf;
|
||||
}
|
||||
++(*current);
|
||||
--(*count);
|
||||
}
|
||||
|
||||
*buf_len = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline
|
||||
void spi_context_buffers_setup(struct spi_context *ctx,
|
||||
const struct spi_buf_set *tx_bufs,
|
||||
@@ -244,29 +275,17 @@ void spi_context_buffers_setup(struct spi_context *ctx,
|
||||
{
|
||||
LOG_DBG("tx_bufs %p - rx_bufs %p - %u", tx_bufs, rx_bufs, dfs);
|
||||
|
||||
if (tx_bufs) {
|
||||
ctx->current_tx = tx_bufs->buffers;
|
||||
ctx->tx_count = tx_bufs->count;
|
||||
ctx->tx_buf = (const uint8_t *)ctx->current_tx->buf;
|
||||
ctx->tx_len = ctx->current_tx->len / dfs;
|
||||
} else {
|
||||
ctx->current_tx = NULL;
|
||||
ctx->tx_count = 0;
|
||||
ctx->tx_buf = NULL;
|
||||
ctx->tx_len = 0;
|
||||
}
|
||||
ctx->current_tx = tx_bufs ? tx_bufs->buffers : NULL;
|
||||
ctx->tx_count = ctx->current_tx ? tx_bufs->count : 0;
|
||||
ctx->tx_buf = (const uint8_t *)
|
||||
spi_context_get_next_buf(&ctx->current_tx, &ctx->tx_count,
|
||||
&ctx->tx_len, dfs);
|
||||
|
||||
if (rx_bufs) {
|
||||
ctx->current_rx = rx_bufs->buffers;
|
||||
ctx->rx_count = rx_bufs->count;
|
||||
ctx->rx_buf = (uint8_t *)ctx->current_rx->buf;
|
||||
ctx->rx_len = ctx->current_rx->len / dfs;
|
||||
} else {
|
||||
ctx->current_rx = NULL;
|
||||
ctx->rx_count = 0;
|
||||
ctx->rx_buf = NULL;
|
||||
ctx->rx_len = 0;
|
||||
}
|
||||
ctx->current_rx = rx_bufs ? rx_bufs->buffers : NULL;
|
||||
ctx->rx_count = ctx->current_rx ? rx_bufs->count : 0;
|
||||
ctx->rx_buf = (uint8_t *)
|
||||
spi_context_get_next_buf(&ctx->current_rx, &ctx->rx_count,
|
||||
&ctx->rx_len, dfs);
|
||||
|
||||
ctx->sync_status = 0;
|
||||
|
||||
@@ -275,10 +294,10 @@ void spi_context_buffers_setup(struct spi_context *ctx,
|
||||
#endif /* CONFIG_SPI_SLAVE */
|
||||
|
||||
LOG_DBG("current_tx %p (%zu), current_rx %p (%zu),"
|
||||
" tx buf/len %p/%zu, rx buf/len %p/%zu",
|
||||
ctx->current_tx, ctx->tx_count,
|
||||
ctx->current_rx, ctx->rx_count,
|
||||
ctx->tx_buf, ctx->tx_len, ctx->rx_buf, ctx->rx_len);
|
||||
" tx buf/len %p/%zu, rx buf/len %p/%zu",
|
||||
ctx->current_tx, ctx->tx_count,
|
||||
ctx->current_rx, ctx->rx_count,
|
||||
ctx->tx_buf, ctx->tx_len, ctx->rx_buf, ctx->rx_len);
|
||||
}
|
||||
|
||||
static ALWAYS_INLINE
|
||||
@@ -295,14 +314,13 @@ void spi_context_update_tx(struct spi_context *ctx, uint8_t dfs, uint32_t len)
|
||||
|
||||
ctx->tx_len -= len;
|
||||
if (!ctx->tx_len) {
|
||||
ctx->tx_count--;
|
||||
if (ctx->tx_count) {
|
||||
ctx->current_tx++;
|
||||
ctx->tx_buf = (const uint8_t *)ctx->current_tx->buf;
|
||||
ctx->tx_len = ctx->current_tx->len / dfs;
|
||||
} else {
|
||||
ctx->tx_buf = NULL;
|
||||
}
|
||||
/* Current buffer is done. Get the next one to be processed. */
|
||||
++ctx->current_tx;
|
||||
--ctx->tx_count;
|
||||
ctx->tx_buf = (const uint8_t *)
|
||||
spi_context_get_next_buf(&ctx->current_tx,
|
||||
&ctx->tx_count,
|
||||
&ctx->tx_len, dfs);
|
||||
} else if (ctx->tx_buf) {
|
||||
ctx->tx_buf += dfs * len;
|
||||
}
|
||||
@@ -343,14 +361,13 @@ void spi_context_update_rx(struct spi_context *ctx, uint8_t dfs, uint32_t len)
|
||||
|
||||
ctx->rx_len -= len;
|
||||
if (!ctx->rx_len) {
|
||||
ctx->rx_count--;
|
||||
if (ctx->rx_count) {
|
||||
ctx->current_rx++;
|
||||
ctx->rx_buf = (uint8_t *)ctx->current_rx->buf;
|
||||
ctx->rx_len = ctx->current_rx->len / dfs;
|
||||
} else {
|
||||
ctx->rx_buf = NULL;
|
||||
}
|
||||
/* Current buffer is done. Get the next one to be processed. */
|
||||
++ctx->current_rx;
|
||||
--ctx->rx_count;
|
||||
ctx->rx_buf = (uint8_t *)
|
||||
spi_context_get_next_buf(&ctx->current_rx,
|
||||
&ctx->rx_count,
|
||||
&ctx->rx_len, dfs);
|
||||
} else if (ctx->rx_buf) {
|
||||
ctx->rx_buf += dfs * len;
|
||||
}
|
||||
|
||||
@@ -43,6 +43,40 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ARC_FIRQ) && defined(CONFIG_ISA_ARCV3)
|
||||
#error "Unsupported configuration: ARC_FIRQ and ISA_ARCV3"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* We don't allow the configuration with FIRQ enabled and only one interrupt priority level
|
||||
* (so all interrupts are FIRQ). Such configuration isn't supported in software and it is not
|
||||
* beneficial from the performance point of view.
|
||||
*/
|
||||
#if defined(CONFIG_ARC_FIRQ) && CONFIG_NUM_IRQ_PRIO_LEVELS < 2
|
||||
#error "Unsupported configuration: ARC_FIRQ and (NUM_IRQ_PRIO_LEVELS < 2)"
|
||||
#endif
|
||||
|
||||
#if CONFIG_RGF_NUM_BANKS > 1 && !defined(CONFIG_ARC_FIRQ)
|
||||
#error "Unsupported configuration: (RGF_NUM_BANKS > 1) and !ARC_FIRQ"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* It's required to have more than one interrupt priority level to use second register bank
|
||||
* - otherwise all interrupts will use same register bank. Such configuration isn't supported in
|
||||
* software and it is not beneficial from the performance point of view.
|
||||
*/
|
||||
#if CONFIG_RGF_NUM_BANKS > 1 && CONFIG_NUM_IRQ_PRIO_LEVELS < 2
|
||||
#error "Unsupported configuration: (RGF_NUM_BANKS > 1) and (NUM_IRQ_PRIO_LEVELS < 2)"
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ARC_FIRQ_STACK) && !defined(CONFIG_ARC_FIRQ)
|
||||
#error "Unsupported configuration: ARC_FIRQ_STACK and !ARC_FIRQ"
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ARC_FIRQ_STACK) && CONFIG_RGF_NUM_BANKS < 2
|
||||
#error "Unsupported configuration: ARC_FIRQ_STACK and (RGF_NUM_BANKS < 2)"
|
||||
#endif
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -227,7 +227,6 @@ SECTIONS
|
||||
} GROUP_DATA_LINK_IN(RAMABLE_REGION, RAMABLE_REGION)
|
||||
|
||||
#include <linker/common-noinit.ld>
|
||||
#include <linker/cplusplus-ram.ld>
|
||||
|
||||
SECTION_DATA_PROLOGUE(_DATA_SECTION_NAME,,)
|
||||
{
|
||||
@@ -271,6 +270,7 @@ SECTIONS
|
||||
|
||||
#include <linker/common-ram.ld>
|
||||
#include <linker/kobject-data.ld>
|
||||
#include <linker/cplusplus-ram.ld>
|
||||
|
||||
/* Located in generated directory. This file is populated by the
|
||||
* zephyr_linker_sources() Cmake function.
|
||||
|
||||
@@ -1153,6 +1153,9 @@ struct bt_le_per_adv_sync_term_info {
|
||||
|
||||
/** Advertiser SID */
|
||||
uint8_t sid;
|
||||
|
||||
/** Cause of periodic advertising termination */
|
||||
uint8_t reason;
|
||||
};
|
||||
|
||||
struct bt_le_per_adv_sync_recv_info {
|
||||
|
||||
@@ -751,6 +751,9 @@ enum bt_security_err {
|
||||
/** Invalid parameters. */
|
||||
BT_SECURITY_ERR_INVALID_PARAM,
|
||||
|
||||
/** Distributed Key Rejected */
|
||||
BT_SECURITY_ERR_KEY_REJECTED,
|
||||
|
||||
/** Pairing failed but the exact reason could not be specified. */
|
||||
BT_SECURITY_ERR_UNSPECIFIED,
|
||||
};
|
||||
|
||||
@@ -817,7 +817,7 @@ static inline int can_configure(const struct device *dev, enum can_mode mode,
|
||||
uint32_t bitrate)
|
||||
{
|
||||
if (bitrate > 0) {
|
||||
int err = can_set_bitrate(dev, bitrate, 0);
|
||||
int err = can_set_bitrate(dev, bitrate, bitrate);
|
||||
if (err != 0) {
|
||||
return err;
|
||||
}
|
||||
@@ -826,7 +826,6 @@ static inline int can_configure(const struct device *dev, enum can_mode mode,
|
||||
return can_set_mode(dev, mode);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get current state
|
||||
*
|
||||
|
||||
@@ -241,6 +241,7 @@
|
||||
#define STM32_SYSCLK_SRC_HSE DT_SAME_NODE(DT_RCC_CLOCKS_CTRL, DT_NODELABEL(clk_hse))
|
||||
#define STM32_SYSCLK_SRC_MSI DT_SAME_NODE(DT_RCC_CLOCKS_CTRL, DT_NODELABEL(clk_msi))
|
||||
#define STM32_SYSCLK_SRC_CSI DT_SAME_NODE(DT_RCC_CLOCKS_CTRL, DT_NODELABEL(clk_csi))
|
||||
#define STM32_SYSCLK_SRC_MSIS DT_SAME_NODE(DT_RCC_CLOCKS_CTRL, DT_NODELABEL(clk_msis))
|
||||
#else
|
||||
#define STM32_SYSCLK_SRC_PLL CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL
|
||||
#define STM32_SYSCLK_SRC_HSI CONFIG_CLOCK_STM32_SYSCLK_SRC_HSI
|
||||
|
||||
@@ -12,21 +12,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define Z_TRACING_LOG_TRACE(id) do { \
|
||||
Z_TRACING_LOG_HDR_INIT(_msg, id); \
|
||||
z_log_msg2_put_trace(_msg); \
|
||||
} while (0)
|
||||
|
||||
#define Z_TRACING_LOG_TRACE_PTR(id, ptr) do { \
|
||||
Z_TRACING_LOG_HDR_INIT(_msg, id); \
|
||||
z_log_msg2_put_trace_ptr(_msg, ptr); \
|
||||
} while (0)
|
||||
|
||||
void z_log_msg2_put_trace(struct log_msg2_trace trace);
|
||||
|
||||
void z_log_msg2_put_trace_ptr(struct log_msg2_trace hdr, void *data);
|
||||
|
||||
|
||||
/** @brief Initialize module for handling logging message. */
|
||||
void z_log_msg2_init(void);
|
||||
|
||||
|
||||