Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update ci, clippy & release 0.14 #559

Merged
merged 1 commit into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,15 @@ jobs:

steps:
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: thumbv7em-none-eabihf
override: true
- name: Use the latest ${{ matrix.rust }} rustc
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- name: Add Cortex-M4F target
run: rustup target add thumbv7em-none-eabihf

- name: Cache Dependencies
uses: Swatinem/rust-cache@v2
with:
key: pac-v0.15.1-${{ matrix.mcu }}
key: v0.14.0-${{ matrix.mcu }}

- uses: actions-rs/cargo@v1
with:
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: thumbv7em-none-eabihf
override: true
components: clippy
- name: Use the latest stable rustc
run: rustup update stable && rustup default stable
- name: Add Cortex-M4F target
run: rustup target add thumbv7em-none-eabihf

- name: Cache Dependencies
uses: Swatinem/rust-cache@v2
with:
key: pac-v0.15.1
key: v0.14.0

- uses: actions-rs/clippy-check@v1
with:
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- name: Use the latest stable rustc
run: rustup update stable && rustup default stable

- uses: actions-rs/cargo@v1
with:
command: fmt
Expand Down
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [v0.14.0] - 2022-12-12

### Changed

- Add missing timer pins [#536]
Expand Down Expand Up @@ -70,18 +72,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
[#515]: https://github.com/stm32-rs/stm32f4xx-hal/pull/515
[#517]: https://github.com/stm32-rs/stm32f4xx-hal/pull/517
[#519]: https://github.com/stm32-rs/stm32f4xx-hal/pull/519
[#527]: https://github.com/stm32-rs/stm32f4xx-hal/pull/527
[#529]: https://github.com/stm32-rs/stm32f4xx-hal/pull/529
[#536]: https://github.com/stm32-rs/stm32f4xx-hal/pull/536
[#534]: https://github.com/stm32-rs/stm32f4xx-hal/pull/529
[#535]: https://github.com/stm32-rs/stm32f4xx-hal/pull/535
[#540]: https://github.com/stm32-rs/stm32f4xx-hal/pull/540
[#542]: https://github.com/stm32-rs/stm32f4xx-hal/pull/542
[#527]: https://github.com/stm32-rs/stm32f4xx-hal/pull/527
[#551]: https://github.com/stm32-rs/stm32f4xx-hal/pull/551
[#552]: https://github.com/stm32-rs/stm32f4xx-hal/pull/552
[#553]: https://github.com/stm32-rs/stm32f4xx-hal/pull/553
[#554]: https://github.com/stm32-rs/stm32f4xx-hal/pull/554
[#555]: https://github.com/stm32-rs/stm32f4xx-hal/pull/555
[#556]: https://github.com/stm32-rs/stm32f4xx-hal/pull/556
[#557]: https://github.com/stm32-rs/stm32f4xx-hal/pull/557

## [v0.13.2] - 2022-05-16

Expand Down Expand Up @@ -743,7 +747,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

- Support for stm32f407 and stm32f429.

[Unreleased]: https://github.com/stm32-rs/stm32f4xx-hal/compare/v0.13.2...HEAD
[Unreleased]: https://github.com/stm32-rs/stm32f4xx-hal/compare/v0.14.0...HEAD
[v0.14.0]: https://github.com/stm32-rs/stm32f4xx-hal/compare/v0.13.2...v0.14.0
[v0.13.2]: https://github.com/stm32-rs/stm32f4xx-hal/compare/v0.13.1...v0.13.2
[v0.13.1]: https://github.com/stm32-rs/stm32f4xx-hal/compare/v0.13.0...v0.13.1
[v0.13.0]: https://github.com/stm32-rs/stm32f4xx-hal/compare/v0.12.0...v0.13.0
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ license = "0BSD"
name = "stm32f4xx-hal"
readme = "README.md"
repository = "https://github.com/stm32-rs/stm32f4xx-hal"
version = "0.13.2"
version = "0.14.0"

[package.metadata.docs.rs]
features = ["stm32f429", "usb_fs", "can", "i2s", "fsmc_lcd", "rtic"]
features = ["stm32f429", "usb_fs", "can", "i2s", "fsmc_lcd", "rtic", "defmt"]
targets = ["thumbv7em-none-eabihf"]

[dependencies]
Expand Down Expand Up @@ -62,7 +62,7 @@ optional = true

[dev-dependencies]
defmt = "0.3.2"
defmt-rtt = "0.3.2"
defmt-rtt = "0.4.0"
panic-probe = { version = "0.3.0", features = [ "print-defmt" ] }
panic-semihosting = "0.6.0"
cortex-m-semihosting = "0.5.0"
Expand Down
2 changes: 1 addition & 1 deletion src/bb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ pub unsafe fn write<T>(register: *const T, bit: u8, set: bool) {

let bit = bit as usize;
let bb_addr = (PERI_BIT_BAND_BASE + (addr - PERI_ADDRESS_START) * 32) + 4 * bit;
ptr::write_volatile(bb_addr as *mut u32, if set { 1 } else { 0 });
ptr::write_volatile(bb_addr as *mut u32, u32::from(set));
}
4 changes: 2 additions & 2 deletions src/i2c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ impl<I2C: Instance, PINS> I2c<I2C, PINS> {
for op in ops {
// 2. Execute previous operations.
match &mut prev_op {
Operation::Read(rb) => self.read_bytes(*rb)?,
Operation::Read(rb) => self.read_bytes(rb)?,
Operation::Write(wb) => self.write_bytes(wb.iter().cloned())?,
};
// 3. If operation changes type we must generate new start
Expand Down Expand Up @@ -592,7 +592,7 @@ impl<I2C: Instance, PINS> I2c<I2C, PINS> {
for op in ops {
// 2. Execute previous operations.
match &mut prev_op {
Operation::Read(rb) => self.read_bytes(*rb)?,
Operation::Read(rb) => self.read_bytes(rb)?,
Operation::Write(wb) => self.write_bytes(wb.iter().cloned())?,
};
// 3. If operation changes type we must generate new start
Expand Down
2 changes: 1 addition & 1 deletion src/rtc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ fn decode_day(dr: &dr::R) -> u8 {

#[inline(always)]
fn decode_month(dr: &dr::R) -> u8 {
let mt: u8 = if dr.mt().bit() { 1 } else { 0 };
let mt = u8::from(dr.mt().bit());
bcd2_decode(mt, dr.mu().bits()) as u8
}

Expand Down