Merge branch 'main' into basic-gpio

This commit is contained in:
9names 2021-05-05 08:23:03 +10:00 committed by GitHub
commit d26e13c5ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 59 additions and 14 deletions

View file

@ -2,7 +2,7 @@ on: [push, pull_request]
name: CI Checks
jobs:
check:
name: Check and Lint
name: cargo-check
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
@ -14,20 +14,7 @@ jobs:
target: thumbv6m-none-eabi
override: true
profile: minimal
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
with:
command: check
args: --workspace --examples
- uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -Dwarnings
- uses: actions-rs/cargo@v1
with:
command: test
args: --target x86_64-unknown-linux-gnu

18
.github/workflows/clippy.yml vendored Normal file
View file

@ -0,0 +1,18 @@
on: [push, pull_request]
name: Clippy check
jobs:
clippy_check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: thumbv6m-none-eabi
override: true
profile: minimal
components: clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -Dwarnings

19
.github/workflows/rustfmt.yml vendored Normal file
View file

@ -0,0 +1,19 @@
on: [push, pull_request]
name: Code formatting check
jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: thumbv6m-none-eabi
override: true
profile: minimal
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check

19
.github/workflows/tests_host.yml vendored Normal file
View file

@ -0,0 +1,19 @@
on: [push, pull_request]
name: On-host tests
jobs:
check:
name: Check and Lint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: thumbv6m-none-eabi
override: true
profile: minimal
## Tests are currently not working on host - disabled until we can find a good solution
# - uses: actions-rs/cargo@v1
# with:
# command: test
# args: --target x86_64-unknown-linux-gnu

View file

@ -175,6 +175,8 @@ impl CrystalOscillator<Stable> {
}
/// Put the XOSC in DORMANT state.
///
/// # Safety
/// This method is marked unsafe because prior to switch the XOSC into DORMANT state,
/// PLLs must be stopped and IRQs have to be properly configured.
/// This method does not do any of that, it merely switches the XOSC to DORMANT state.