aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32g0
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2025-03-26 16:01:37 +0100
committerDario Nieuwenhuis <[email protected]>2025-03-27 15:18:06 +0100
commitd41eeeae79388f219bf6a84e2f7bde9f6b532516 (patch)
tree678b6fc732216e529dc38e6f65b72a309917ac32 /examples/stm32g0
parent9edf5b7f049f95742b60b041e4443967d8a6b708 (diff)
Remove Peripheral trait, rename PeripheralRef->Peri.
Diffstat (limited to 'examples/stm32g0')
-rw-r--r--examples/stm32g0/src/bin/adc_dma.rs2
-rw-r--r--examples/stm32g0/src/bin/input_capture.rs4
-rw-r--r--examples/stm32g0/src/bin/pwm_input.rs4
3 files changed, 5 insertions, 5 deletions
diff --git a/examples/stm32g0/src/bin/adc_dma.rs b/examples/stm32g0/src/bin/adc_dma.rs
index 3713e5a21..d7515933c 100644
--- a/examples/stm32g0/src/bin/adc_dma.rs
+++ b/examples/stm32g0/src/bin/adc_dma.rs
@@ -25,7 +25,7 @@ async fn main(_spawner: Spawner) {
25 25
26 loop { 26 loop {
27 adc.read( 27 adc.read(
28 &mut dma, 28 dma.reborrow(),
29 [ 29 [
30 (&mut vrefint_channel, SampleTime::CYCLES160_5), 30 (&mut vrefint_channel, SampleTime::CYCLES160_5),
31 (&mut pa0, SampleTime::CYCLES160_5), 31 (&mut pa0, SampleTime::CYCLES160_5),
diff --git a/examples/stm32g0/src/bin/input_capture.rs b/examples/stm32g0/src/bin/input_capture.rs
index bc814cb13..08df4e043 100644
--- a/examples/stm32g0/src/bin/input_capture.rs
+++ b/examples/stm32g0/src/bin/input_capture.rs
@@ -16,14 +16,14 @@ use embassy_stm32::time::khz;
16use embassy_stm32::timer::input_capture::{CapturePin, InputCapture}; 16use embassy_stm32::timer::input_capture::{CapturePin, InputCapture};
17use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm}; 17use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm};
18use embassy_stm32::timer::Channel; 18use embassy_stm32::timer::Channel;
19use embassy_stm32::{bind_interrupts, peripherals, timer}; 19use embassy_stm32::{bind_interrupts, peripherals, timer, Peri};
20use embassy_time::Timer; 20use embassy_time::Timer;
21use {defmt_rtt as _, panic_probe as _}; 21use {defmt_rtt as _, panic_probe as _};
22 22
23// Connect PB1 and PA6 with a 1k Ohm resistor 23// Connect PB1 and PA6 with a 1k Ohm resistor
24 24
25#[embassy_executor::task] 25#[embassy_executor::task]
26async fn blinky(led: peripherals::PB1) { 26async fn blinky(led: Peri<'static, peripherals::PB1>) {
27 let mut led = Output::new(led, Level::High, Speed::Low); 27 let mut led = Output::new(led, Level::High, Speed::Low);
28 28
29 loop { 29 loop {
diff --git a/examples/stm32g0/src/bin/pwm_input.rs b/examples/stm32g0/src/bin/pwm_input.rs
index db9cf4f8a..9d6b5fe97 100644
--- a/examples/stm32g0/src/bin/pwm_input.rs
+++ b/examples/stm32g0/src/bin/pwm_input.rs
@@ -14,13 +14,13 @@ use embassy_stm32::gpio::{Level, Output, OutputType, Pull, Speed};
14use embassy_stm32::time::khz; 14use embassy_stm32::time::khz;
15use embassy_stm32::timer::pwm_input::PwmInput; 15use embassy_stm32::timer::pwm_input::PwmInput;
16use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm}; 16use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm};
17use embassy_stm32::{bind_interrupts, peripherals, timer}; 17use embassy_stm32::{bind_interrupts, peripherals, timer, Peri};
18use embassy_time::Timer; 18use embassy_time::Timer;
19use {defmt_rtt as _, panic_probe as _}; 19use {defmt_rtt as _, panic_probe as _};
20 20
21// Connect PB1 and PA6 with a 1k Ohm resistor 21// Connect PB1 and PA6 with a 1k Ohm resistor
22#[embassy_executor::task] 22#[embassy_executor::task]
23async fn blinky(led: peripherals::PB1) { 23async fn blinky(led: Peri<'static, peripherals::PB1>) {
24 let mut led = Output::new(led, Level::High, Speed::Low); 24 let mut led = Output::new(led, Level::High, Speed::Low);
25 25
26 loop { 26 loop {