Skip to content

Commit

Permalink
Merge pull request #479 from samueltardieu/reexport-direction
Browse files Browse the repository at this point in the history
Reexport Direction from older embedded_hal
  • Loading branch information
burrbull authored Jan 30, 2024
2 parents 2c10000 + 89a097b commit ab6de2e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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

0 comments on commit ab6de2e

Please sign in to comment.