Remove Peripheral trait, rename PeripheralRef->Peri.
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user