Skip to content

migrate to embedded-hal=1.0.0.rc1 #25

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

Merged
merged 3 commits into from
Nov 28, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
rust: [1.62.0, stable]
rust: [1.63.0, stable]
features: ['', '--all-features']
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<!-- next-header -->
## [Unreleased] - ReleaseDate
### Changed
* Due to dependency updates the MSRV has been updated from 1.60 to 1.62. This should only be relevant if you use the `defmt` feature, but we now only test with 1.62 and not older releases, so it's not guaranteed to work otherwise.
* Due to dependency updates the MSRV has been updated from 1.60 to 1.63. This should only be relevant if you use the `defmt` feature, but we now only test with 1.63 and not older releases, so it's not guaranteed to work otherwise.
* Breaking: the API was migrated from `embedded-hal:0.2` to `embedded-hal:1.0.0-rc1`.
If your HAL does not yet implement this, then please use the previous release of the library.

<!-- next-url -->
[Unreleased]: https://github.com/rursprung/tb6612fng-rs/compare/v0.1.1...HEAD
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "tb6612fng"
version = "0.1.0"
edition = "2021"
rust-version = "1.62"
rust-version = "1.63"

description = "A `no_std` driver for the TB6612FNG motor driver."
repository = "https://github.com/rursprung/tb6612fng-rs"
Expand All @@ -11,9 +11,9 @@ keywords = ["tb6612fng", "driver", "motor", "controller", "embedded-hal-driver"]
license = "MIT OR Apache-2.0"

[dependencies]
embedded-hal = "0.2"
embedded-hal = "1.0.0-rc.1"

defmt = { version = "0.3", optional = true }

[dev-dependencies]
embedded-hal-mock = "0.9"
embedded-hal-mock = { version = "0.10.0-rc.2", features = ["eh1"] }
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ A simple example for the STM32F4 microcontrollers is [available](examples/stm32f
For the changelog please see the dedicated [CHANGELOG.md](CHANGELOG.md).

## Roadmap to v1.0.0
This crate is already stable, however it's based on a 0.x version of [`embedded-hal`](https://github.com/rust-embedded/embedded-hal/), making the API unstable (the change from 0.x to 1.x of e-h will be breaking).
This crate is already stable, however it's based on athe v1.0.0 release candidate version of [`embedded-hal`](https://github.com/rust-embedded/embedded-hal/),
making the API unstable (the change from 1.0.0-rc.1 to 1.0.0 of e-h will be breaking from a dependency management point of view).
See [the tracking issue](https://github.com/rursprung/tb6612fng-rs/issues/4) for the roadmap to v1.0.0.

## Minimum Supported Rust Version (MSRV)
Expand Down
91 changes: 54 additions & 37 deletions examples/stm32f4-single-motor-example/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion examples/stm32f4-single-motor-example/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ mod app {
// set up the motor
let motor_in1 = gpiob.pb5.into_push_pull_output();
let motor_in2 = gpiob.pb4.into_push_pull_output();
let motor_pwm = ctx
let mut motor_pwm = ctx
.device
.TIM2
.pwm_hz(Channel3::new(gpiob.pb10), 100.kHz(), &clocks)
.split();
motor_pwm.enable();
let mut motor = Motor::new(motor_in1, motor_in2, motor_pwm);
motor.drive_backwards(0).expect("");

Expand Down
Loading