Skip to content

Commit 21c64d8

Browse files
bors[bot]burrbull
andauthored
Merge #452
452: update ci, clippy & release 0.10 r=therealprof a=burrbull Co-authored-by: Andrey Zgarbul <zgarbul.andrey@gmail.com>
2 parents 5f0a53f + 6d0d269 commit 21c64d8

File tree

8 files changed

+27
-31
lines changed

8 files changed

+27
-31
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ jobs:
2424
experimental: true
2525

2626
steps:
27-
- uses: actions/checkout@v2
28-
- uses: actions-rs/toolchain@v1
29-
with:
30-
profile: minimal
31-
toolchain: ${{ matrix.rust }}
32-
target: thumbv7m-none-eabi
33-
override: true
27+
- uses: actions/checkout@v3
28+
- name: Use the latest ${{ matrix.rust }} rustc
29+
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
30+
- name: Add Cortex-M3 target
31+
run: rustup target add thumbv7m-none-eabi
32+
3433
- uses: actions-rs/cargo@v1
3534
with:
3635
command: check
3736
args: --features=${{ matrix.mcu }},rt --examples
37+
3838
- uses: actions-rs/cargo@v1
3939
with:
4040
command: test

.github/workflows/clippy.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ jobs:
55
clippy_check:
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v1
9-
- run: rustup component add clippy
10-
- uses: actions-rs/toolchain@v1
11-
with:
12-
toolchain: stable
13-
target: thumbv7m-none-eabi
14-
override: true
8+
- uses: actions/checkout@v3
9+
- name: Use the latest stable rustc
10+
run: rustup update stable && rustup default stable
11+
- name: Add Cortex-M3 target
12+
run: rustup target add thumbv7m-none-eabi
13+
1514
- uses: actions-rs/clippy-check@v1
1615
with:
1716
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/rustfmt.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ jobs:
77
name: Rustfmt
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
11-
- uses: actions-rs/toolchain@v1
12-
with:
13-
profile: minimal
14-
toolchain: stable
15-
override: true
16-
- run: rustup component add rustfmt
10+
- uses: actions/checkout@v3
11+
- name: Use the latest stable rustc
12+
run: rustup update stable && rustup default stable
13+
1714
- uses: actions-rs/cargo@v1
1815
with:
1916
command: fmt

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
## [v0.10.0] - 2022-12-12
11+
1012
- `Timer`: adds `get_interrupt` to `Timer`
1113
- `gpio`: port and pin generics first, then mode,
1214
`PinMode` for modes instead of pins, `HL` trait, other cleanups
@@ -332,7 +334,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
332334

333335
- First tagged version
334336

335-
[Unreleased]: https://github.com/stm32-rs/stm32f1xx-hal/compare/v0.9.0...HEAD
337+
[Unreleased]: https://github.com/stm32-rs/stm32f1xx-hal/compare/v0.10.0...HEAD
338+
[v0.10.0]: https://github.com/stm32-rs/stm32f1xx-hal/compare/v0.9.0...v0.10.0
336339
[v0.9.0]: https://github.com/stm32-rs/stm32f1xx-hal/compare/v0.8.0...v0.9.0
337340
[v0.8.0]: https://github.com/stm32-rs/stm32f1xx-hal/compare/v0.7.0...v0.8.0
338341
[v0.7.0]: https://github.com/stm32-rs/stm32f1xx-hal/compare/v0.6.1...v0.7.0

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ name = "stm32f1xx-hal"
1111
repository = "https://github.com/stm32-rs/stm32f1xx-hal"
1212
documentation = "https://docs.rs/stm32f1xx-hal"
1313
readme = "README.md"
14-
version = "0.9.0"
14+
version = "0.10.0"
1515

1616
[package.metadata.docs.rs]
17-
features = ["stm32f103", "rt"]
17+
features = ["stm32f103", "rtic", "high"]
1818
default-target = "x86_64-unknown-linux-gnu"
1919

2020
[dependencies]

src/bb.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ pub unsafe fn write<T>(register: *const T, bit: u8, set: bool) {
4747

4848
let bit = bit as usize;
4949
let bb_addr = (PERI_BIT_BAND_BASE + (addr - PERI_ADDRESS_START) * 32) + 4 * bit;
50-
ptr::write_volatile(bb_addr as *mut u32, if set { 1 } else { 0 });
50+
ptr::write_volatile(bb_addr as *mut u32, u32::from(set));
5151
}

src/i2c.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ where
243243
fn send_addr(&self, addr: u8, read: bool) {
244244
self.i2c
245245
.dr
246-
.write(|w| w.dr().bits(addr << 1 | (if read { 1 } else { 0 })));
246+
.write(|w| w.dr().bits(addr << 1 | (u8::from(read))));
247247
}
248248

249249
/// Generate STOP condition

src/rcc.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,9 @@ impl CFGR {
266266
.bits(if cfg.pllmul.is_some() {
267267
// PLL
268268
0b10
269-
} else if cfg.hse.is_some() {
270-
// HSE
271-
0b1
272269
} else {
273-
// HSI
274-
0b0
270+
// HSE or HSI
271+
u8::from(cfg.hse.is_some())
275272
})
276273
});
277274

0 commit comments

Comments
 (0)