Skip to content

Commit 89524b9

Browse files
committed
Allow PullUp and PullDown inputs for timer pwm_input and qei
1 parent 5776ccd commit 89524b9

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
2828
- Added DMA receive support for `SPI`
2929
- Added `release` functions to SPI DMA
3030
- Add GPIOF/GPIOG support for high/xl density lines
31+
- Allow using `Input<PullUp>` and `Input<PullDown>` for timers' pwm and qei inputs.
3132

3233
### Fixed
3334
- Fix > 2 byte i2c reads

src/pwm_input.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::pac::TIM4;
1212
use crate::pac::{TIM2, TIM3};
1313

1414
use crate::afio::MAPR;
15-
use crate::gpio::{self, Floating, Input};
15+
use crate::gpio::{self, Input};
1616
use crate::rcc::{Clocks, GetBusFreq, RccBus};
1717
use crate::time::Hertz;
1818
use crate::timer::Timer;
@@ -21,11 +21,11 @@ pub trait Pins<REMAP> {}
2121

2222
use crate::timer::sealed::{Ch1, Ch2, Remap};
2323

24-
impl<TIM, REMAP, P1, P2> Pins<REMAP> for (P1, P2)
24+
impl<TIM, REMAP, P1, P2, MODE1, MODE2> Pins<REMAP> for (P1, P2)
2525
where
2626
REMAP: Remap<Periph = TIM>,
27-
P1: Ch1<REMAP> + gpio::PinExt<Mode = Input<Floating>>,
28-
P2: Ch2<REMAP> + gpio::PinExt<Mode = Input<Floating>>,
27+
P1: Ch1<REMAP> + gpio::PinExt<Mode = Input<MODE1>>,
28+
P2: Ch2<REMAP> + gpio::PinExt<Mode = Input<MODE2>>,
2929
{
3030
}
3131

0 commit comments

Comments
 (0)