aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32h7
diff options
context:
space:
mode:
authorJan Špaček <[email protected]>2024-06-01 18:16:40 +0200
committerJan Špaček <[email protected]>2024-06-16 21:11:55 +0200
commit94007ce6e0fc59e374902eadcc31616e56068e43 (patch)
tree014302ef421d4cfdc6e816737793f3ad147d7bc1 /examples/stm32h7
parent1a2c8cecded9805970dc63f495723c690c01397e (diff)
stm32/gpio: refactor AfType
Diffstat (limited to 'examples/stm32h7')
-rw-r--r--examples/stm32h7/src/bin/low_level_timer_api.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/stm32h7/src/bin/low_level_timer_api.rs b/examples/stm32h7/src/bin/low_level_timer_api.rs
index a95b44b74..b796996ea 100644
--- a/examples/stm32h7/src/bin/low_level_timer_api.rs
+++ b/examples/stm32h7/src/bin/low_level_timer_api.rs
@@ -3,7 +3,7 @@
3 3
4use defmt::*; 4use defmt::*;
5use embassy_executor::Spawner; 5use embassy_executor::Spawner;
6use embassy_stm32::gpio::{AFType, Flex, Pull, Speed}; 6use embassy_stm32::gpio::{AfType, Flex, OutputType, Speed};
7use embassy_stm32::time::{khz, Hertz}; 7use embassy_stm32::time::{khz, Hertz};
8use embassy_stm32::timer::low_level::{OutputCompareMode, Timer as LLTimer}; 8use embassy_stm32::timer::low_level::{OutputCompareMode, Timer as LLTimer};
9use embassy_stm32::timer::{Channel, Channel1Pin, Channel2Pin, Channel3Pin, Channel4Pin, GeneralInstance32bit4Channel}; 9use embassy_stm32::timer::{Channel, Channel1Pin, Channel2Pin, Channel3Pin, Channel4Pin, GeneralInstance32bit4Channel};
@@ -83,10 +83,10 @@ impl<'d, T: GeneralInstance32bit4Channel> SimplePwm32<'d, T> {
83 let mut ch2 = Flex::new(ch2); 83 let mut ch2 = Flex::new(ch2);
84 let mut ch3 = Flex::new(ch3); 84 let mut ch3 = Flex::new(ch3);
85 let mut ch4 = Flex::new(ch4); 85 let mut ch4 = Flex::new(ch4);
86 ch1.set_as_af_unchecked(af1, AFType::OutputPushPull, Pull::None, Speed::VeryHigh); 86 ch1.set_as_af_unchecked(af1, AfType::output(OutputType::PushPull, Speed::VeryHigh));
87 ch2.set_as_af_unchecked(af2, AFType::OutputPushPull, Pull::None, Speed::VeryHigh); 87 ch2.set_as_af_unchecked(af2, AfType::output(OutputType::PushPull, Speed::VeryHigh));
88 ch3.set_as_af_unchecked(af3, AFType::OutputPushPull, Pull::None, Speed::VeryHigh); 88 ch3.set_as_af_unchecked(af3, AfType::output(OutputType::PushPull, Speed::VeryHigh));
89 ch4.set_as_af_unchecked(af4, AFType::OutputPushPull, Pull::None, Speed::VeryHigh); 89 ch4.set_as_af_unchecked(af4, AfType::output(OutputType::PushPull, Speed::VeryHigh));
90 90
91 let mut this = Self { 91 let mut this = Self {
92 tim: LLTimer::new(tim), 92 tim: LLTimer::new(tim),