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

Reexport Direction from older embedded_hal #479

Merged
merged 1 commit into from
Jan 30, 2024
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Add tools/check.py python script for local check
- Add changelog check on PRs
- Replace UB code by a legitimate pointer access
- Reexport `Direction` from `qei`

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

Expand Down
7 changes: 4 additions & 3 deletions src/qei.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ use core::u16;

use core::marker::PhantomData;

use crate::hal::{self, Direction};
use crate::hal;
pub use crate::hal::Direction;
#[cfg(any(feature = "stm32f100", feature = "stm32f103", feature = "connectivity",))]
use crate::pac::TIM1;
#[cfg(feature = "medium")]
Expand Down Expand Up @@ -188,9 +189,9 @@ macro_rules! hal {

fn direction(&self) -> Direction {
if self.tim.cr1.read().dir().bit_is_clear() {
hal::Direction::Upcounting
Direction::Upcounting
} else {
hal::Direction::Downcounting
Direction::Downcounting
}
}
}
Expand Down
Loading