From 79985f003646d379f2aea2738dc0291770e701c5 Mon Sep 17 00:00:00 2001 From: pennae Date: Wed, 3 May 2023 09:11:19 +0200 Subject: [PATCH] rp/pio: hide pio/sm numbers nothing should care which number pio it is running on, and the state machine index could always be extracted from type information. --- embassy-rp/src/pio.rs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/embassy-rp/src/pio.rs b/embassy-rp/src/pio.rs index bb9bdb8ac..ffd8d53dd 100644 --- a/embassy-rp/src/pio.rs +++ b/embassy-rp/src/pio.rs @@ -332,14 +332,6 @@ impl<'d, PIO: PioInstance, const SM: usize> sealed::PioStateMachine for PioState impl<'d, PIO: PioInstance, const SM: usize> PioStateMachine for PioStateMachineInstance<'d, PIO, SM> {} pub trait PioStateMachine: sealed::PioStateMachine + Sized + Unpin { - fn pio_no(&self) -> u8 { - Self::Pio::PIO_NO - } - - fn sm_no(&self) -> u8 { - Self::SM as u8 - } - fn restart(&mut self) { let mask = 1u8 << Self::SM; unsafe { @@ -981,11 +973,7 @@ mod sealed { } } -pub trait PioInstance: sealed::PioInstance + Sized + Unpin { - fn pio(&self) -> u8 { - Self::PIO_NO - } -} +pub trait PioInstance: sealed::PioInstance + Sized + Unpin {} macro_rules! impl_pio { ($name:ident, $pio:expr, $pac:ident, $funcsel:ident) => {