mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 06:42:32 +00:00
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.
This commit is contained in:
parent
6ad58f428a
commit
79985f0036
@ -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) => {
|
||||
|
Loading…
Reference in New Issue
Block a user