From 89524b9f5a57d05dde31c66dd0a079fd5c29f202 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Sun, 8 Aug 2021 23:22:16 +0200 Subject: [PATCH] Allow PullUp and PullDown inputs for timer pwm_input and qei --- CHANGELOG.md | 1 + src/pwm_input.rs | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 202542e1..9a7b23be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Added DMA receive support for `SPI` - Added `release` functions to SPI DMA - Add GPIOF/GPIOG support for high/xl density lines +- Allow using `Input` and `Input` for timers' pwm and qei inputs. ### Fixed - Fix > 2 byte i2c reads diff --git a/src/pwm_input.rs b/src/pwm_input.rs index 8a4a5ac9..5d8c9c17 100644 --- a/src/pwm_input.rs +++ b/src/pwm_input.rs @@ -12,7 +12,7 @@ use crate::pac::TIM4; use crate::pac::{TIM2, TIM3}; use crate::afio::MAPR; -use crate::gpio::{self, Floating, Input}; +use crate::gpio::{self, Input}; use crate::rcc::{Clocks, GetBusFreq, RccBus}; use crate::time::Hertz; use crate::timer::Timer; @@ -21,11 +21,11 @@ pub trait Pins {} use crate::timer::sealed::{Ch1, Ch2, Remap}; -impl Pins for (P1, P2) +impl Pins for (P1, P2) where REMAP: Remap, - P1: Ch1 + gpio::PinExt>, - P2: Ch2 + gpio::PinExt>, + P1: Ch1 + gpio::PinExt>, + P2: Ch2 + gpio::PinExt>, { }