Remove Peripheral trait, rename PeripheralRef->Peri.

This commit is contained in:
Dario Nieuwenhuis
2025-03-26 16:01:37 +01:00
parent 9edf5b7f04
commit d41eeeae79
225 changed files with 2645 additions and 3215 deletions

View File

@@ -25,7 +25,7 @@ async fn main(_spawner: Spawner) {
loop {
adc.read(
&mut dma,
dma.reborrow(),
[
(&mut vrefint_channel, SampleTime::CYCLES160_5),
(&mut pa0, SampleTime::CYCLES160_5),

View File

@@ -16,14 +16,14 @@ use embassy_stm32::time::khz;
use embassy_stm32::timer::input_capture::{CapturePin, InputCapture};
use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm};
use embassy_stm32::timer::Channel;
use embassy_stm32::{bind_interrupts, peripherals, timer};
use embassy_stm32::{bind_interrupts, peripherals, timer, Peri};
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
// Connect PB1 and PA6 with a 1k Ohm resistor
#[embassy_executor::task]
async fn blinky(led: peripherals::PB1) {
async fn blinky(led: Peri<'static, peripherals::PB1>) {
let mut led = Output::new(led, Level::High, Speed::Low);
loop {

View File

@@ -14,13 +14,13 @@ use embassy_stm32::gpio::{Level, Output, OutputType, Pull, Speed};
use embassy_stm32::time::khz;
use embassy_stm32::timer::pwm_input::PwmInput;
use embassy_stm32::timer::simple_pwm::{PwmPin, SimplePwm};
use embassy_stm32::{bind_interrupts, peripherals, timer};
use embassy_stm32::{bind_interrupts, peripherals, timer, Peri};
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
// Connect PB1 and PA6 with a 1k Ohm resistor
#[embassy_executor::task]
async fn blinky(led: peripherals::PB1) {
async fn blinky(led: Peri<'static, peripherals::PB1>) {
let mut led = Output::new(led, Level::High, Speed::Low);
loop {